For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using AdPage Templates

Import ready-made web and server container templates

To get the right tags, triggers and variables into your Google Tag Manager containers, we've built ready-made templates for both the web and the server container. These templates cover the following webshop platforms: WooCommerce, Shopify, Magento and Lightspeed.

You can find them in the template library on our platform: https://data.adpage.io/template-library

Do not use these templates for websites or webshops that don't run on Shopify, WooCommerce, Magento or Lightspeed.

Before you start: the AdPage e-commerce dataLayer

For webshops on WooCommerce, Shopify, Magento or Lightspeed, you install the Tagging Pixel to replace the Google Tag Manager script, and along with it you install the AdPage e-commerce dataLayer.

These dataLayer events use a trytagging_ prefix. That prefix exists so our events never collide with events that are already being pushed by your theme, another plugin or an existing GTM setup. No duplicate events, no double conversions.

Our templates are built entirely on these trytagging_ events. So the templates only work if the Tagging Pixel and the e-commerce dataLayer have been installed correctly first. If you haven't done that yet, follow the Tagging Pixel instructions for your platform before importing anything.

Generating the templates

In the template library you'll find two things:

Individual templates. Web and server container templates per marketing platform, so you can pick exactly what you need.

The container template generator. Here you select the marketing platforms you want to set up and the Consent Management Platform you're using. The generator then builds complete, ready-to-import container templates for both your GTM web container and your GTM server container, already wired up for your consent setup.

Either way, you end up with JSON files: one for the web container, one for the server container.

Importing the web container template

1

GTM web container

  1. Go to Admin and click Import Container.

  2. Click Choose container file and upload the JSON file for your web container.

  3. Choose your existing workspace.

  4. Select Merge and then Rename conflicting tags, triggers and variables.

  1. Go to Variables and edit every user-defined variable whose name starts with @. These are the constants that hold your the IDs for your platforms, and the @ is there so you can spot them at a glance. Nothing works until they're filled in.

  2. Check for a duplicate Google Tag. If you already had a Google Tag for the GA4 Measurement ID you're now configuring, delete or pause it. Your web container should only ever contain one Google Tag per endpoint (one per Google Ads ID, one per GA4 ID).

  3. Pause or remove overlapping tags. You're now generating GA4 events based on the AdPage dataLayer, so any older tags function on the former e-commerce dataLayer need to be paused or removed.

2

GTM server container

  1. Go to Admin and click Import Container.

  2. Click Choose container file and upload the JSON file for your web container.

  3. Choose your existing workspace.

  4. Select Merge and then Rename conflicting tags, triggers and variables.

  1. Go to Clients and check whether an extra GA4 client has been added. If it has, delete the new imported GA4 client.

  2. Go to Variables and edit every user-defined variable whose name starts with @. These are the constants that hold your the IDs, Labels and Tokens for your platforms, and the @ is there so you can spot them at a glance. Nothing works until they're filled in.

These templates are the starting point of your tracking setup, not the finished product. If you publish your GTM containers straight after importing the JSON files, you will run into problems: unfilled variables, duplicate tags and events firing twice.

Never ever publish a Google Tag Manager container after importing a template without validating using the Google Tag Manager preview mode.

Last updated

Was this helpful?