Google Analytics, there must be an easy way ?

Merchant
Depuis United Kingdom
Membre depuis mars 2021

Hi
I wonder if since 2019 this has been made easier ?
How can I install a google Analytics code (one of two ways)
1) with a google code eg AW-16570091007
2) with adding code inbetween <head> and </head> tag

I am not a big coder, and not sure if i want to tag all pages, maybe just the pages I want to verify through google advertising perhaps ? Unless someone has exp with google advertising ?

Regards all and merry xmas
Solar

Merchant
Depuis United Kingdom
Membre depuis mars 2021

While on the google subject I also need to add some code (script) so that google confirms a sale (or possible one)
I presume the best place for this is on loading the cart page
Again this needs to go inbtween <head> and </head>
Which file do I need to put this google script in ?

Example script

<!-- Google tag (gtag.js) event -->
<script>
gtag('event', 'ads_conversion_Checkout_1', {
// <event_parameters>
});
</script>

tim
Founder
Depuis Sweden
Membre depuis mai 2013
tim

You need a cookie policy manager that conditionally loads Analytics or Ads based on the user consent.

Most users put the code in the layout file. But I recommend the Site Tags add-on.
https://www.litecart.net/en/addons/292/site-tags

Merchant
Depuis United Kingdom
Membre depuis mars 2021

so... would it be possible to allow a google gtag code to be put into each product ?
So owner and google can monitor individual product if using google ads ? I havent checked yet, but it must be possible that google use different codes for different google ad campaigns, so you can monitor individual ads for different products?
EG a field on each product where this code can be added when creating a Google ad campaign ?
Then the code would be re-produced in <head> if a code exists ? If I am spending money on google advertising this would be an add on I would pay for. Rather than just a site wide google anayltics code .
Also a field to be added to the chceckout page with the same simple google ads code to register a sale , or at least interest in the google ad.

tim
Founder
Depuis Sweden
Membre depuis mai 2013
tim

For enhanced e-commerce analytics you need to code specific javascript events for each on page event you want to track. There are two addons in the add-ons store you could look into.

Vous
Ce site n'utilise aucun cookie ni aucune technologie de suivi tierce. Nous pensons pouvoir faire mieux que les autres et nous nous soucions vraiment de votre vie privée.