GTM import - new Enhanced Ecommerce datalayer (GA4)

The import is a way to get you started and is purely a standard, based on the GA4 Enhanced E-commerce datalayer. It may be possible that some pages have a different datalayer and variables, such as the email variable. Please note you will have to edit some of the events yourself and GTM knowledge is necessary. We will support you with questions you may have, but we cannot do the implementation in GTM, this is something you have to do yourself.

Log in to Google Tag Manager and ensure you are in an empty workspace. If workspace changes are not yet submitted, like in the screenshot below, contact the user who made the changes if the changes can be reversed or published. This will prevent you from publishing unwanted changes to your Google Tag Manager container. You can also create a new workspace where you only work on these changes and publish them.

Before implementing the e-commerce scripts, ensure you have the base tracker added to your Google Tag Manager container. The e-commerce scripts won’t work without the base tracker on every (virtual) page view.

We’ve created this file to import into your container, containing variables, triggers, and tags that capture GTM ecommerce (GA4) data and send it to our tracker in the correct format.


To import this file into your container, navigate to the admin environment of Google Tag Manager and click Import Container. When importing the file, please select the correct workspace (probably Default Workspace), MERGE the workspace and RENAME conflicting tags. This prevents you from losing present tags. Example:

After confirming the import, all tags, triggers, and variables are now present in your container, neatly stored in a folder.


Checking if the implementation is correct

All other variables, triggers, and tags should work out of the box if you implemented GTM ecommerce (GA4) events correctly. To check if that’s the case and everything is working, you can preview the changes from your container in the Tag Assistant and see if the newly added tags fire correctly on the corresponding pages and events.

For example, when you add something to the shopping cart, the add_to_cart event should appear, and when you click it (1), the newly added Squeezely AddToCart tag should fire (2):

Please also perform other e-commerce events on your website and check if the corresponding tags fire.

Especially take a good look at the triggering of the ViewContent & ViewCategory tags. The imported tags trigger on the “view_item” and “view_item_list” events, but these events are also triggered on other pages on some websites. If this happens, you should set another trigger for these tags in GTM, like pageType data in your dataLayer.

An email address is a very important identifier to get a nameless cookie to an identified profile. The imported Purchase event does not have an email address as it is different per site. Please add the email address to the Purchase event if possible.


  • Go to Data and scroll to 'Events':


Publishing your workspace to the live environment

After checking, don’t forget to publish the changes by clicking the blue Submit button in the top right corner. After clicking, GTM prompts a confirmation window where you can enter a title and subscription for the changes.