Stape/Documentation

How to import the GTM template automatically

Updated Aug 29, 2025

The guide shows how to generate and automatically import templates for web and server GTM containers using the Setup Assistant. 

Prerequisites

  • Configured custom domain (optional, but highly recommended for setting first-party cookies).
  • One of the Stape Conversion Tracking CMS apps for:

- Wix

Below, we consider in detail how to set the app up. If you use none of the CMS listed, please follow the steps from the guide for custom websites.

How to automatically import the GTM template using the Setup Assistant

1. CMS app configuration

You will need to configure two tabs of the app: General/Generate and DataLayer.

The app configuration is similar for each CMS; for this article, we consider in detail how to configure the WordPress plugin for WooCommerce websites. If you use another CMS, please follow the instructions:

1.1 General tab of WordPress plugin.

Configure the following fields:

  • Add or disable the option of integrating the GTM tracking script onto every page of your website.
  • Web Google Tag Manager ID - it can be found in the top right corner of your web GTM container.
GTM web container ID
GTM web container ID
  • Server GTM container URL - log in to your Stape account → navigate to the sGTM section of the menu → choose your container → Domains (Tagging Server URLs) → copy domain name.
Domains in Stape admin
Domains in Stape admin
  • Stape container identifier - it can be found in your container on Stape as well.
Container identifier
Container identifier
  • Cookie Keeper - activate Stape’s power-up used to prolong cookies' lifetime in Safari and other browsers with ITP.

Click Save changes.

Here is an example of the General tab configuration:

General tab of Wordpress plugin
General tab of Wordpress plugin

1.2 Data Layer tab of WordPress plugin.

Activate sending eCommerce data and user data to the data layer. Please note that it can work only with WooCommerce shops.

Click Save changes.

Data Layer tab of Wordpress plugin
Data Layer tab of Wordpress plugin

2. Setup Assistant configuration in Stape admin

2.1 Navigate to the section “Setup Assistant” in Stape admin and start configuration.

Setup Assistant in Stape admin
Setup Assistant in Stape admin

2.2 Select the business type (at the moment, only E-commerce is available), CMS platform you use (if your platform is not on the list, select “Other” and follow these steps), and whether you use a consent management platform. If so, select the one from the list.

Step 1 of Setup Assistant configuration
Step 1 of Setup Assistant configuration

2.3 Select the platforms you use. These are the destinations you’ll receive a tracking template for.

Please note: Google Ads can only be selected along with Google Analytics 4.

Step 2 of Setup Assistant configuration
Step 2 of Setup Assistant configuration

2.4 Add IDs and Access tokens for the platforms you’ve chosen.

That’s an optional step; you can add them directly in your web and server containers at any time. In step 3.1 of this guide, we explain where you can find these values.

Step 3 of Setup Assistant
Step 3 of Setup Assistant

2.5 Choose how you want to import templates: automatically or manually. For the purpose of this article, we select automatic import.

Automatically import templates
Automatically import templates

2.6 Authorize with a Google account that has access to the GTM account you want to import templates into.

Choose Google account
Choose Google account

2.7 Select containers and corresponding workspaces into which you want to import templates and click Import templates”.

Select containers
Select containers

Please note: an automatic import may take some time - you will receive an email notification once it’s completed. We recommend not interacting with containers until full completion to avoid interfering with the import process.

2.8 Make sure the templates are in your web and server GTM containers. The imported templates will be neatly organised into folders starting with “[Stape]”.

Templates imported successfully
Templates imported successfully

If the templates weren’t imported automatically, please try importing them manually by following the instructions.

3. Test templates

3.1  Check whether IDs and access tokens for platforms are added to templates.

Regardless of the platforms you have chosen, you should add the Server Container URL - to find it, log in to your Stape account → navigate to the sGTM section of the menu → choose your container → Domains (Tagging Server URLs) → copy the domain name.

Domains in Stape admin
Domains in Stape admin

Click on the platforms you’ve chosen to fill the required fields:

LinkedIn

  • Insight Tag ID - also called Partner ID is a 6-digit code that links your Ad Account and allows conversion tracking in tag managers. To get it, log in to LinkedIn Campaign Manager → Analyze → Signals manager → click on Insight Tag → Choose option: I will use a tag manager.
LinkedIn Partner ID
LinkedIn Partner ID

API Token - in Campaign Manager, → click Data on the left menu → click Sources → Select Google Tag Manager → click Generate token.

