Ready to get started?Download WordPress


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

  1. shrkey
    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 ) ) ) ) ) );


  2. tylerarnold23
    Posted 6 months ago #

    That took down my whole home page.

  3. dancriel
    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.


You must log in to post.

About this Plugin

About this Topic