For ssGTM

For ssGTM

Installing Trackingplan for ssGTM

🛠

Before getting started with the installation, we recommend reaching out to our support team. This will help ensure everything is set up correctly from the start and help you avoid potential issues.

When the Modified tag sends a request, it messages the Trackingplan Tag with a copy of the request, which then forwards it to the Trackingplan Server.
When the Modified tag sends a request, it messages the Trackingplan Tag with a copy of the request, which then forwards it to the Trackingplan Server.

Watch this video for a step-by-step installation from scratch:

How to Install the Trackingplan Tag

The Trackingplan tag captures GA4 requests and collects messages from modified tags, sending all data to the Trackingplan server for monitoring.

You have 2 options: installing it from the Community Templates, or importing it manually using the .tpl file.

Manual Installation

Import the template into your SSGTM container

  1. Download the template from UntitledUntitled
  2. In your SSGTM container, go to Templates → New → Import from file
  3. image
    image
  4. Select the downloaded template file
  5. Save
  6. image

Create a new tag using the template:

  1. In your SSGTM container, go to Tags → New
  2. image
  3. Select the Trackingplan template
  4. image
  5. Add your Trackingplan ID
  6. image
  7. Set appropriate trigger rules (typically "All Events”, “All Pages")
  8. image
    image
  9. Click Save
  10. And don’t forget to publish your container

How to modify the tags you want to monitor

This step should be done on all the templates you want to monitor with Trackingplan.

  1. Open the tag template (this works on any tag)
  2. image
  3. Add the Trackingplan Snippet to the top of the template (see code below)
  4. image
  5. Remove/Comment the original sendHttpRequest and sendHttpGet methods.
  6. image
    image
  7. Enable the Send/Receive message permission
  8. image
  9. Save
  10. image
  11. And don’t forget to publish your changes

Trackingplan Snippet

/* Trackingplan snippet to be included in on top of templates to be monitored by Trackingplan */
const sendHttpRequest = (url, options, body) => {
    require('addEventCallback')(() => {
        require('sendMessage')('tp_request', { url: url, body: body });
    });
    return require('sendHttpRequest')(url, options, body);
};
const sendHttpGet = function (url, options) {
    require('addEventCallback')(() => {
        require('sendMessage')('tp_request', { url: url });
    });
    return require('sendHttpGet')(url, options);
};
/* End of Trackingplan snippet */

How to debug & verify everything is running properly

To ensure everything is running properly, make sure to see the following in your preview mode:

image
  1. Each time a request is sent from one of your modified tags (1 in the image), there is one from Trackingplan happening in its payload (2 in the image).
  2. For each Incoming Request (3 in the image), there is a matching Trackingplan request (4 in the image).

← Previous

For AppsFor Apps