Download the PHP package digitalpulsebe/craft-utm-tracker without Composer

On this page you can find all versions of the php package digitalpulsebe/craft-utm-tracker. 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 craft-utm-tracker

UTM Tracker plugin for Craft CMS 3, 4 and 5

Get landing page location and query parameters when the user lands on the site. Keeps them in the session for use in forms or other usage in twig variables.

Requirements

This plugin requires Craft CMS 3.7, 4 or 5.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

    cd /path/to/project
  2. Then tell Composer to load the plugin:

    composer require digitalpulsebe/craft-utm-tracker

    Or when using Craft 4, use version 2:

    composer require digitalpulsebe/craft-utm-tracker:^2.0.0

    Or when using Craft 3, use version 1:

    composer require digitalpulsebe/craft-utm-tracker:^1.0.0
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for UTM Tracker.

Configuring UTM Tracker

Configure options in the Craft control panel or create a file in config/utm-tracker.php as a copy of config.php.

By default, you should keep track of these UTM tags:

Also, the landing URL and referrer URL are tracked when the session is created.

Other configuration (config/utm-tracker.php) options are:

Usage

Available twig variables:

Using UTM Tracker in combination with Formie

  1. Drag a custom field 'Tracked Field' on your form
  2. Name your field whatever you want, select the source in the dropdown
  3. When selecting a Query Parameter (tag) as a source, select the key from the list. It is the same list as the tags you defined in the settings of this app.

Using UTM Tracker in combination with Freeform

  1. Create hidden fields and add them to your form
  2. Render tag with default value filled from the available variable properties

example:

Tracking in combination with full page caching

When the pages are cached entirely (using Blitz, Varnish...) there is no way for Craft CMS to pick up the traffic. You will need to send and retrieve data using javascript asynchronously. But beware: it might increase server load. If your application has very high traffic, consider a javascript only solution.

Sending data to the backend

Put this in your twig layout template file:

It will make a POST call to the Craft CMS backend to avoid caching.

Retrieving data

To use the data on cached pages you will need to retrieve it from the api.

Make a call to https://example.com/actions/utm-tracker/api/data and you will get this json

Notice: tracking user data

Don't forget to notify the user details are tracked to comply to the GDPR rules. When you select the cookie storage method an extra cookie is created. The name and lifetime of the cookie is configurable in the config file. By default, the key is 'utm_tracking_parameters'.


All versions of craft-utm-tracker with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^5.0.0-alpha.1
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 digitalpulsebe/craft-utm-tracker contains the following files

Loading the files please wait ...