How to Track Social Interaction with Google Analytics and AddThis

google social analyticsTracking your websites social media interactions is becoming a necessary statistic in addition to your other visitor behavior demographics. For some websites, this may even be one of the more important statistics to track: A blog owner may want to see how often a post gets shared after its been published; An e-commerce website may want to know the most popular product among thousands of pages; Or even knowing how many times your page URL's have been shared in other ways.

If you use Google Analytics and implemented this manually, adding social media actions tracking can be done in several ways, including Google's Guide, which is flexible, yet not as quickly implemented as other methods. If you just need the tracking of basic actions, I suggest to use AddThis' API.

Note: Keep in mind that after implementing Google Analytics, the tracking of Google Plus interactions will already be integrated. By implementing the below snippets, tracking the actions for Facebook Likes, Twitter and other AddThis plugins you may add will track-able as well.

Social Media Actions Analytics Tracking

Although AddThis has a WordPress, Magento and other plugins depending on your CMS, you may want to implement the AddThis codes manually anyway. For example, this snippet of code will include the standard Facebook Like, Tweet and Pin on Pinterest button:

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit"></a>
</div>
<!-- AddThis Button END -->

If you have an account with AddThis, your code may have an extra snippet after addthis_widget.js for tracking stats on their website. Once you implemented your chosen Social Media plugins, you can add the following snippet of code to the footer of your site (the location you place it is optional):

      var addthis_config = {
         data_ga_property: 'UA-xxxxxx-x',
         data_ga_social : true
      }; 

Social Media Tracking in Google AnalyticsThe data_ga_property value will need your Google Analytics account number starting with UA-. You can then add other settings to your 'var addthis_config' or add other social media sharing features from the AddThis toolbox, but the above snippet of code will be all you need to track social activity on Google Analytics.

If you did the above steps correctly, you can view the interactions on Traffic Sources -> Social -> Social Plugins (see Social Plugins image).

I'm a developer at Maximus Business.

Leave a Reply

Please feel free to give us your feedback and comment below. Please keep in mind that comments are moderated. 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=""> <s> <strike> <strong>