• Hello,

    I had this custom code to control bounce rate:

    setTimeout(function() {
    ga(“send”, “event”, {
    eventCategory: “NoBounce”,
    eventAction: “NoBounce”,
    eventLabel: “Over 20 sectonds”
    });
    },20*1000);

    With all lasts versions it worked fine but with 5.0.6 it does not work fine . The Analytics code in webpage sourcecode looks like:

    setTimeout(function() {
    ga(\”send\”, \”event\”, {
    eventCategory: \”NoBounce\”,
    eventAction: \”NoBounce\”,
    eventLabel: \”Over 20 sectonds\”
    });
    },20*1000);

    Regards,

    https://www.ads-software.com/plugins/google-analytics-for-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I can confirm that this is happening with the latest update.
    We are Using Google analytics with universal analytics not yet active.

    _gaq.push([‘_setCustomVar’, 1, ‘Bereich’, ‘CAT xy’, 3]);
    produces the output
    _gaq.push([\’_setCustomVar\’, 1, \’Bereich\’, \’CAT xy\’, 3]);

    As we need this Code to properly track our variables, we were forced to temporarily hardcode it into the plugin ??

    Plugin Version is 5.0.6 with WordPress 3.9.2

    I have the similar issue. The problem is with pre-storing escaping the quoted string.

    I changed:
    'value' => $this->options['custom_code'],

    to:
    'value' => stripslashes($this->options['custom_code']),

    on line 76 file /wp-content/plugins/google-analytics-for-wordpress/frontend/class-universal.php

    Works fine now for universal, for old ga.js changes must be done to class-ga-js.php I guess.

    Same here. I cannot get that this slipped thru to release….

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom code and " or '’ is closed to new replies.