Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi Michael,

    I am glad to have you as a user of my plugin!
    Tag Assistant seems to me very buggy nowadays. I see many false positive errors or suggestions in it.

    For example opening your site I do not see the suggestion you mentioned but this: “Data layer fields should be quoted”
    This message is being shown because the WooCommerce integration has a special add to cart dataLayer event that uses JavaScript variables as parameters. JS variables can not be quoted, Tag Assistant does not see this.

    As far as I can see your GTM code is in the right place, I would not worry about this message ??

    Cheers,
    Thomas

    First I put the Container code placement in the footer, and then when I found the <body <?php body_class(); ?>> line I inserted your code after it and changed the location of the code in the “General” tab in setting. So the code in this case will be in both places? Or just after the opening body tag?

    I just came across this issue but had the “non-standard implementation” error showing on only some pages. For example, the home page did not show the error and an internal sub page did. This was occurring despite having the php code added right after the body on every page.

    My fix:
    To ensure the script showed correctly on every page, I removed the if statement from within the code and everything is working correctly with no error messages.

    I changed this code:
    <?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?>

    to this code:
    <?php gtm4wp_the_gtm_tag(); ?>

    This may not be the best solution, but it did the trick in my case.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Removing the if() statement will cause your site to show an error message if you deactivate the plugin for some reason.

    Would you be so kind and put it back and check the “non-standard” message again? Maybe after clearing your cache? Tag Assistant shows false positive messages quite often, if there is an issue, it shouldn’t be related to that if statement.
    Also if you could post the address of your website, I could check this by myself as well.

    Thomas

    Thank you for the plugin, and for this post.

    Non-standard implementation error was driving me crazy. After reading this I refreshed the page and the error went away.

    I checked other pages and it showed again even after refresh. Then I rechecked the DOM issues and it disappeared.

    It seems to be very inconsistent.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Yeah, Google Tag Assistant shows false positives quite often, I would not worry that much when it shows an error.

    Sure, you should double check everything when an issue is being shown in the tool but ppl shouldn’t be alarmed on every error message ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Non-standard implementation of GTM’ is closed to new replies.