If you are implementing Cookie Saver through Google Tag Manager (GTM), you might have a hard time previewing your changes before publishing them.
This guide describes how you can test Cookie Saver in production, so that the changes only activates for a special URL - one that contains "cookiesaver=test" as a query string.
After you have completed these steps, you will be able to publish Cookie Saver and access the changes by going to the following link:
Where [your-website-URL] is the full URL to the page that you are testing on.
If you would like to use Cookie Saver with Google Analytics but not use a GA backup cookie, you should refer to the Advanced preview on this page.
Create a new Trigger in GTM with the following values:
- Name: "Cookie Saver - test"
- Trigger Type: Page View
- This trigger fires on: Some Page Views
- Page URL equals the URL that you would like to test on, including the cookiesaver=test parameter
Update your Cookie Saver tag to ONLY fire on the Trigger you created in step 1 (Cookie Saver - test).
Make sure that there are no other changes than the two previously mentioned, then click Publish. In your Safari browser go to the URL you want to test on (used in step 1) and make sure that the cookiesaver=test parameter is present in the URL. Cookie Saver will now be activated, and you will be able to validate the results.
See more here: How to see your Cookie Saver setup is working
If you have decided in your Cookie Saver configuration to NOT use a backup cookie for Google Analytics, you will need to make a few more updates before publishing.
Only complete step 1 + 2 (above), before proceeding to the following step below.
Create a new Variable with the following values:
- Name: auto-update-ga-cookie
- Variable Type: Lookup Table
- Input Variable: Page URL
- 1st row in input should be the URL that you want to test on (see step 1) and the Output value should be False
- Set Default Value should be set to True
Now in your GA settings variable, update the Field to Set and set cookieUpdate to the variable you have just created (auto-update-ga-cookie).
Now go back to step 3, mentioned earlier, and Publish your changes.
Please sign in to leave a comment.