Analytics
5.7K members online now
5.7K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Wordpress Multiple Author setup and reporting

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I have a Wordpress site with multiple authors. What is the best way to setup Google Analytics to track individual author page views?

 

Thank you for your help. 

1 Expert replyverified_user

Re: Wordpress Multiple Author setup and reporting

Top Contributor
# 2
Top Contributor

Hi Matthew,

the easiest way would be to use a content group or a custom dimension to store the author's name and then get reports by author.
You would need to modify your tracking code to capture author information.
Do you happen to use Google Tag Manager? If so, I have a bit of code that might help you:
https://github.com/analyticsftw/gtmforwordpress

If not, locate your header.php file in your theme and insert the following BEFORE the ga('send' ... call

 

<?php 
     print 'var authorname="'.get_the_author().'"';
?>
ga('set', 'contentGroup1', authorname);

Assuming of course you are using content group #1 to store the author name.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan