Provide SoPost with your Google Tag Manager Tag ID. SoPost will expose the following data layer variables:
Data Layer Variable | Availability | Description |
| Always available | A code that represents the consumer's activity through their journey. |
| Always available | The name for the journey. |
| Always available | The ID for the journey. |
| Always available | The campaign code, e.g. |
| Always available | The campaign name. |
| Always available | The campaign ID. |
| Always available | The ID representing the consumer's browser session. When landing pages are embedded, they will get a new session every time they refresh the page. |
| Only available after | The ID for their order. |
| Only available after | The ID for the product the consumer ordered. |
| Only available after | The name of the product the consumer ordered. |
| Always available | A boolean for whether the consumer agreed to the analytics purpose in the cookie banner. |
| Always available | A boolean for whether the consumer agreed to the marketing purpose in the cookie banner. |
You will also be able to listen for the following custom events:
Custom Event | Description |
| The event fired when the consumer submits their order request. |
Allowing tags to be loaded onto the page
For security reasons, SoPost can only load content from trusted sources and this is controlled by a thing called "content security policies" or "CSPs". You will need to share with SoPost the domain(s) that the tags use before it will load successfully on the page.
For example, if you're using a custom tag in Google Tag Manager, and it's an image loaded from a URL and looks something like this:
<img
src="https://track.example.com/pixel.gif?
sessionId={{sessionId}}&
campaignId={{campaignId}}
width="1"
height="1"
style="display:none; border:0; margin:0; padding:0;"
/>
... you would share track.example.com
with SoPost so they can add that domain to the "Allowed External Content" domains list for that data capture form.
Once that has been added to the allowed list, your tag will load successfully.
Managing consumer consent
If the cookie banner has been setup with Analytics and Marketing purposes, Google Tag Manager will load when at least one of the consent purposes has been accepted.
In Google Tag Manager, you will have to use the cookieConsentAnalytical or cookieConsentMarketing data layer variables to control which tags should load based on which purpose has been accepted.
For example, if "Pixel A" that you're loading in via Google Tag Manager is only for analytics, and "Pixel B" is only for marketing, you would use the cookieConsentAnalytical
data layer variable (the value of that DLV would be true
) to only load "Pixel A" assuming the consumer had only accepted the analytics purpose in this example.