GTM token
GTM token
  • Server and web conversion IDs - each conversion ID can be found in Campaign ManagerMeasurement on the left menu → click Conversion tracking → click on the name of the required conversion or create a new one.
LinkedIn fields configuration example 
LinkedIn fields configuration example 

Snapchat

  • Pixel ID - to get it, log in to Snapchat Business ManagerAssetsPixels on the left-side menu → select the required pixel if you have several → copy Pixel ID.
Snapchat Pixel ID
Snapchat Pixel ID
  • API token - to find Conversions API Tokens, go to Business DetailsConversions API Tokens. Here you will find all API tokens; you can copy the existing or create a new one.
Snapchat Conversions API Tokens
Snapchat Conversions API Tokens

Here is an example of Snapchat fields configuration:

Snapchat fields configurations
Snapchat fields configurations

Google Analytics 4

  • Measurement ID - go to Data Streams → click on the Data Stream → copy Measurement ID.

TikTok

  • Pixel ID - to find the Pixel ID, log in to TikTok Ads Manager → choose the Ads Manager account → Click ToolsEvents → from the side bar select Data sources.
  • eAPI Token - to get an access token, click Assets → Web Events → open pixel → click Settings → copy an existing token or click "Generate Access Token".
Access Token in TikTok
Access Token in TikTok

Here is an example of a field configuration for TikTok:

TikTok fields configuration
TikTok fields configuration

Meta

  • Pixel ID - it can be found in your Meta Events ManagerData Sources menu → see the string next to the Pixel’s name.
Meta Pixel ID
Meta Pixel ID
  • CAPI Token - to get the value, choose the PixelSettings tab → find the Conversions API section → click on the Generate access token. For more details, check Meta’s documentation.
Meta fields configuration example
Meta fields configuration example
  • Conversion ID - it can be found when creating/editing a conversion goal in Google Ads  → choose “Use Google Tag Manager” → copy ID.
Conversion ID in Google Ads
Conversion ID in Google Ads
  • Purchase conversion, BeginCheckout conversion, AddToCart conversion - here you should place conversion labels for corresponding conversion events. Conversion labels can be found in your Google Ads accountGoalsConversions → choose the required conversion → expand “Tag Setup”  → Select "Use Google Tag Manager"  → copy Conversion label.
Find Conversion label
Find Conversion label

Here is an example of Google Ads fields configuration:

Google Ads configuration example
Google Ads configuration example

Microsoft Ads (Bing)

  • Microsoft UET Tag ID - the value can be found in the Microsoft Ads accountConversionsUET tag Tag ID.
Microsoft UET Tag ID
Microsoft UET Tag ID
  • Purchase conversion action, Begin Checkout conversion action, AddToCart conversion action - specify the conversion action you’ve chosen when creating the conversion.

Here is an example of Microsoft fields configuration:

Microsoft fields configuration example
Microsoft fields configuration example

Pinterest

  • Tag ID - to find the value, log in to your Pinterest Ads Manager → click on “Conversions” from the “Manage Business” section in the menu → on the left side menu, click on “Pinterest tag” → click on “Tag Manager” → copy ID.
Tag ID Pinterest
Tag ID Pinterest
  • Advertiser ID - to find this ID, log in to your Pinterest Ads Manager → click on “Business manager” from the “Manage Business” section in the menu → on the left side menu, click on “Assets” → click on “Ad account” → copy ID.
Pinterest Advertiser ID
Pinterest Advertiser ID
  • API Token - to find the value, log in to your Pinterest Ads Manager → click on “Conversions” from the “Manage Business” section in the menu → on the left side menu, click on “Conversions API” → click on “Set up API” → Generate new token.
Access Token Pinterest
Access Token Pinterest

Here is an example of Pinterest fields configuration:

Example of Pinterest fields configuration
Example of Pinterest fields configuration

3.2 To test the configuration, make sure the tags include all the necessary data (step 3 of Setup Assistant configuration) and run Preview in both web and server GTM containers. Trigger the events on your website and check whether tags work successfully. Once confirmed, publish the changes to activate the setup. 

Preview in GTM
Preview in GTM

4. Avoid over-reporting from other integrations

Review any additional plugins or integrations that may also be sending events to the same platforms already configured in GTM. If multiple sources send the same events, this can cause over-reporting. For instance, Shopify includes Google and Meta apps that might already be passing events. If such integrations are active, disable them fully or in the event reporting part.

Along the same lines, consider what you already may have in your GTM containers and make sure there are no conflicts or double-firing tags.

Comments

Can’t find what you are looking for?