Support for Google Tag Manager
Tag Management is important so marketing staff can implement tracking code, and other marketing code, without having to mess with the template on the website.
Google Tag Manager (like other tag management software) creates a 'container' for marketing staff to set up necessary tracking code without bothering developers, or messing up the main code.
Google Tag Manager (GTM) is free, and incredibly useful for advanced online marketers needing to implement and update tracking codes in an agile environment.
Hi to all Google Tag Manager supporters!
In Kentico 10, we have made sure that there is an additional field directly on each of your Master pages, where you can insert your Google Tag Manager script.
Please have a look at: http://devnet.kentico.com/articles/all-the-small-things-vol-1
This is not quite what the community wanted. Where can I add the dataLayer, where is the enhanced ecommerce support I need on the shop thank you pages and so on. This should really be webpart that is highly configurable.
Good news! :)
After consistently improving Google Tag Manager over the past few months, the latest efforts to make mobile tagging easier than ever with Google Tag Manager has just been announced.
Visit http://webanalytics.co.uk/tag-management-solution/ to read step by step guide to install GTM into your website.
Matt Kayan commented
This may be an edge case, but in the event multiple master pages are in use, it might be nice to have this be a site-wide setting instead of a webpart on each master page.
Please do it!
Ralph Spandl commented
An extra field in the Master Page would be one solution, a web part that is placed on the Master template another. Values that must be different between staging and production we usually place in a custom setting.
Rendle Williams (formerly Anonymous) commented
We at Revium have a few comments on this good change.
A simple text area to drop the entire container snippet(s) in would be ideal - sometimes you need to customise the code so it is of benefit to be able to control the entire script.
Just as good would be to just have to add the container id with the ability to add additional ones if required..
Additionally it would be good to have an option on pages to override the GTM default script if needed.
Finally some consideration to how updates are pushed from staging to live environments – ie. It is a configuration that shouldn’t be pushed as part of any updates as there should be separate GTM containers for staging vs live.
Eugene Chudzilouski commented
It would be nice to have the possibility to add Google Tag Manager code directly to the Master page.
Google doesn't recommend to include GTM code in a <form>. That's what happens now, if you you place the code after the body tag on the Master Page. I keep seeing the following error code in Google Tag assistant: <script> tag must not be included in a <form>.
Alan Grimes commented
Adding directly after the opening body tag is a must. Going to CMS Desk and placing it after the body tag on the master doesnt work because the CMS Portal page wraps everything in a <form> tag before the page is rendered. It would be nice to be a to add the functionality to the Portal page for developers then place the container number ("GTM-XXXXXX) somewhere in the Site Settings. This way a developer could add the code once and anyone - Analyst or Marketer - could add the code to any site that requires it.
Vita - that might work...
It would be better to have a settings part where you can specify this per site (alias). And if you set a GTM-code, it renders the js, otherwise it doesn't. I'm currently playing with the idea of creating such a thing because the current GTM installer on the marketplace is just a webpart you have to place, which is not that user friendly imho. (yet another webpart in an already webpart overloaded masterpage ?)
Jason Sherrill commented
Agreed. The ability to implement GTM per Google recommended methods to be able to take full advantage of the data layer capabilities is becoming an increasingly common request by our Kentico users.
Yes, GTM needs to be a priority.
Yoki Eka commented
Yes, we need this implemented in Kentico, either a webpart or hotfixes
I attended late last week the Australian Google Analytics User Conference. Worth noting that implementing Google Analytics and it's many tags and possible customizations via Google Tag Manager is the preferred method, as opposed to managing the code directly in the <head>.
The reasons for this include:
simpler deployment of tags (code)
Although setting up Google Tag Manager is not a trivial exercise, it is worth it for the benefits over a period of time. Worth noting that this applies to Google products such as Google Analytics, AdWords etc, but also other 'certified vendors', and can also use custom code for non-certified vendors i.e. it can work with many, many different tags.
Vita, are you able to give any guidance as to when this feature will be released?
Yes, minimum requirement is to be able to add GTM code directly after <BODY> tag via Cms Desk
Performance is actually one reason to use GTM, so if the implementation you were considering was hindering that, I think you're right to reconsider.
I've already outlined the case for having this developed, so I won't rehash that again.
I hope this can be successfully developed, but for me personally, I would rather see a solution for this request given more priority: http://ideas.kentico.com/forums/239189-kentico-product-ideas/suggestions/4888990-google-analytics-e-commerce-tracking
Hi Stephen and other supporters,
Unfortunately, this won't go to the marketplace or version 8. Former solution is suboptimal performance-wise and therefore it can't go into next version. We will need to consider more general solution with fields just for this in Master page tab where you could insert content directly after <body> tag. Also, I'm moving this idea into Content section, as it is general request for editing content of the page.
If you want to implement the former solution on your site, here are suggestions for developer what to do:
- create a web part with property GTMContainer
- in OnPreRender register event OnBeforeFiltering:
OutputFilter.CurrentFilter.OnBeforeFiltering += new OutputFilter.CustomFilterHandler(CurrentFilter_OnBeforeFiltering);
- modify output HTML:
finalHtml = finalHtml.Insert(finalHtml.IndexOf("<form"), GTMContainer);
Please note that this solution might have performance impact as <body> location needs to be found in each request.
if I'm correct this is the same ideas as this one: http://ideas.kentico.com/forums/181375-on-line-marketing/suggestions/5137084-support-for-google-tag-manager
We are currently considering to add a such web part to marketplace.
Ilesh Mistry commented
Sorry I meant the PortalTemplate within the /CMSPages area not the Portal Page Template.