Google Analytics by Yoast
[closed] [Plugin: Google Analytics for WordPress] Custom code (10 posts)

  1. mykro
    Posted 3 years ago #

    Version 4.2.2

    If I add custom code in the admin menu, the code single quote characters are being escaped, when the code is being written to the database.

    Consequential, the code does not work.



  2. xe
    Posted 3 years ago #

    Version 4.2.2 / WordPress 3.3.1/3.3.0

    I can confirm that problem - same for double quotes.

    I would recommend better hook-support to configure GA/plugin dynamically/manually or maybe just a text-field instead of an input field for custom code and the quotes issues fixed.

    Beside this it is a great plugin.


  3. jsruok
    Posted 3 years ago #

    v 4.2.4 / WP 3.3.1

    Problem still exists.

    And while we're at it, like Matt, I too would like to see an input field for custom code. :-)

  4. julcasa
    Posted 3 years ago #

    Yep, add the same problem and this broke my stats for 1 day.

    Here is the quick dirty fix, waiting for Yoast to update the code ;)

    In yst_plugin_tools.php, line 99, replace
    $val = $options[$id];
    $val = stripslashes($options[$id]);

    That should fix it.

    Thanks for the great plugin anyway.

  5. wolfy_
    Posted 3 years ago #

    I still have this problem, do you still see yhis problema?

  6. ssawyersj
    Posted 3 years ago #

    Yep, just verified today this is broken for me. It'd be nice to have it fixed.

  7. lovebigisland
    Posted 2 years ago #

    bump for this topic. I'd like to implement an adjusted bouncerate, and for that I need the custom code to work..

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    Try posting your own topic instead of posting to an 11 month old one.

  9. lovebigisland
    Posted 2 years ago #

    Hi Esmi,

    the reason I put it here was that this post came up very high on a search on my topic. I am guessing more people will be coming here through that channel.

    In any case, thanks for the advice. I am trying a couple of things myself on this subject and will get back if it works out.

  10. Paul Thomson
    Posted 2 years ago #

    Agree with lovebigisland on this one...

    just because a thread is old, if it's unresolved and there are useful suggestions, no reason why it should be written off... guess old threads are being treated like the old age pensioners these days.

    I would like to see a fix here to add support for page load time:
    _gaq.push(['_setSiteSpeedSampleRate', 10]);


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic