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

  1. shrkey
    Posted 2 years 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 1 year ago #

    That took down my whole home page.

  3. dancriel
    Posted 1 year ago #

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

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