WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
Non-English Authors not working? (2 posts)

  1. jimmakos
    Member
    Posted 3 years ago #

    Hi,

    Thanks for a great plugin. However although I have verified that the custom variable regarding the authors does work in my Analytics account, it does pick up only the English-written authors.

    _gaq.push(['_setCustomVar',1,'author','Κώστας-Βρουλής',3],['_setCustomVar',2,'category','podosfairo-tips',3],['_trackPageview']);

    I don't get a "Κώστας-Βρουλής" in my Analytics traffic data, although it does pick up "jim-makos".

    _gaq.push(['_setCustomVar',1,'author','jim-makos',3],['_setCustomVar',2,'category','systimata',3],['_trackPageview']);

    The language is Greek btw.

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

  2. jimmakos
    Member
    Posted 3 years ago #

    Since I didn't get a reply, I went on and took a look at the php file of the plugin, "googleanalytics.php".

    I found the following line:

    if ( $options['cv_authorname'] ) {
    						$push[] = "'_setCustomVar',$customvarslot,'author','".GA_Filter::ga_str_clean(get_the_author_meta('display_name',$wp_query->post->post_author))."',3";

    ...and changed "display_name" to "nickname" since I use Latin letters for the members' nicknames. There are a lot more options to change that to, according to "the_author_meta" function of WordPress found here.

    I'll let you know if that works, in case someone deals with the same problem as me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic