• Resolved MDC2957

    (@mdc2957)


    Hi, I am not sure, but maybe a bug in the last plugin update. On my checkout page, I notice the click here to login, and click here to enter coupon code links aren’t working, they don’t drop down the forms like normal. When I look at the console, I see this error referring to gtag, which I suppose has to be google tag manager.

    Uncaught ReferenceError: gtag is not defined
    at HTMLDocument.<anonymous> (VM1350:986)
    at i (jquery.js:2)
    at Object.fireWith [as resolveWith] (jquery.js:2)
    at Function.ready (jquery.js:2)
    at HTMLDocument.K (jquery.js:2)

    Not a code person so I don’t know what this means. Please advise?

    Thanks,
    Mike
    Note: I tried to use the contact form on your site but it failed to submit the form.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter MDC2957

    (@mdc2957)

    I found the problem. It is this plugin:

    https://www.ads-software.com/plugins/enhanced-e-commerce-for-woocommerce-store/

    Specifically, this problem:

    https://www.ads-software.com/support/topic/console-error-after-update/

    My question is, does your plugin have anything to do with the one linked above since they’re both dealing with Google analytics, I think? Very confused.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    That plugin is a completely different plugin which is basically about adding Google Analytics tracking into your sites (although I have seen that it has some sort of Google Tag Manager features as well)

    With my plugin, you can track users with Google Analytics but also with various other platforms as my plugin is not specifically bound to Google Analytics itself (you add you GA tracking on the Google Tag Manager UI which is independent from my plugin). With a native Google Analytics plugin, you have less setup tasks but also limited to that one measurement system. You can read more about those differences in my blog post:
    https://gtm4wp.com/for-beginners/google-analytics-plugin-or-tag-manager-plugin-benefits-and-disadvantages.html

    “gtag is not defined” message usually means that either in some WordPress plugin/theme settings or inside your Google Tag Manager container you have a so called Google Global Site Tag which is the unified way to track with Google Analytics, AdWords and DoubleClick. It is kind of “mini tag manager” that should not be mixed with a real tag management system like Google Tag Manager.

    Some people are confused as for example AdWords shows such a gtag code in its interface, many people think that the AdWords remarketing/conversion tag in GTM is obsolete and put the gtag code into a custom HTML tag which usually breaks everything. If you have a custom HTML tag inside your GTM container, you should be able to switch to a native Google Analytics/AdWords/Floodlight tag and remove the gtag code.

    Hi,

    I don’t know if it can help but I unchecked the first option in Enhanced Ecommerce Google Analytics (Add Global Site Tracking Code ‘gtag.js’ (Optional)) and saved. Then I checked it and saved again and the error disappeared.

    I don’t know why it solved my problem but I have no more issues anymore.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug in last update?’ is closed to new replies.