Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Issue With Tag Script In Head_Scripts.post.tpl (Cs Cart Ultimate) Rate Topic   - - - - -

  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 394 posts

Posted 03 May 2019 - 02:39 AM #1



if I insert google global site tag script to head_scripts.post.tpl in my changes add on (Ultimate), it appears in the head twice, after the last <meta> and before </head> but only in the main store. In the rest of the stores it appears only before </head>.


if i use the same code in scripts.post.tpl then it appears in the head for the main store and in the body for all other stores.


Here is the code:

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

  gtag('config', 'xxxxxxxxxxx');

Any idea what could be wrong?


  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19709 posts

Posted 03 May 2019 - 06:05 AM #2

It looks like cache issue. Choose one solution (both should work) and delete the var/cache directory manually

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.