Download the PHP package rapidez/gtm without Composer

On this page you can find all versions of the php package rapidez/gtm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gtm

Rapidez GTM

This Rapidez package provides 2 views with the GTM scripts, listens to events emitted by the Rapidez Core and adds ecommerce data to the datalayer. Currently for Universal Analytics Enhanced Ecommerce but you can use this with Analytics 4 by using a GTM Template.

Installation

And add your GTM ID in the .env

And finally add @include('rapidez-gtm::head') and @include('rapidez-gtm::foot') in the head and at the bottom of your layout template, most likely at: resources/views/vendor/rapidez/layouts/app.blade.php. If you haven't published the Rapidez views yet, you can publish them with:

Multistore

Just add all stores in config/rapidez/gtm.php after you've published the config with:

Where the key of the id array is the store code.

Views

If you need to change the views you can publish them with:

Purchase tracking

This package doesn't send any purchase events as it's better to send those from the backend in case a visitor blocks Analytics with a browser extension, for example with elgentos/magento2-serversideanalytics which includes a "AddGaUserId" GraphQL mutation so it's possible to push the id from Rapidez to Magento. When installed you can enable it in the .env with:

view_item_list event

To track the view_item_list event, you can use the v-item-list directive on your product list, for example:

You can also track it only on intersection by adding the .intersection modifier. This defaults to 50% intersection, but can be overridden: v-item-list.intersection="{ intersection: 80, ... }"

Enhanced Conversions

To track Enhanced Conversions, we supply a seperate file you can run when you have captured the relevant user info you want to push.

for example after subscribing to the newsletter, or entering their details in the checkout. Here's an example of how you could implement it

Temporarily disable

If you'd like to test for example the Lighthouse scores without GTM you can disable it by added ?gtm=false to the url

Partytown

Scripts like GTM have a massive negative impact on performance and pagespeed, to remedy this scripts like Partytown have been made. Which allows you to keep your analytics but reclaim some of the performance.

Note that partytown is technically not production ready and still in beta.

Installation

Additional domains and CORS

Not all domains support partytown due to their CORS settings (https://partytown.builder.io/proxying-requests) This package comes with a proxy for these domains which by default is only set up for GTM (see: config/rapidez/gtm.php) If you notice more domains giving CORS errors you can add them to the config or in a comma seperated list in your .env under GTM_PARTYTOWN_DOMAIN_WHITELIST.

Custom config

The partytown configuration is available in window.partytown so you can change the configuration by updating the configuration within <script></script> tags.

Running partytown but not for GTM

If you want to run partytown but not for GTM that's possible too by configuring GTM_PARTYTOWN_ENABLE=false and manually including the partytown view in the head.

License

GNU General Public License v3. Please see License File for more information.


All versions of gtm with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2
illuminate/support Version ^9.0|^10.0|^11.0
illuminate/view Version ^9.0|^10.0|^11.0
rapidez/core Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rapidez/gtm contains the following files

Loading the files please wait ....