X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Implement Google Tag Manager (https://forum.x-cart.com/showthread.php?t=65105)

NightFire 10-12-2012 06:29 AM

Implement Google Tag Manager
 
Hi All,

Does anyone has any experience implementing Google Tag Manager? What is the best place to put the tag manager tag? And did anyone success to parse e-commerce values into the tag manager as well?

Thanks for the replies.

-Niki

cflsystems 10-12-2012 08:19 AM

Re: Implement Google Tag Manager
 
I am testing it right....

microdaq 02-02-2014 09:38 AM

Re: Implement Google Tag Manager
 
How did the testing go?


Is there a tutorial available for adding Google Tag Manager with the Ecommerce Variables into X-Cart.

Steve

Gervs 03-10-2017 01:10 PM

Re: Google Tag Manager for XC5
 
Can someone explain why Google Tag Manager is so difficult to get setup on this platform. Its rediculous.

Ive tried everything, including adding the

{literal} {/literal} before the script code, and nothing.

In fact the Google Tag Manager code breaks my site, and turns it into some lines of code.

Luckily, removing the tag manager code fixes the problem.

But seriously, can someone post a concise tutorial for this. I see there are lots and lots of people who have been trying to do this since 2008!!!!

qualiteam 03-14-2017 10:44 PM

Re: Implement Google Tag Manager
 
How did you add the code?

2coolbaby 10-24-2017 11:26 PM

Re: Implement Google Tag Manager
 
Did anyone get this to work? Heck I can't even figure out which google adwords instructions work right. There are several here, but none in awhile. When I tried the code, it was a mess in google console. I would prefer just to do the tag manager like with the rest of my website. x-cart is definitely not google code friendly.

cflsystems 10-25-2017 05:44 AM

Re: Implement Google Tag Manager
 
This is pretty clear what to do - https://developers.google.com/tag-manager/quickstart

In XC4 you can add this snippet to home.tpl for your skin. This will add Google Tag Manager to the site. You should configure any tracking within your Google Tag Manager account not XC

1994Z28 08-09-2018 12:29 PM

Re: Implement Google Tag Manager
 
My Analytics guy is trying to help me set up Google Tag Manager and told me to make the following changes to the home.tpl file in my skin (Reboot):


Install Google Tag Manager
Copy the code below and paste it onto every page of your website.
Paste this code as high in the <head> of the page as possible:

<!-- Google Tag Manager -->
<script>(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=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-*******');</script>
<!-- End Google Tag Manager -->

Additionally, paste this code immediately after the opening <body> tag:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-*******"

height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->



(GTM-******* represents my google tag number)


When I tried to add the code (even in various positions in the <head> section) the site would not load.


Any ideas and has anyone got Google Tag Manager to work?

qualiteam 08-10-2018 11:07 AM

Re: Implement Google Tag Manager
 
Quote:

Originally Posted by 1994Z28
My Analytics guy is trying to help me set up Google Tag Manager and told me to make the following changes to the home.tpl file in my skin (Reboot):


Install Google Tag Manager
Copy the code below and paste it onto every page of your website.
Paste this code as high in the <head> of the page as possible:

<!-- Google Tag Manager -->
<script>(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=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-*******');</script>
<!-- End Google Tag Manager -->

Additionally, paste this code immediately after the opening <body> tag:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-*******"

height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->



(GTM-******* represents my google tag number)


When I tried to add the code (even in various positions in the <head> section) the site would not load.


Any ideas and has anyone got Google Tag Manager to work?



When inserting this code you should wrap it into {literal} Smarty tags, otherwise Smarty engine will try to parse expressions that start with curly brackets.

1994Z28 08-14-2018 10:31 AM

Re: Implement Google Tag Manager
 
Thanks Alex, that coding change worked perfectly ... so I then disabled the x-cart Google Analytics module (to avoid double-tracking with the new tag manager) but my Google Analytics guy is now saying:


"It sounds like we need your x-cart Google Analytics module activated to have the ecommerce functionality in the Google Analytics code, and I need to be able to put cross-domain tracking functionality in the Google Analytics code by means of Google Tag Manager, but as it stands now, we can't do both at once or we'll have two Google Analytics tracking codes running and they'll send 2 pageview hits instead of one - essentially doubling your pageviews in the Google Analytics reports."


The issue here is that customers routinely go from one of our other static web sites, to our X-Cart site to place their order, which sends them to the credit card processor's site for payment processing, then returns them to the X-Cart site when completed. So we need Google Analytics to track this process as one continuous customer engagement - not 3 or 4 separate ones.


Anyone have any ideas?


All times are GMT -8. The time now is 02:56 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.