Google Analytics via Google Tag Manager in Blocs

Hello forum,

I just finished setting up the Google Tag Manager and connecting it to the website I am currently working on in blocs. Blocs and the Tag Manager seem to get along just fine.

As I have not seen it mentioned in the forum yet, here is quick how to:

Within the Google Tag Manager

  • Create an account (handy if you want to use GTM on several websites)

    The account will hold the container ID for your website.
    When you create the account choose the “web” option.

Hitting the “create” button will give you the GTM code you need to insert in blocs (after you agreed to Google Tag Manager Terms of Service Agreement).

Now, switch to Blocs and copy the code to each page.

  1. Open the page settings

  2. Click on “Add Code”

  3. Copy the GTM code in the head and body

That is pretty much it. The rest is done in the Google Tag Manager.

Within the Google Tag Manager

Of course you can set up all kind of different tag types, which is why I think it is very interesting to take a look a the Tag Manager.

3 Likes

Thank you for taking the time to add this info.

Do I copy the whole code or just tje part that you Highlighted?

@Robboxxx

You need to copy the whole code.
The highlighted part is your ID.

Thanks. I was a bit confused.

This setting panel has changed. Anyone know how to do this now?

Hello, it is not exactly clear to me where to put the two pieces of code from Tag Manager.

The first one in de Header (page settings), but where to put the second piece of code?

Thanks

Well, I placed the second code in the ‘footer’ section and it seems to work.

So, it’s my first question and my first answer on this forum. :blush:

1 Like

I have switched to Matomo Analytics since I posted the description above but I suppose you should enter the second piece of code in the footer section.

Edit: You beat me to it :wink:

Thanks area49, I figured it out myself. But it will help others in the future who want to install it. :+1:

1 Like