WordPress.org

Forums

Google Analytics by Yoast
Custom code changes after saving plugin settings (1 post)

  1. Rick Sportel
    Member
    Posted 1 year ago #

    Hi,

    I use a piece of custom code to increase the Google Analytics sitespeed sampling rate. This is a good addition to the standard GA code for measuring page load times on websites that do not have a lot of visitors.

    The piece of code I use for the plugin's field 'custom code' is:

    _gaq.push([\'_setSiteSpeedSampleRate\', 100]);

    When you save the options and open the plugin settings page again and save it another time, this code changes to:

    _gaq.push([\\'_setSiteSpeedSampleRate\\', 100]);

    If you keep saving the plugin's options it changes to:

    _gaq.push([\\\'_setSiteSpeedSampleRate\\\', 100]);
    _gaq.push([\\\\'_setSiteSpeedSampleRate\\\\', 100]);

    As a result the custom code isn't working anymore.

    Is there a way to solve this?

    Cheers,

    Rick

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

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

Tags

No tags yet.