WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
Custom code changes after saving plugin settings (1 post)

  1. Rick Sportel
    Member
    Posted 7 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.