• Resolved andrewmperryman

    (@andrewmperryman)


    Hello,

    I have your plugin installed and fully configured however after running checks I have found that my GA snippet (as below) along with my UA-code is not loaded into the visitors browser.

    I have a child theme so I have tried to eliminated the possibility that it can’t find the head.php by copying across my parent theme header.php reflecting the same structure.

    How does the script get injected or loaded?

    Any help would be much appreciated as the opt in does not seem to work for our site

    I will do the needful and carry out a clash check on the whole site later but failing that I would appreciate any pointer if a clash check shows nothing up.

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

    The page I need help with: [log in to see the link]

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

    (@andrewmperryman)

    Hello,

    I have found after looking at the code you use ajax to inject the GA script snippet.
    I also found the plugin that clashes with your plugin, it is called “WPMovieLibrary” unfortunately this is an established core plugin for our website and I don’t know what the clash is, be it jquery or an action.

    Any help would be much appreciated as regards a way to isolate the clash or run your plugin in an isolated mode to avoid the clash.

    this is an excellent plugin and I would be willing to pay the moove developers to help with a solution if possible for our non-profit expat library here in France.

    Andrew

    Thread Starter andrewmperryman

    (@andrewmperryman)

    hello,

    Extra info for you regards the above clash.

    this was taken from the web inspector console


    <br />
    <b>Deprecated</b>: Non-static method Moove_GDPR_Controller::moove_gdpr_get_scripts() should not be called statically in <b>/home/lasouter/public_html/wp-includes/class-wp-hook.php</b> on line <b>286</b><br />
    {"header":"<!-- Global site tag (gtag.js) - Google Analytics -->\r\n<script async src=\"https:\/\/www.googletagmanager.com\/gtag\/js?id=UA-xxxxxxxxx-x\”><\/script>\r\n<script>\r\n window.dataLayer = window.dataLayer || [];\r\n function gtag(){dataLayer.push(arguments);}\r\n gtag('js', new Date());\r\n\r\n gtag('config', 'UA-xxxxxxxxx-x’);\r\n<\/script>","body":"","footer":""}

    VM2963:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.success (main.js?ver=1.1.1:1)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at y (jquery.js?ver=1.12.4:4)
    at XMLHttpRequest.c (jquery.js?ver=1.12.4:4)
    (anonymous) @ main.js?ver=1.1.1:1
    i @ jquery.js?ver=1.12.4:2
    fireWith @ jquery.js?ver=1.12.4:2
    y @ jquery.js?ver=1.12.4:4
    c @ jquery.js?ver=1.12.4:4
    XMLHttpRequest.send (async)
    send @ jquery.js?ver=1.12.4:4
    ajax @ jquery.js?ver=1.12.4:4
    n.(anonymous function) @ jquery.js?ver=1.12.4:4
    (anonymous) @ main.js?ver=1.1.1:1
    init @ main.js?ver=1.1.1:1
    fire @ main.js?ver=1.1.1:1
    loadEvents @ main.js?ver=1.1.1:1
    i @ jquery.js?ver=1.12.4:2
    fireWith @ jquery.js?ver=1.12.4:2
    ready @ jquery.js?ver=1.12.4:2
    K @ jquery.js?ver=1.12.4:2

    Plugin Author Moove Agency

    (@mooveagency)

    Hi there,

    Thanks for your comments. Could you please update the plugin to the latest version, the fix is included in the latest version of the plugin.

    I hope it works.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Third party GA snippet not written to header’ is closed to new replies.