Google Analytics’ Custom Variables may seem daunting for a web marketer with relatively little technical knowledge, but they’re actually quite easy to implement and use (especially if you’re using Wordpress). This post will show you how to easily track blog post authors using Custom Variables, and also explores some of the reporting possibilities.
Why track authors?
There are many reasons to track blog post authors that apply to your content strategy, including:
Highlighting editorial success
Rewarding those who have performed well and highlighting their success is an effective means of creating enthusiasm within an organization towards SEO and content promotion. Tracking authors can make this type of report much easier to produce.
Evaluating freelancers
Is the freelance writer you’re paying worthwhile? If you’re outsourcing work to a number of freelancers, are some better at optimizing their copy for search than others? What do user engagement metrics say about the quality of their work?
Identifying successful guest authors
If a guest post author is driving a particularly large amount of traffic to your site, it may be because they have a strong social media presence to promote to or that they link from their own authoritative domain. If this is the case, why not ask them to provide content on a regular basis?
How do I set up Custom Variables?
Please don’t be deterred by this section. The plugin implementation is as easy as ticking a few boxes, and the hard-coded route isn’t particularly difficult, either.
Google Analytics for Wordpress Plugin
I would imagine that many Wordpress installations use Joost de Valk’s GA Plugin. This plugin is the easiest way to track authors, so if you haven’t already got GA tracking on your site, I’d recommend installing it. You can find GA tracking by going to Plugins > Add New > search for “Google Analytics for Wordpress” and install the top result.
Activate the plugin and go to it’s Settings page. Select “Show Advanced Settings” and you will see a table called “Custom Variable Settings.” All you need to do is select “Author Names” and hit the update button.
There are a bunch of other tracking options here such as tags, categories, and publication year. You may wish to turn these on while you’re in there as you may find a use for the data later down the line; it’s better to have it ready and waiting than to not have it at all!
Wordpress hard-coded
If you’ve hard-coded your GA tracking onto your Wordpress site, you can make a quick and simple edit to enable author tracking.
This example assumes that your GA tracking code is in the footer.php file. You can edit this by going to Appearance > Editor and selecting your footer.php file from the right hand list. Your GA code should look something like this:
Insert the following code between the two lines that start with _gaq.push:
<!--?php
if (is_single()) {
$author = get_the_author();
echo " _gaq.push(['_setCustomVar', 1,'Author','". $author . "', 3]);";
}
?-->
Your code should now look like this:
Select “Update File” and you’re done.
A quick note iif you care about what this bit of PHP does: it checks whether the current page is a blog post (is_single()), gets the name of the author (get_the_author()), and then prints the Google Analytics Custom Variable code with the author name inserted using echo.
If you’re not using Wordpress…
If you're not using Wordpress, you’ll typically need to use whatever server side language you’re using to populate and print the Custom Variable within your Google Analytics tag. It should go in the same place as shown in the example above. The line you need to write looks like this:
_gaq.push(['_setCustomVar', 1,'Author','
The only caveat here is that the number one denotes with Custom Variable slot you’re using for this information. Google Analytics gives you 5 slots (1-5), so if you’re using other custom variables, ensure that you don’t have conflicting tracking that uses the same slot.
Reporting
Custom reports
The first report you probably want to see is pageviews by author; that is to say, whose content is the most popular? You can do this quite easily through Custom Reporting, in which you use Pageviews as your metric and Custom Variable (Value 01) as the Dimension Drilldown:
Adding Landing Page as a second dimension drilldown lets you click into each author to see which of their pages are attracting the most traffic. You can make this report even more interesting by adding user engagement metrics such as bounce rate and average time on page, which could be used as an indication of content quality.
Segmentation
If you want to browse Standard Reporting showing only data for a specific author, you can create a Custom Segment with Custom Variable (Value 01) as your filter. This way you can look through their keywords, referrers, content etc.
Tailored dashboards
Tracking authors also allows you to create dashboards which are tailored to a specific writer by applying filters when you create widgets. Essentially, you can create any widget and filter to show a certain value for Custom Variable (Value 01).
As an example, I’ve created a dashboard for a ukulele songbook website I made a while back, showing only data for songs written by The Beatles. (I need you to imagine that The Beatles are writing for my site. Thanks.)
This dashboard shows:
- Acquisition: where is traffic to their articles coming from? Traffic types, top referrers, top keywords
- Behaviour: what’s happening when they get to the site? Bounce rate, avg. time on site, visit and pageview trends, top pages
- Outcomes: what’s the result of their work? In this case, AdSense revenue and top AdSense pages, but this could also be conversion and eCommerce data.
This makes dashboards a whole lot more interesting for a particular writer, so hopefully they’ll come back and check it more often. Why not schedule it to email to them on the day they tend to plan their work?
Most linked to authors
Exporting this data and combining it with other sources can produce useful reports. For example:
- Use a Custom Report with a flat table, Landing Page and Custom Variable (Value 01) as dimensions and Visits as the metric.
- Export up to 5000 rows of this report with the URL hack.
- Use a VLOOKUP() to combine this data with an export of the Top Pages report from Open Site Explorer.
- You can then use a Pivot Table to show the most linked to writers. Select the whole table, then click Insert > Pivot Table > Click ok on the wizard. Then use your author column as a row label, and drag inbound links into values. This will give you a list of authors by the sum of all links their content has generated.
Obviously there are many, many different ways to use this data. Are there any ways you use the above data differently? Leave your good tips in the comments!
I am agree with you about tracking guest authors for our content strategy. You have discussed nicely about the wordpress plugins and usage of that plugins for tracking their authors. So indeed a great post and topics that you are covered are really useful for us.
Great Post Rob,You first defined "Whys" and then "Hows" its enlightening.
This post links Author Performance Evaluation & its use to These methods will be more useful to those blogs which are grown up boys (after providing quality content for long) & have developed group of people who are in turn writing for them.
Uber kudos and +1 for the Wordpress plugin suggestion. I use this (and another which simply counts unique views) and don't know what I'd do without its highly insightful data!
If you use Wordpress, you should check out the plugin 'blog metrics' which shows an overview of your bloggers and some raw data.
This one is also by Joost, https://wordpress.org/extend/plugins/blog-metrics/ - looks like it hasn't been updated in quite so time though.
I have used socialcrawlytics.com for a much faster scrape of my own site or competitors sites. It tracks authors as well and how much of their content is shared. Works for me.
great tutorial, just one remark - people who don't consider themselves WP experts shouldn't mess with editing the php files. I've seen some webmasters turning it to such a big mess and it wasn't always easy to recover via the FTP.
Either way just make sure you got someone to keep an eye on how you edit your WP PHP files.Besides that, awesome post.
This looks really cool. i would surely try this soon.
Good post. Page level stats are very important. I want to point out that the custom report with pageviews and visits as metrics is probably going to confuse most people. You can't have a "visit" to a page level metric. Visit in this case means "entrance" - i.e. how many times was that author's post the landing page for a particular visit, as opposed to than "this many visits occurred where X author's posts were viewed." I would use Entrances rather than visits as a metric (the term makes more sense in this context). The only way to know how many visits saw a least one of the author's post during their visit is to create an advanced segment (custom variable value = author name) and look at visits (metric) to a visit level dimension (like medium)
Authorship is no doubt going to be important moving forward.
It's advisable to get every author on your site set up with G+ authorship to future-proof yourself and hopefully provide some mutual authority.
I'm glad you picked up on the engagement factors, like bounce rate and time on site. From my experience, Pageviews is a great base metric, but without understanding the behaviour of these viewers there's not much to take away!
What about tracking social shares for each post too? This can be done in WordPress using plugins like https://wordpress.org/extend/plugins/social-sharing-stats/ or https://wordpress.org/extend/plugins/social-metrics/
They're not necessarily 100% accurate but they will give you an idea of which posts are creating a social buzz! We all know how important that is!
Thanks for the great post Rob!
Authors tracking and guest blogging is good but without proper onsite optimization it's not effective anyway...
Perhaps it's time for a post on optimization of multi-author sites. Should you list all authors on one page or does each author get their own? Should author names be categories or tags? How do you balance the needs of guest authors who might have SEO goals that are different than the site's goals?
Hi Mark. Managing guest authors is tricky, but as for your other questions all authors should have their own page, listing their posts and ideally containing some extra info about them. You could pick up traffic from searches for their name, especially if they're well known in their industry. In Wordpress, it should be neither a category nor a tag page - you should be able to access an author page by clicking their name in the byline. I suspect there are Wordpress plugins to help you make these pages richer. Rob
This is great, but why post the GATC in the footer? Best practices says it should be in the header...
Hey Rob
Will it be good idea to invest in Guest Bloggers? Am confused a bit over this strategy of moving forward with content writing.
Thanks a ton!!
The subject is very interesting, I do not have much information about this but the article has been very helpful to start with.
Some good points. Plugin is sure to help some people out.
Nice post.It have good ideas.Thank you for sharing this informative comments with us.Iam looking forward for your new updates.
Its really tricky way to get quality content writer with his popularity. Ultimately, this tracking can help to find the best author who exactly viewed by potential users. Thanks a lot for sharing entire guidance including code.
Definitely agree with you about tracking guest authors. If you get someone writing for your site that has a powerful social presence and getting your content spread/shared why not have them contribute more frequently? It's a win-win for everyone.
As a WordPress Developer and an SEO, I find this quite useful. I'm actually launching a community-based blog in the near future, so i'll be implementing this into my own site very soon.
Thanks, I love technical posts :)
Rob, can this be setup to also add tracking of social shares performed by individual author's post?
Hi there - maybe check this documentation out.
Then create Custom Reports to view by author or Custom Segments. Rob
very good idea congratulations on the blog
Tracking author name breaks Google Analytics terms of use - see https://www.google.com/analytics/terms/us.html, point 7 - Privacy.
I'm using some random hash for this purposes.
No it doesn't.
You're tracking content on your own blog based on "author" as a variable - not collecting data about individuals or site visitors.
Sorry, you're right
Smart stuff here, Rob! I had been thinking about a way to do this, and you just made it really easy for almost everyone. If you can't do it yourself, find a dev who can and implement this.
Well done sir. Tip of the hat to you!
Really Great post Rob, Rob we will add these code in google analytics we can track which Author writes most popular content for our blog, but Rob is this effect other property of GA?
I can only echo John's comment above. Great stuff Rob, very useful information indeed. Thanks!
Pretty useful stuff! Thanks!
Thanks Rob for this nice post.
Nice post Rob. I know that content is the best important thing for site so content can make famous your site also content can make spamming to your site.
thanks for share your relevant thoughts with us.
It is very good idea to track potential writer and invest on on them to get more output.
I definitely agree with that. As a matter of fact even if those who are not professional trained to write but can attract a quantity of readers are worth to be listed in records. You never know if when you will need them. Some of the sites like Semphi, Squidoo and Blogspot is where you can find such writers because they have good visitors.