Jump to content

How to add Google Tag Manager Snippet Code


Recommended Posts

Hello All,

I want to integrate Google analytics with WHMCS. As I need to be able to setup Google Analytics Cross Domain functionality. (My Product website is abc.com and WHMCS is hosted in def.com).

So thing is the default google analytics addon won't work here, as the code snippet needs to have auto-linker tag. Also I found the best way to do will be with Google Tag Manager.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123160624-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-123160624-1');
</script>

To the footer.tpl the buttons on WHMCS pages stop working, and if I add this to header.tpl the page css stops working.

What should I do?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated