Skip to content

Taggrs Integration

Taggrs is a specialized server-side hosting platform designed to simplify the setup, deployment, and management of server-side Google Tag Manager (sGTM) containers. It offers a robust infrastructure equipped with data enrichment and ad-block mitigation tools to maximize data accuracy, user privacy, and loading speeds.

Create a Taggrs Account

If you do not have an account, create a Taggrs account here. Once registered, follow these steps to set up your server-side container.

Create a Taggrs Server-Side Container

  1. In the left menu, click Products.
  2. Click Add new setup.

Accessing Taggrs Dashboard

  1. Select Manual setup within the "Connect to Google Tag Manager" modal. This path is necessary to proceed with a custom subdomain configuration.

Selecting Manual Setup Method

  1. Enter your website Domain URL (e.g., yourdomain.com).
  2. Set a unique Subdomain prefix (e.g., xyz). Note that Taggrs automatically appends your domain name (e.g., xyz.yourdomain.com).
  3. Choose a Product Name to identify this setup (e.g., Yourdomain Server-Side).
  4. Select the Server location geographically closest to your target audience.
  5. Paste your GTM Server Container Config string retrieved from Google Tag Manager.
  6. Accept the required Product terms by checking the checkbox.
  7. Click Create to initialize the container provisioning.

    Container Configuration Details

    Privacy & Ad-Blocking

    • To bypass advanced ad blockers that often target common subdomains (like gtm, stape, or taggrs), use a unique, less predictable subdomain prefix.
    • This resulting subdomain URL (e.g., https://xyz.yourdomain.com) is the exact value required in the module configuration under the GA4 tab > Server Container URL field.

Setup Custom Domain

  1. Add the provided A record to your domain's DNS settings using the exact Name (subdomain prefix) and Record (IP address) values displayed in the dashboard.
  2. Click the Refresh icon (circular arrows) to verify the connection and update the status from "Configuration needed" to configured.

DNS Configuration and Validation Status

Info

The verification process may take from a few minutes to several hours, depending on your DNS provider's TTL propagation speed.

Optimize your Container

Taggrs offers advanced optimization features designed to stream and load your GTM container more efficiently, reducing browser overhead and mitigating the impact of privacy-focused ad blockers.

Enhanced Tracking Script

The Enhanced Tracking Script maximizes your tracking capabilities, helps bypass ad blockers, and extends cookie lifetimes for more accurate attribution.

  1. In your Taggrs product dashboard, navigate to the Getting Started checklist.
  2. Locate step 4, Enhanced tracking script, and click Set up >.

    Accessing Enhanced Tracking Script Setup

  3. Enter your Web GTM container ID in the GTM Code field (e.g., GTM-XXXXXXXX).

  4. Enable the Maximize your performance toggle switch to activate advanced tracking protection.
  5. Enable the Extend cookies toggle switch to restore and extend cookies on browsers with ITP restrictions.
  6. Click Save to generate your custom tracking codes.
  7. Review the generated scripts inside the 2. Implement Tracking Codes section. Copy the Head code block to a text editor to extract the required parameters for your PrestaShop module.

    Configuring Enhanced Tracking Settings

    No Template Code Deployment Required

    Do not manually copy, paste, or deploy any tracking code blocks (neither Head nor Body scripts) into your PrestaShop website files or theme templates. The module automatically handles all necessary script injections. You only need to extract the specific parameters from the code and save them within the module settings.

Mapping Taggrs Data to the Module

Example Code Only

The Taggrs code block below is an example. Do not copy it directly into your configuration. You must use the unique code generated within your own Taggrs account.

Example Taggrs Script With Enhanced Tracking Script
    <!-- Server Side Tracking by Taggrs.io -->
     <script>
        (function(w,d,s,l,i){
            w[l]=w[l]||[];
            w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});
            var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
            j.async=true;
            j.src='https://xyz.yourdomain.com/POpiGHQ1la.js?tg='+i+dl;
            f.parentNode.insertBefore(j,f);
        })(window,document,'script','dataLayer','PKB3HQ3');
    </script> 
    <!-- End Server Side Tracking by Taggrs.io -->

GTM Configuration Steps

  1. Navigate to the Tag Manager tab in the module configuration.
  2. Script URL: Locate the j.src value in your Stape script. Copy the URL starting from https:// up to the .js extension (excluding the ? and parameters).
    • Example: https://load.xyz.yourdomain.com/POpiGHQ1la.js
  3. Query ID Parameter: Identify the query key appended right after the script URL and before the = sign in the source definition.
    • Example: tg
  4. Override Tracking ID: Copy the final unique string asset identifier passed as the last argument in the self-invoking function array.

    • Example: PKB3HQ3

    Precise Copying

    When copying these values, ensure no extra spaces are included at the beginning or end of the strings. Extra spaces can cause the script to fail or trigger 404 errors.

  5. Click Save to apply the configuration.

Server Container URL

The Server Container URL routes events to your server-side infrastructure and enables the Tag Assistant feature in GTM for debugging and testing.

Based on the example configuration (using a domain without a custom path), your URL is: https://xyz.yourdomain.com

You must configure this URL in two places to ensure data consistency:

  1. In the Module: Navigate to the Google Analytics 4 tab.
    • Server Container URL: Enter https://xyz.yourdomain.com.
  2. In Server Side GTM: Go to your Server Container > Admin > Container Settings.
    • Server Container URLs: Add https://xyz.yourdomain.com.

Important: No Trailing Slash

Ensure the URL does not end with a trailing slash (e.g., /). Both the PrestaShop module and GTM settings must use the exact same string for the integration to function correctly.

GEO Headers

The GEO Headers feature sends the visitor's geographic location directly to your server-side container. This feature enhances data accuracy for localized tracking and marketing compliance without relying on third-party browser scripts.

  1. In your Taggrs dashboard, select your active container setup.
  2. Click the Features tab in the top navigation menu.
  3. Locate the Enrichment panel in the bottom-left section.
  4. Enable the checkboxes for Visitor's country and Detailed visitor location to activate the required geographic headers.
  5. Click Save at the bottom of the Enrichment panel to apply the changes.

Enabling GEO Headers in Taggrs

Configure Headers in GTM Server Container

Since you have already imported the module's pre-configured workspace, these variables already exist in your container. You only need to link them to the Taggrs geo-headers.

  1. Open your GTM Server Container.
  2. Navigate to the Variables section.
  3. Locate the pre-configured variables of type Request Header listed in the table below.
  4. Edit each variable and set the Header Name field to match its corresponding value from the table.
  5. Save the changes.
  6. Click Submit in the top-right corner of the GTM dashboard, then click Publish to deploy the configuration changes to your live container.
Variable Name Header Name
HEADER - User / Address / Country Code X-GEO-Country
HEADER - User / Address / State Code X-GEO-Region
HEADER - User / Address / City X-GEO-City
HEADER - User / Address / Postal Code X-GEO-PostalCode