• Resolved jmm70

    (@jmm70)


    Hi there

    Today I found that on one of my sites the Google Tracking code was not reporting. I got in contact with Google Analytics Support and they said this:
    Do you have wordfence installed?
    You may want to also check with their plugin support if anything in WordFence may possibly cause single and/or double quote characters in javascript snippets to be escaped by backslashes so as it’s not seen as code (as part of its security).

    Can you please tell me if this is so. When she checked the Google Analytics code on my site and she said this:

    Tracking code is there but its not tracking, for some reason it is being rendered with a number of backslashes in the code eg \\\\

    Can you please tell me if anything in WordFence may possibly cause single and/or double quote characters in javascript snippets to be escaped by backslashes so as it’s not seen as code (as part of Wordfence’s security)?
    Cheers Jodie

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Jodie,
    No, this isn’t something Wordfence does or provides as a feature or under any part of the plugin’s options. I wonder if you added the Google Analytics snippet using your theme custom panel, it could be something wrong happened while saving the panel settings. I recommend inserting the code snippet directly in your child theme header.php file, check this tutorial.

    Thanks.

    Thread Starter jmm70

    (@jmm70)

    Thanks very much @wfalaa for getting back to me and thanks for your suggestions.

    Cheers
    Jodie

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Investigating changes to code’ is closed to new replies.