Post by vreyesim » Thu Mar 13, 2025 10:31 am

i have 2 extension for tag manager. Opencart 2,3,0,2

Google Analytics GA4 Tag Manager Ads Conversion Pixel
https://www.opencart.com/index.php?rout ... n_id=30750
Tag manager works with this extension adding container id. Also be able to measure facebook and some platforms.

Ecommerce Google Analytics 4
https://www.opencart.com/index.php?rout ... n_id=44025
tag manager works only if paste code in the <head> of the page.

what i want is to use tag manager, collect all customer behavior connecting ads, merchant center, search console, analytics together.
what are the difference of extensions?
if i use tag manager can i collect all data?

New member

Posts

Joined
Sun Jan 28, 2018 2:34 am

Post by JNeuhoff » Thu Mar 13, 2025 5:55 pm

We have a Google Tag Manager for OC 3 which uses a data layer for tracking the following standard enhanced ecommerce activities:
  • Product Impressions
  • Product Clicks
  • Product Detail Impressions
  • Promotion Impressions
  • Promotion Clicks
  • Add to Cart or Remove from Cart
  • Checkout
  • Purchases

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vreyesim » Fri Mar 14, 2025 5:05 am

thanks but i wish to report the sales, clicks, behaviours on google side but in opencart. there are triggers and tags, and connections between applications. need google setup to use on another platforms.

New member

Posts

Joined
Sun Jan 28, 2018 2:34 am

Post by JNeuhoff » Fri Mar 14, 2025 7:51 pm

Well, according to Google Tag Manager docs:
Google Tag Manager is a tag management system that allows you to set up and manage tags on your site without changing your website's code. To use Tag Manager, you add 2 snippets of code to each page of your website.
That's after having installed 2 tag manager scripts, one in the <header> section, the other after the <body> tag.

Having said that, using the Google Tag Manager to define tags on their end is one of the most user unfriendly features Google has ever invented!

If you need certain reports, you are probably better off searching for specific OpenCart report extensions.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vreyesim » Sat Mar 15, 2025 6:05 pm

Google Analytics GA4 Tag Manager Ads Conversion Pixel
https://www.opencart.com/index.php?rout ... n_id=30750
Tag manager works with this extension adding container id. Also be able to measure facebook and some platforms.

some themes have box for <header> section, and <body> section, be able to add the tag manager codes. this extension offers connection with google analytics, google ads, facebook, snapchat so on not only tag manager (says tag manager is collecting all the data, helps to combine google tools, merchant center, ads, analytics together) . technically it adds to the header and the body. measurement is required by all customers. difficult to synchronize Opencart and Analytics Sales for reporting. if sales are 20000$, to see in analytics, 5000$ social media, 2000$ organik search, 13000$ ads.

also, 1000 visitor, 200 left in 20 seconds, 300 clicked 5 pages ...

am i wrong

New member

Posts

Joined
Sun Jan 28, 2018 2:34 am

Post by by mona » Sat Mar 15, 2025 7:59 pm

Admin : Extension =>Extension => Analytics
Google Analytics

That is where you add the code for google analytics

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Sat Mar 15, 2025 10:54 pm

by mona wrote:
Sat Mar 15, 2025 7:59 pm
Admin : Extension =>Extension => Analytics
Google Analytics

That is where you add the code for google analytics
Not good for the tag manager, which needs two scripts, one in the <head> section, another in the <body> section.
The whole issue is Google Tag Manager itself which is extremely user-unfriendly, and often useless because many users these days use adblockers and anti-tracking scripts.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by by mona » Sat Mar 15, 2025 11:30 pm

I also find the Tag manager overcomplicated and very unfriendly.
Do you mean the <noscript> tag ?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Sun Mar 16, 2025 12:40 am

Yes, as far as I remember, it's the noscript tag going into the <body> section for the tag manager, e.g. something like this:

Code: Select all

<head>
        <!-- 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-ABCDEFGH');</script>
        <!-- End Google Tag Manager -->
        ......
</head>
<body>
        <!-- Google Tag Manager (noscript) -->
        <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-ABCDEFGH"
        height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
        <!-- End Google Tag Manager (noscript) -->
        ......
</body>
And you even need some more scripting to support a dataLayer for the various events, see e.g. https://developers.google.com/analytics ... t_type=gtm . And for each of these, you also need a corresponding setup in the tag manager.

As I said, the Google Tag Manager is one of the most user-unfriendly software I have seen. We tried to make it easier on the OpenCart end with our Google Tag Manager extension, and you can add support for tags in the Google tag Manager itself for other events, originating from other sources beyond OpenCart, but it's not for the faint-hearted.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by by mona » Sun Mar 16, 2025 1:32 am

<noscript> tag isn’t required on the basis that you need javascript for the site to actually work. Pointless IMHO .. just page weight. I was not suggesting you extension is not required for extending the functionality, but for the basic use of Tag manager only the script code in the head is required. I have never had any issues, but to be fair I defer analytics anyway, so I have never tested it for absolute perfection.

For users who need enhanced detailed information it is not unreasonable for them to buy an extension, other users can skip the <noscript> tag and no additional boxes are required in Opencart default for analytics.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Sun Mar 16, 2025 1:54 am

You are right about the noscript not needed here, since Javascript is always required for OpenCart anyway.

I prefer the simpler gtag.js script for GA4, e.g. something like this, in the <head> section :

Code: Select all

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

  gtag('config', 'G-ABCDEFG');
</script>
But you still need to also add some gtag("event",...) calls for the common OpenCart ecommerce events.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vreyesim » Sun Mar 16, 2025 3:49 pm

Google Tag Manager extension, this extension is for 3., mine is 2,3

Admin : Extension =>Extension => Analytics this is for analytics script.

according to google, ads and analytics should be connected for better measurement. tag manager does this. if i use tag manager (connected ads and analytics) and add the analytics script to Admin : Extension =>Extension => Analytics,
it will coinside.

set it up in this way, gave NOT SET error in analytics, which analytics sales total are not same Opencart sales total.

if i setup Admin : Extension =>Extension => Analytics, i can not get all the information, they are not clear.

Also how can i add two scripts, one in the <head> section, another in the <body> section,
in best and right to Opencart 2,3

New member

Posts

Joined
Sun Jan 28, 2018 2:34 am

Post by by mona » Sun Mar 16, 2025 9:21 pm

The <body> tag is in the catalog/view/theme/default/template/header.tpl file

With regards to the conflict of the extension and google code you will have to ask the extension developers. We do not know the extensions, why they are not working as you expect or if they are intended to work as you expect.

Maybe JNeuhoff would consider editing his module for OC2.3 ?
What is your php version?
Are you using a theme?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by vreyesim » Mon Mar 17, 2025 4:44 am

php is 7,3, using a theme but i think not connected with theme. analytics and ads have changed a lot since version 2.3.0.2, thanks for your assitance. keep digging

New member

Posts

Joined
Sun Jan 28, 2018 2:34 am
Who is online

Users browsing this forum: No registered users and 8 guests