Keyword and Author Performance in Compendium with Google Analytics

Monday, November 23, 2009 by Douglas Karr
 Compendium is a platform leveraging both multiple authors as well as multiple keyword phrases.  Any decent social media consultant would ensure that analytics is properly installed and capable of measuring the impact of the platform.

With advanced analytics applications like Webtrends, Omniture and Coremetrics, monitoring different dimensions of your social media strategy are fairly simple.  However, Google Analytics, it's challenging to measure beyond a single dimension.  Google actually realizes this and advises its users to build multiple accounts when you wish to analyze multiple dimensions.

For Compendium, my advise is to have three accounts:
  1. General account
  2. Author Tracking account
  3. Keyword Tracking account
Compendium's robust templating system allows you to customize your Google Analytics code and you can insert each account independently in the footer.  The code looks like this:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXXX-XX");
pageTracker._initData();
pageTracker._trackPageview();
<cpdm:choose-page-type><cpdm:when-page-type-is-item><cpdm:for-each-post>
var authorTracker = _gat._getTracker("UA-AAAAAAA-AA");
authorTracker._initData();
var cpdmauthor = "<data:author/>";
authorTracker._trackPageview("/by/author/"+cpdmauthor);
</cpdm:for-each-post></cpdm:when-page-type-is-item></cpdm:choose-page-type>

var keywordTracker = _gat._getTracker("UA-KKKKKKK-KK");
var path=location.pathname;
var arrayPath=path.split("/");
var keyword=arrayPath[2].replace("-"," ");
keywordTracker._initData();
keywordTracker._trackPageview("/by/keyword/"+keyword);

} catch(err) {}
</script>

The yellow highlighted code adds pageviews with the 'by/author/authorname' format in the specific account that you apply it to.  Make sure that's not your primary account, though.  If you do that, you'll add pageviews and subsequently reduce your bounce rates because each page that tracks both pageviews means that there's no opportunity for a bounce.

The green highlighted code adds pageviews with the 'by/keyword/mykeyword' format in the specific account you apply it to.  It does this by splitting up the URL structure and pulling the keyword out of the URL.  If Compendium's URL structure changes, this will need to change as well.  Again, you'll want to put this in its own account.

Tracking by author will allow you to track conversions (be sure to multiply your conversion codes for each account as well) by author and keyword - this will provide your team with priceless stats on which of your authors are the highest converters and which keywords are the highest converters!  Concentrating and rewarding your strategy in those areas will help drive a successful inbound marketing strategy!

 

Comments for Keyword and Author Performance in Compendium with Google Analytics

Leave a comment





Captcha