To conclude the Cookie Saver installation, you need to deploy the Tag Manager script. This consists of adding the script in your source code and configuring it.
This guide explains how to deploy the Tag Manager script on your site without the use of a Tag Manager.
Before starting, please make sure the Preload script is in place. The Preload script is used to guarantee that your cookies are always up-to-date when the page loads.
The process
1. Add the Tag Manager script
As high as possible in the <head> section, insert the Tag Manager code, which can be copied from your Cookie Saver account (can´t find it?). The script is inserted after the Preload script.
2. Configure, add cookies and deploy
Immediately following the Configuration script, initialize, add your cookies and start the service.
If you need only a very basic configuration, please, check out our ready-for-use quick start code. Otherwise, we recommend you to proceed as described.
First, Cookie Saver should be configured to your domain. In most cases, the following will suffice:
acq("init", { "endpoint": "INSERT ENDPOINT" });
Where:
- "endpoint" is the NS domain that you have chosen to use with Cookie Saver (e.g. for cookiesaver.io we have chosen to use fpc.cookiesaver.io)
More information on the initialization can be found here.
At this point, cookies can added one-by-one. In most cases it is enough by adding a name and the wanted expiration days.
acq("addCookie", { "name": "INSERT COOKIE NAME", "expirationDays": INSERT EXPIRATION DAYS });
Where:
- "name" is the exact cookie name (e.g. for Google Analytics its "_ga")
- "expirationDays" is the wanted expiration in days, (e.g. for Google Analytics its two years, equal to 730 days)
If you are struggling with this step, you can read more about different configuration possibilities when adding cookies.
If you have no idea about which cookies to save, you can start by identifying which cookies that have been affected by ITP. You can also read more about how to configure and add platform-specific cookies. E.g. Google Analytics cookies, Facebook cookies, and Google Ads cookies.
Lastly, after you added the cookies that should be saved, Cookie Saver should be started by adding the following:
acq("start");
Complete example
This is what a complete configuration can look like when including cookies for Google Analytics (_ga), Adobe Analytics (AMCD_DE7...), Facebook (_fbp, _fbc) and our Cookie Consent.
What´s next?
Congratulations! You have now completed the installation and should have Cookie Saver up and running.
Validation
As a last step, you may want to check that everything is working correctly and implemented lawfully. To do so, please, visit the Validation section.
Comments
0 comments
Please sign in to leave a comment.