Title: Custom code and &quot; or &#039;
Last modified: August 22, 2016

---

# Custom code and " or '

 *  [miguelgaton](https://wordpress.org/support/users/miguelgaton/)
 * (@miguelgaton)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-code-and-or/)
 * 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://wordpress.org/plugins/google-analytics-for-wordpress/](https://wordpress.org/plugins/google-analytics-for-wordpress/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Minneyar](https://wordpress.org/support/users/minneyar/)
 * (@minneyar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-code-and-or/#post-5310020)
 * 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
 *  [mmatej](https://wordpress.org/support/users/mmatej/)
 * (@mmatej)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-code-and-or/#post-5310065)
 * 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.
 *  [nowton](https://wordpress.org/support/users/nowton/)
 * (@nowton)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-code-and-or/#post-5310072)
 * 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.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [nowton](https://wordpress.org/support/users/nowton/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/custom-code-and-or/#post-5310072)
 * Status: not resolved