How to Add AddThis Analytics in Google Analytics?

AddThis is social share widget that allows your visitors to easily share your content with others via email, social networks etc.

Add this has it’s own analytics that allows you to see what social share option e.g. Facebook, email, etc are visitors using. However, since you are already using Google Analytics, won’t it be nice if you can see your reports right within you Google Analytics reports.  That’s exactly what AddThis and Google Analytics integration does.

Add Google Analytics AddThis Integration

You don’t need anything fancy in Google Analytics.

  1. Create an account at AddThis
  2. Get your code
  3. Add following lines of code within your add this code
  4. <script type=”text/javascript”>
    var addthis_config = {
    data_ga_property: ‘UA-XXXXXXX-X’,
    data_ga_social : true
    };
    </script>

Here is full sample code:

<!– Google Analytics BEGIN –>
<script type=”text/javascript”>
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-xxxxxxx-x’]);
_gaq.push([‘_trackPageview’]);

(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!– Google Analytics END –>

<!– AddThis Button BEGIN –>
<a href=”http://addthis.com/bookmark.php?v=250″>
<img src=”http://s7.addthis.com/static/btn/v2/lg-share-en.gif” width=”125″ height=”16″ alt=”Bookmark and Share” style=”border:0″/>
</a>

<script type=”text/javascript”>
var addthis_config = {
data_ga_property: ‘UA-xxxxxx-x’,
data_ga_social: true
};
</script>
<script type=”text/javascript” src=”http://s7.addthis.com/js/250/addthis_widget.js#pubid=gapremium”></script>

Here is what you will see in Google Analytics

Please follow and like us:
Pin Share

You may also like...

Leave a Reply

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

RSS
Follow by Email