WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
cv_authorname output doesn't check for apostrophes in names (3 posts)

  1. shrkey
    Member
    Posted 11 months ago #

    class-frontend.php doesn't take into account names with apostrophes when building the javascript to output to the header. These names cause javascript errors and then obviously aren't recorded in the analytics.

    The easiest fix is to change the line in str_clean to do a quick check and replace for apostrophes and remove them e.g.

    Line: 119 changes to:
    return remove_accents( str_replace( '---', '-', str_replace( ' ', '-', str_replace( "'", '', strtolower( html_entity_decode( $val ) ) ) ) ) );

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

  2. tylerarnold23
    Member
    Posted 6 months ago #

    That took down my whole home page.

  3. dancriel
    Member
    Posted 5 months ago #

    Thanks for this fix. This bug caused me to lose all GA data before today for authors with apostrophes in their name.

Reply

You must log in to post.

About this Plugin

About this Topic