kacperduras / tracksmart-prestashop

Module to enhanced tracking for Google Analytics 4 (via Google Tag Manager)
GNU General Public License v3.0
7 stars 9 forks source link

TrackSmart

tracksmart-prestashop Build Status

Module to enhanced tracking for Google Analytics 4 (via Google Tag Manager).

Advantages of module

Features

Google Tag Manager settings provided in module, include example implementations for Google Analytics 4 and Facebook Pixel.

Requirements

How to set up?

PrestaShop

General settings

Google Analytics 4

New property

Setup new data stream

Setup new data stream

Measurement ID

Facebook Pixel

Create and get ID of Facebook Pixel: here

Google Tag Manager

API

JSON

JavaScript

In header, module create instance of TrackSmart as variable trackSmart.

let trackSmart = new TrackSmart('CONTAINER_ID', 'USER_ID'); // 'USER_ID' is optional
trackSmart.build(); // Initialize connection
trackSmart.process('event_name', {
    ecommerce: 'event_body'
}); // Send request to Google Tag Manager
trackSmart.destroy(); // Destroy session

License

GNU General Public License v3.0