Skip to main content
Skip table of contents

Google Tag Manager (server-side)

Overview

This guide assumes a specific SGTM configuration. If your setup differs from the example provided, contact support@symbiosys.ai for assistance with event logging. The assumed configuration is detailed below.

Instructions

This guide assumes a frontend with a web container tag of type "Google Tag" that sends data to a GTM server container. The server container has a client of type "Google Analytics: GA4" installed. It also applies to setups with or without a server-side tag forwarding events to Google Analytics or another event server. The guide is compatible with frontends using either GTM or gtag.js.

Existing Google tag on frontend

Installed GA4 client that receives data from the frontend.

If your setup does not have these components already (or the gtag.js installed), contact system@symbiosys.ai.

Set up attribution fields

To ensure proper attribution, we need to link visits to orders using custom fields as outlined below.

1. Product ID field

In Google Analytics, set up a custom field for the current product ID, named “product_id.” The method is client-specific; for example, you could use custom JavaScript in GA4 to extract the product ID from the URL.

2. CRM User ID field

We use several user identifiers for attribution, most provided by Google Analytics. However, please include the CRM User ID for logged-in users in every event, using the field name “user_id.”

Tag Installation

All changes should be made in Google Tag Manager. Ensure you select the "Server" container for your website, not the "Web" container.

Import the Symbiosys Custom Template
  1. Obtain the Symbiosys tag template file (.tpl) from support@symbiosys.ai.

  2. In Tag Manager, click Templates.

  3. Click New. This will open a blank template in the Template Editor.

  4. Click the More Actions menu (⋮) and select Import.

  5. Select the .tpl file.

Create the Tag
  1. In Tag Manager, click Tags

  2. Click New. This will open a blank tag in the Tag Editor.

  3. Click Tag Configuration

  4. Under the Custom Section, select the “Symbiosys Event API” tag

  5. Enter your API key (obtained from support@symbiosys.ai)

  6. Click Triggering

  7. Select the All Pages trigger

Configuring the new tag

Once ready, submit the changes and publish the tag to your server container.

Validation

Validate that the correct data is being sent. After completing the integration, contact your Symbiosys Sales Engineer for data validation checks. Enable the ‘Dev mode’ flag in the tag settings and use the provided dev API key (and publish the tag) to avoid using invalid data in reporting.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.