What is the Cookie Control SDK Default Container?

How does the Cookie Control SDK Default Container work?

What if I already have a Tag Manager Container set up with all my tags?

Adding the Default Container to your own Google Tag Manager account

What changes do I need to make to the default tags?

What if I don't use some of the services that have default tags?

What if I need tags to only fire on particular pages of my website?

How do I know that I have set it up correctly?

What is the Cookie Control SDK Default Container?

The Cookie Information Cookie Control SDK via Google Tag Manager is a pre-defined container that you can then import your own Google Tag Manager account and use to become compliant with GDPR and DPA regulations.

This has been done because we are aware that the Cookie Control SDK in its current form can be quite daunting and somewhat confusing for those who are not already familiar with Google Tag Manager and how it is configured.

By providing a pre-defined container with common Tags that have the SDK already applied, a lot of the work has been removed from the process of ensuring that you do not set cookies (other than necessary) before your website visitors have given their consent.

How does the Cookie Control SDK Default Container work?

The Cookie Control SDK works by adding a blocking trigger (that relies on a custom variable) that can be added to Tags within your Tag Manager container. By adding these tags, you are telling Google Tag Manager that they are not allowed to fire until a certain condition is met e.g. do not allow the Facebook Pixel script to fire unless the user has consented to marketing cookies.

Usage

What if I already have a Tag Manager Container set up with all my tags?

If you already have a Tag Manager Container set up with all your tags in it, then please choose the JSON file that only contains the Cookie Control SDK Triggers and Variables.

Once you have imported these (merging them with your container - not overwriting your current container), you will need to go through each tag and apply the appropriate category.

Adding the Default Container to your own Google Tag Manager account

If you have not already created a Google Tag Manager account, please do so by using the following link and signing in with your Google account details: tagmanager.google.com

To add this container to your Google Tag Manager account, you will need to download the JSON file in the following repository: Cookie Information Tag Manager SDK Default Container.

Once you have downloaded the JSON file, go to the Admin panel of your Google Tag Manager account:

On the right-hand side of the page, you will now see settings for your container. Please select the option "Import Container"

Click "Choose container file" and select the JSON file that you downloaded earlier. Please also choose whether you would like to have this container imported into your existing workspace or a new workspace.

You can also select whether you would like to overwrite everything in your existing workspace or merge the contents of the Default container into it instead.

If you choose a new workspace, you'll be presented with the option to give it a name and add a description:

If you decide that you're importing it into an existing workspace, you will be presented with a menu where you can select which workspace it should be added to:

Once you have picked, a little further down you should see the changes that are about to be made if you import the container (I have chosen the existing workspace and said that it should be overwritten in the below example):

Finally, add a description to your container.

What changes do I need to make to the Default Tags?

Because this is a base container with everything that you will need in place from the beginning, the only thing you have to do is:

  1. Ensure that your measurement IDs for different services are added to the tags. All that the tags contain are the scripts for each service - if you do not add your specific ID for the service, it will not know which account it should be tracking results to.

  2. Add any other conditions that a tag is allowed to fire on. As an example, if you have a sign-up form and use HubSpot to gather information about these sign-ups, it would be a good idea to add an extra condition that the tag can only fire the page yourwebsite.com/sign-up

What if I don't use some of the services that have default Tags?

If you do not use some services for some of the Tags already included then you will need to delete them so that they do not set cookies for services that you do not use on your website:

What if I need Tags to only fire on particular pages of my website?

Referring to point 2 above, you will need to adjust the trigger slightly and add some extra conditions that need to be met (as well as consent to a particular cookie category). On the left-hand menu, click the Tags option.

Choose the tag you would like to adjust and scroll down if need be. Under the heading "Triggering", click on the pencil icon in the top right corner:

Hover over the Firing Trigger and click on the > arrow:

You will then be presented with the Trigger Configuration menu:

Click on the + to add a new condition:

How do I know that I have set it up correctly?

If you have made your changes correctly, you should see the results by opening a new Incognito window and visiting your website.

Before accepting or declining cookies, right-click and choose "Inspect", then go to the Application tab and click on the "Cookies" menu. You should see that only necessary cookies are loaded. Once you accept cookies, the rest should load.

Did this answer your question?