Google tag manager

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

Google makes it ‘seem’ a breeze but…

where does the snippet code get pasted ???
and do I really have to paste it in the code of EVERY page ( as in 800 product listing )??

I know there is a Google Tag Manager add on.
Would this add on do the trick for me because I don’t want to pay for an add on
and STILL have this ‘where to paste code’ problem.

Just noticed something.
There doesn’t appear to be any way to see what products a buyer has clicked on.
Only when they place an item into the cart or remove it.
Is this correct ?

Please pay attention to our free module which integrates GTM to your store

Downloaded it but found there was no ‘data layer’ area.
No manual at all so had no idea how to use it.

dataLayer is created by default Google Analytics module. Do you plan to disable it?

I have already disabled it in my add ons.
I am in the process of completely removing my Google analytics account and starting over.
I am also looking for other ‘easier’ analytics software.

To dataLayer through our module please open the following file

desing/themes/responsive/templates/addons/ecl_google_tag_manager/hooks/index/head_scripts.pre.tpl

and add

<script data-no-defer>
window.dataLayer = window.dataLayer || [];
</script>

after the following string

<!-- Google Tag Manager -->

Thamk you for the advice.
Will revisit after I have managed to muddle through Google’s labyrinth.

1 Like

Hello I’m using your add on to integrate GTM to my store. I want to ask if there is a way to integrate two different GTM containers on the same site.

Unfortunately, our module does not allow to do it

Do anyone know what events should be added in tag manager for purchases? To track purchases in cs cart
should we use default dataLayer or we need to modify it or add new datalayer

@ecomlabs @CS-Cart_team could you please tell me how to track the purchase event in tag manager what is the event that I should add in tag manager, what are elements that trigger a purchase in cs cart.

I did for “add_to_cart” event but for purchase is no very clear what is/are triggers

Sorry, but I know nothing about GTM.

@CS-Cart_team no need to know GTM. What is the event that trigger a purchase in cs cart, what elements show that a purchase was made? In order to be used by external scripts to confirm that was a purchase for marketing / tracking purposes

In the settings of the Google analytics add-on the Track e-commerce transactions setting has to be enabled and once a customer opens the checkout.complete page (by default the Order landing page layout page), the purchase event will be triggered.

1 Like

Please use the following file

/design/themes/responsive/templates/addons/YOUR_ADDON/hooks/checkout/order_confirmation.post.tpl

1 Like