How to add Google Tag Manager to your website

Google Tag Manager lets your marketing team add and change tracking tags, such as Google Analytics or an advertising pixel, from the Google Tag Manager screen instead of editing your website. To connect your website, type the ID of your container in one setting of Viindoo. The tags then run on your website pages once your visitors have accepted optional cookies.

Who

Administrators set it up; marketers manage the tags in Google Tag Manager.

App

Website

Before you start

  • You need a Google Tag Manager container for your website. Its ID looks like GTM-XXXXXXX and is shown at the top of your workspace in Google Tag Manager.

  • You need an account with the Administrator role: the Settings menu of the Website app is only available to administrators.

How do I add my container to the website?

  1. Go to Website ‣ Configuration ‣ Settings. If you run several websites, choose the website at the top of the page first: the ID belongs to one website, so repeat the steps for each website that needs a container.

  2. In the Tracking & SEO block, tick Google Analytics. The setting reads Track visits using Google Analytics or Google Tag Manager, and the Measurement ID or Tag field appears.

  3. Type your container ID, for example GTM-K7M2P9X, in Measurement ID or Tag, then click Save.

    The Measurement ID or Tag field of the Website settings filled with a Google Tag Manager container ID

The same field takes the ID of a Google Analytics property (it starts with G-): see How to connect your website with Google Analytics. A website uses one value at a time. To stop the tracking, untick Google Analytics: the ID is removed from the website.

When do the tags run?

Your visitors decide. Until a visitor accepts the optional cookies, Viindoo tells Google that storage for analytics and advertising is denied. When the visitor accepts, it updates the consent to granted, and your tags can work with the visitor’s data.

To show visitors the choice, turn on the cookies bar of the website:

  1. In Website ‣ Configuration ‣ Settings, tick Cookies Bar.

  2. Keep Block tracking 3rd-party services ticked to stop services that track users until the visitor has given consent, then click Save.

    The Cookies Bar setting ticked, with the option to block tracking third-party services

Warning

Without the cookies bar, Viindoo considers that consent is given from the first page a visitor opens, so your tags run immediately. Turn on the cookies bar, or use your own consent solution, to respect the choice of your visitors.

Common problems

Problem

What to do

The tags do not run while you edit a page.

This is expected: the container is not loaded while you edit the website. Open the page as a visitor to test it.

The tags do not run for a visitor.

Check that the visitor accepted optional cookies in the cookies bar, and that the ID in Measurement ID or Tag is the right one for this website.

Viindoo asks for a value when you save.

Measurement ID or Tag is required while Google Analytics is ticked: type the ID or untick the box.