Video walkthrough
Background
In order to follow this documentation, we assume you have:
Created a Google Tag Manager container on your website.
Added the Google Tag Manager script to your website.
Added your Privasee Cookie Banner script to your website. Learn how to do this here.
Google Consent Mode Disclaimer
Google Tag Manager Background Information
Google Tag Manager helps you configure when the Javascript tags on your website are activated.
Each tag needs to have at least one trigger.
Triggers listen for certain website events (e.g. the website is fully loaded). Once this event takes place the trigger determines if the tag is activated.
Triggers can be firing or exception triggers:
Exception triggers determine when a tag is NOT fired and take precedence over other triggers.
Firing triggers determine when a tag is fired (we will use these).
Triggers can be use variables. A tag will be fired or blocked depending if a condition of a variable is met or not.
Privasee uses a special type of variable, a data layer variable, to communicate between your Google Tag Manager settings and your Cookie Banner.
1. Configuring Tools and Third Parties
We will use LinkedIn Insight
as an example. However, you must follow this process for each Tool and Third Party
that is placing cookies on your website and configured using Google Tag Manager.
⚠️ For tools which are placed directly as code snippets on your website and not added via Google Tag Manager, follow this guide instead.
2. Add the Tag
Navigate to "Tags" in the side-menu and then click on "New".
Add a new tag of type "LinkedIn Insight".
Name it "Linkedin Insight Tag".
Add your Insight Tag Id or the relevant id.
Go to Advanced Settings and choose “Once per page” under the Tag firing options.
⚠️ If you want a certain tag to fire more than once per page view, you should set the tag firing option to "Unlimited". "Once per page", is our recommended setup.
Press Save on the top right. No need to add a trigger yet.
3. Create a Variable
Go to Variables in the side-menu and then New.
Add a new variable of type Data Layer Variable.
In the top left, name the variable “LinkedIn Insight Tag Variable”.
Under Data Layer Variable Name, insert "LinkedIn Insight Tag".
Set Default Value to false
Press Save
4. Create a Trigger
Navigate to Triggers in the side-menu and click on New.
Add a new trigger of type Custom Event.
In the top left, name the trigger LinkedIn Insight Tag Trigger.
Tick Use regex matching next to the Event name input field
Under Event Name, insert
(consent_status.*)
.⚠️ Correct spelling, hyphenation and capitalisation are mandatory for this field.
Tick Some Custom Events.
In the drop-down menus, set the following condition: LinkedIn Insight Tag Variable contains true.
Explanation: The variable contains the user's consent information. If the variable is true, then that means that the user opted in. If it’s false, it means they’ve opted out a specific tool. The trigger should only be fired (and tag therefore activated), if the variable=true. This information will be sent by the Cookie Banner
Press Save
Navigate to the “LinkedIn Insight Tag” and connect it to the trigger we just created.
5. Testing in Preview Mode & Submit
To make sure your Google Tag Manager setup works, you can test it in preview mode and then remember to set it Submit it to set it live.
Activate preview mode by clicking on "Preview" in the top-right corner.
Visit your website (assuming you’ve already added your cookie banner to your website)
Open the development tools of your browser and navigate to the "Network" tab.
Network requests of the implemented
Tools and Third Parties
should not be visible, unless they are categorised asEssential
in the Privasee platform, until they accept for theTool and Third Party
to place cookies or pressAccept All
on the cookie banner.