Forums

Google Analytics for WordPress
Custom code (4 posts)

  1. mykro
    Member
    Posted 3 months 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.

    Regards
    mykro

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

  2. xe
    Member
    Posted 3 months 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.

    Thanks,
    Matt

  3. jsruok
    Member
    Posted 2 months 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
    Member
    Posted 1 month 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];
    with
    $val = stripslashes($options[$id]);

    That should fix it.

    Thanks for the great plugin anyway.
    Best

Reply

You must log in to post.

About this Plugin

About this Topic