How to import the GTM template manually
Updated Aug 29, 2025
This guide demonstrates how to generate GTM templates using Setup Assistant and how to import the templates manually into web and server GTM containers.
Prerequisites
- Configured the server GTM container and server container on Stape.
- Configured custom domain (optional, but highly recommended for setting first-party cookies).
- One of the Stape Conversion Tracking CMS apps for:
- Shopify
- Wix
- Salla
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 on the other CMS.
How to manually 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.

- 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.

- Stape container identifier - it can be found in your container on Stape as well.

- 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:

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.
Find the list of WordPress plugin Data Layer events here.
Click “Save changes”.

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

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.

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.

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.

2.5 Download two files - web.json and server.json.

3. Uploading templates into GTM
3.1 Go to the web GTM container → Admin → Import container.

3.2 Select the JSON file “gtm-web-template” you downloaded (make sure you upload the correct file that matches the container type - web or server).
Select the workspace for this import - new or existing.
Select Overwrite or Merge.
The "Overwrite" option should only be used with a new or empty container. For this demo, we are using the Merge option with the "Rename conflicting tags, triggers, and variables" setting enabled. This ensures that GTM will simply rename the tags without altering existing entities in your container if any conflicts arise. |
Click “Add to workspace”.

Do the same within the server GTM container, making sure you import the JSON file named “gtm-server-template”.
4. Test templates
4.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.

Click on the platforms you’ve chosen to fill the required fields:
- 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.

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

- Server and web conversion IDs - each conversion ID can be found in Campaign Manager → Measurement on the left menu → click Conversion tracking → click on the name of the required conversion or create a new one.

Snapchat
- Pixel ID - to get it, log in to Snapchat Business Manager → Assets → Pixels on the left-side menu → select the required pixel if you have several → copy Pixel ID.

- API token - to find Conversions API Tokens, go to Business Details → Conversions API Tokens. Here you will find all API tokens; you can copy the existing or create a new one.

Here is an example of Snapchat fields configuration:

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 Tools → Events → 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".

Here is an example of a field configuration for TikTok:

Meta
- Pixel ID - it can be found in your Meta Events Manager → Data Sources menu → see the string next to the Pixel’s name.

- CAPI Token - to get the value, choose the Pixel → Settings tab → find the Conversions API section → click on the Generate access token. For more details, check Meta’s documentation.

Google Ads & Remarketing
- Conversion ID - it can be found when creating/editing a conversion goal in Google Ads → choose “Use Google Tag Manager” → copy ID.

- Purchase conversion, BeginCheckout conversion, AddToCart conversion - here you should place conversions labels for corresponding conversion events. Conversion labels can be found in your Google Ads account → Goals → Conversions → choose the required conversion → expand “Tag Setup” → Select "Use Google Tag Manager" → copy Conversion label.

Here is an example of Google Ads fields configuration:

Microsoft Ads (Bing)
- Microsoft UET Tag ID - the value can be found in the Microsoft Ads account → Conversions → UET tag → 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:

- 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.

- 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.

- 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.

Here is an example of Pinterest fields configuration:

4.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.

5. Prevent over-reporting from other integrations
Check whether you have any additional plugins or integrations that also send events to the same platforms that are currently configured in GTM. Sending the events will lead to over-reporting. For example, Shopify has Google and Meta apps that may have active integrations for sending events. If there are some integrations like this, disable this functionality in the apps.
Along the same lines, consider what you already may have in your GTM containers or site code-base, and make sure there are no conflicts or double-firing tags.
In case of any questions, feel free to ask in our Stape Community.
Comments