Quick Tip: Tracking Google +1 Button in SiteCatalyst

BY Kevin Rogers
KEYSTONE SOLUTIONS

Google recently released the +1 Button for use on websites. Google describes the +1 Button as being shorthand for “this is pretty cool” or “you should check this out.” OK that sounds good to me, but after I add it to my site, how do I know how my visitors are using the button? Sure I could go to every page of my site and see what the number is, but that doesn’t tell me how many times visitors clicked the button again to remove a +1, essentially turning the button into a -1, and that doesn’t put the information into SiteCatalyst.

Here’s how to do that.

The great thing that Google has done is to include the ability for a callback function to be fired once the button has been clicked. Looks like the perfect place to include a SiteCatalyst Custom Link tracking function.

After the button has been added to your site, you will want to add some code to the button itself and a function to your s_code file to track the actions of the button.

In the button, include the name of your function in the callback variable, like this:

<g:plusone callback="plusoneTrack"></g:plusone>

Now you can add that function to your s_code file (make sure it is not in the s_doPlugins(s) section of your file):

function plusoneTrack(obj) {
  var s=s_gi(s_account);
  s.linkTrackVars='eVar1,eVar2,events';
  s.linkTrackEvents='event1,event2';
  s.eVar1=obj.state;
  s.eVar2=obj.href;
  if(s.eVar1=="on"){s.events='event1';}else{s.events='event2';}
  s.tl(obj,'o','Google Plus One Click');
}

This function uses 2 eVars and 2 Events. You will want to change the eVar and Event numbers to match your specific implementation.

Here’s what the function will do. When a visitor clicks the +1 Button and the click is registered with Google, we will pass to SiteCatalyst that the button was clicked “on”, what the specific URL was that received the click, and a Success Event that represents a +1 Click.

What happens when the visitor clicks the button again, essentially giving me a -1 vote? In that case the function will pass to SiteCatalyst that the button was clicked “off”, what the specific URL was that received the click, and a success event that represents a -1 Click.

Next, in SiteCatalyst you will create a Calculated Metric, which is ‘+1 Button Total Clicks’. Regardless if a click was a +1 or a -1, we just want a total number of times the button was clicked. Since we are capturing how many +1’s in an Event and how many -1’s in another Event we can easily create a Calculated Metric that sums the two.

What reports will I be able to get from this?

→  You will have the new Calculated Metric Report, which tells you total +1 Button Clicks.

→  You will have a Custom Conversion Report which has the values of “on” and “off” that you can add in your new Calculated Metric of +1 Button Total Clicks to see overall for your site how many times visitors click either option.

→  You will have a Custom Conversion Report with all of the URL’s that received a +1 Button Click that you can add in the two Success Events that represent the +1 Clicks and the -1 Clicks so you can see which URL’s your visitors recommend and which ones they changed their mind about.

 

Enjoy!

4 thoughts on “Quick Tip: Tracking Google +1 Button in SiteCatalyst

  1. Pingback: Everything Webmasters Need to Know About the Google +1 Button for Websites | SEOptimise

  2. Pingback: Everything Webmasters Need to Know About the Google +1 Button for Websites | Zenbix Ltd | Affordable Bespoke Website Design - Nottingham

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>