Analytics & Testing

Track Multiple Authors with Google Analytics

On a multiple author site, each author can post in a multitude of categories, it’s nearly impossible to identify each author’s contributions to the overall strategy of the site. I was doing some testing with this recently and identified a nice simple way of measuring traffic by each author.

Google Analytics has the ability to track additional virtual pages. This is typically utilized to track outbound links to advertising or calls to action to landing pages. However, by simply manipulating your Google Analytics code on your single post pages, you can track the popularity of individual authors.

Typical GA code on a page looks like this:

var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._initData();
pageTracker._trackPageview();

You can insert a ‘virtual’ pageview by adding the following:

var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._initData();
pageTracker._trackPageview("/by/author/Douglas Karr");
pageTracker._trackPageview();

To customize for WordPress:

var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._initData();
<?php if (is_single()) { ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
pageTracker._trackPageview(?/author/<?php the_author() ?>?);
<?php endwhile; ?>
<?php } ?>
pageTracker._trackPageview();

UPDATE: A couple of commentors pointed out that it didn’t work – I had to add the famous WordPress loop in!

This will only load the necessary pageview on a Single Post page. You may want to extend this to monitor the first post on the home page as well, but this is at least a start. Within Google Analytics, you can open a Content Report and simply filter it by “/author/” to get a list of all of the authors and their associated page views, bounce rates, time on page, and conversions.

Now you can begin rewarding your authors for the actual contribution they bring to your organization! Let me know if you run into issues using WordPress – I wrote the code and didn’t test it.

Douglas Karr

Douglas Karr is CMO of OpenINSIGHTS and the founder of the Martech Zone. Douglas has helped dozens of successful MarTech startups, has assisted in the due diligence of over $5 bil in Martech acquisitions and investments, and continues to assist companies in implementing and automating their sales and marketing strategies. Douglas is an internationally recognized digital transformation and MarTech expert and speaker. Douglas is also a published author of a Dummie's guide and a business leadership book.

Related Articles

Back to top button
Close

Adblock Detected

Martech Zone is able to provide you this content at no cost because we monetize our site through ad revenue, affiliate links, and sponsorships. We would appreciate if you would remove your ad blocker as you view our site.