Google Tag Manager (GTM) is a tool used for creating and implementing tags and tracking codes for your checkouts. With GTM and Google Analytics 4 (GA4), you gain insight into how users interact with your checkouts.
If you go to Settings > Analytics, you can adjust the general analytics settings and create a link with Google Tag Manager (GTM) or Google Analytics 4 (GA4).
Analytics are part of Plug&Pay Premium or -Ultimate. Do you use Plug&Pay Lite? Upgrade to Premium or Ultimate to use this feature.
Placing your GTM code in Plug&Pay
The first thing you need to do is place your GTM-code in Plug&Pay. In GTM, select the right container you want to link. Your GTM-code is shown:
This code is unique. On the Analytics page, under Google > Tracker, choose Google Tag Manager and enter the GTM code:
Importing a JSON file
There is a JSON file for the GTM and GA4 link. This file contains all the necessary configuration settings, tags and triggers.
You can easily upload this file, without having to configure anything yourself.
In order to import the JSON file, in GTM you navigate to Admin > Import Container:
You can Choose container file and select the JSON file, Choose workspace, and Merge the JSON file:
Whether you Overwrite or Rename conflicting tags, triggers and variables depends on your current GTM setup.
If you are unsure, it is best to choose Rename. If you have duplicate tags, you can manually change them afterwards.
Once the JSON file is imported, you will see a number of new tags and triggers added to your GTM environment:
Add GA4 to GTM
Next, you must add your GA4 to GTM. We use a Variable, and you must change this to your GA4 ID.
You change this by navigating to Variables and editing your GA4-ID.
Click on the pencil and change the Value to your GA4 ID:
❗With these settings you add GA4 again to your GTM. Keep this in mind if you are already using GA4, so you do no accidentally start measuring twice.
Which tags are fired?
Under Tags you find which tags are fired after an order is placed in Plug&Pay.
A tag called begin_checkout is triggered by a page view on the checkout itself. A separate tag, Purchase, is for all customers who actually placed an order.
ℹ️ It can take up to 48 hours for data to appear in your GA4. It is possible that everything is set up correctly, but that you must still wait for the data to appear.
Create a report in GA4
After all these steps, you can create a report in GA4. You do this by navigating to Explore:
You create a new (empty) report and add the following Variables:
Dimensions:
Transaction ID
Item list name
Date
Statistics:
Items purchased
Item revenue
Items viewed
You add these variables to Settings in order to create the overview. In this overview the orders and revenue are shown.
With the link between Plug&Pay and Google Tag Manager and Google Analytics 4, you can track your sales data properly.
You can use our report as an example, or create your own of course!