Add content in the <head> area

Avatar
  • updated
  • Completed
I would like to add a Google Tag Manager script to the page so that we can take advantage of the various Google services (Analytics, Webmaster Tools, etc). Is there a way to add this script to the <head> of every page? Or somewhere else like just before the closing </body>? I am aware I could modify the layout and add a custom script but this does not add content to non-editable pages (eg. the article page).
Pinned replies
Avatar
Vladimir Mullagaliyev co-founder
  • Answer
  • Completed
Quote from MrChris2012
Thank you. 

<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-J8W9" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
        <script type="text/javascript">
            (function (w, d, s, l, i) {
                w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
                var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
                j.async = true;
                j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
            }) (window, document, 'script', 'dataLayer', 'GTM-J8W9');
        </script>
Completed.
You are able to do it here https://exclaimer.userecho.com/settings/project/customcss/ on tab "External".
Avatar
Sergey Stukov co-founder
  • Under review
Give US your Google tag manager insertion code and we will embed it to all pages of your community.
Avatar
MrChris2012
Thank you. 

<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-J8W9" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
        <script type="text/javascript">
            (function (w, d, s, l, i) {
                w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
                var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
                j.async = true;
                j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
            }) (window, document, 'script', 'dataLayer', 'GTM-J8W9');
        </script>
Avatar
Vladimir Mullagaliyev co-founder
  • Answer
  • Completed
Quote from MrChris2012
Thank you. 

<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-J8W9" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
        <script type="text/javascript">
            (function (w, d, s, l, i) {
                w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
                var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
                j.async = true;
                j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
            }) (window, document, 'script', 'dataLayer', 'GTM-J8W9');
        </script>
Completed.
You are able to do it here https://exclaimer.userecho.com/settings/project/customcss/ on tab "External".
Avatar
Vladimir Mullagaliyev co-founder

Hello,

We've added a simple integration with Google Tag Manager. More information in our change log http://feedback.userecho.com/topics/6870-userecho-changelog/#comment-25347