Google Tag Manager Installer

by Pull
Google Tag Manager Installer preview




Works with:

Web site


This web part adds the required JavaScript for Google Tag Manager to the required part of the page.


Google Tag Manager requires a snippet of JavaScript code to be added in a specific place on all pages. This web part can be used on the master page (or any individual pages) and will add the JavaScript snippet into the HTML where it is required.

The web part is configurable to allow the addition of a valid Google Tag Manager code, and to edit the underlying JavaScript snippet. This is useful if Google update the JavaScript snippet in the future.


Daniela Kubikova commented on

Hi Dennis,
I can't answer your question, however, I have a tip for you: the error you got after import is because you haven't ticked the "Import code files" check box in the Step 2 of the import process. If you do it, the web part will be imported into 9.0 version without problems. Maybe this information will be helpful in the future...

Dennis commented on


Unfortunately this doesn't work for K9.
The error: "Error loading the webpart 'googletagmanagerscript' of type 'pull.gtm.webparts.initscript'

I created an own version which I think does the same, this is adding the GTM script after the opening body tag.
The only thing I'm struggling with is I'll have to use it for multiple sites. So 1 main site and xx subsites. I'm not sure if you have to be able to configure separate GTM-codes for each site, or if you can manage this in GTM backend (ex. separate Google Analytics keys etc.)

Toby commented on

Really useful, been struggling with this for a while.