Jump to content

Edit History

Himanshubishtt

Himanshubishtt


Update

Hi,

This is for all who likes to add google analytics on their shop.

If you are directly configuring 'Google analytics' by the module don't do it because it'll not work properly. You will get all the insights at first and after some time it'll stop giving insights at all. (Personal experience)

So What I did is add this code in my header.tpl file in template/_partials but don't forget to add {literal}{/literal} at the starting and closing of the tag else you'll get a blank white page.

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

  gtag('config', 'UA-*********-*');
</script>  {/literal}

Hope it helps :)

 

Himanshubishtt

Himanshubishtt

Hi,

This is for all who likes to add google analytics on their shop.

If you are directly configuring 'Google analytics' by the module don't do it because it'll not work properly. You will get all the insights at first and after some time it'll stop giving insights at all. (Personal experience)

So What I did is add this code in my header.tpl file in template/_partials but don't forget to add {literal}{/literal} at the starting and closing of the tag else you'll get a blank white page.

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

  gtag('config', 'UA-134165817-1');
</script>  {/literal}

Hope it helps :)

 

×
×
  • Create New...