Add Google Social Tracking

Google launched social tracking for Google Analytics in June, to measure social engagement, social actions and social pages. If you’re already using AddThis with GA, you can integrate with one line of code!

You just need to opt-in:

<script type="text/javascript">
     var addthis_config = {
        /* your GA property ID goes here: */
        data_ga_property: 'UA-123456-1',
        /* set to true to enable social tracking
        data_ga_social : true
     };
</script>

We’ll track the network (e.g. “facebook”), the social action (e.g. “share”), and the target (e.g., http://example.com/your/blog).

If you haven’t already, upgrade to the new version of GA to see the social reports:
Social reports on GA

Google’s got plenty of documentation on the new social analytics features if you need help interpreting their reports. If you’re totally new to Google Analytics and AddThis, check out our help doc on basic integration.

Questions? Comments? Drop us a line in the forums.

  • http://blog.adamwebcompany.com Adam

    This is great. Make sure to close the second comment. Should look like: /* set to true to enable social tracking */

  • http://www.cherrysolution.com Cherry Rahtu

    What do you mean by opt-in? where should I put this code to? Thanks for your advice in advance.

  • http://www.myspace.com/tontiku tontiku

    hmm..its very interesting..

  • Regan Shepherd

    Just wondering should this code be before your Google Analytics Code, after it or does it not matter? I’m thinking before…

  • http://yourhomedream.com Terry McDougal

    The source on this page has:

    var addthis_config = {
    data_ga_tracker: “gaPageTracker”,
    data_track_clickback : true,
    data_track_addressbar: true
    }

    What does it do?

  • http://www.freesurfermagazine.com Miguel Vidal

    I think you may forgot to close the comment:
    /* set to true to enable social tracking */ in your example

  • http://www.abloggersbooks.com Anne Lyken-Garner@writing blog

    This is obviously for people who know what they’re doing already. This is not explanatory enough for people like me who’re not that good with codes etc.
    I think it should be explained a little more. Like Cherry said, what do you mean by opt in and where should the code be put.

  • http://www.smokymtbarbecue.com/ Lavern, the Barbecue Smoker Guy

    Thank you for sharing this. I updated my script and look forward to seeing results in GA.

  • http://www.SumonRahman.com Sumon Rahman

    This Google Analytics also can be used on WordPress by It’s Java Script or WordPress Plugin.

  • http://www.educations.com Martin

    Very nice!
    But be sure to close the comment like Adam said or this will not work.
    Maybe someone att addthis can fix the code snippet? =)

  • http://addthis.com elizabeth

    Hey Anne,

    Feel free to email support@addthis.com so our Tech Lead can help walk you through the process.

  • http://www.rainebrooke.com Steve

    I’m not getting any stats to show up in GA. I’ve added the extra code underneath the GA code. Could someone take a look at one of my product pages and see if they see something wrong? Here’s a product page: http://www.rainebrooke.com/product/MEWCMX.html
    Thanks.

  • http://addthis.com elizabeth

    @ Terry – It incorrectly sets the Google Analytics tracking object and enables click tracking and address bar tracking. The correct way to set the Google Analytics tracking object is to do that without quotes, or to set it to your Google Analytics code – e.g. UA-123456-1

  • http://addthis.com elizabeth

    Hey Regan, the order doesn’t matter :)

  • http://grombyang.com/forum adipa

    This is great… its very interesting.. thanks

  • http://addthis.com elizabeth

    Your profile ID is set incorrectly. You have pub=rainebrooke instead of pubid=rainebrooke

  • http://www.camp_mulla.com brilliant

    it doesnt get any better than this.this is so cool.thanx

  • http://www.addthis.com wil

    hi i enjoy every thing in ur pages that is a degree

  • Yuhui

    How can this be used if I have more than one GA tracker object?

  • Chris

    What exactly are the benefits of this? I don’t see anywhere in Google Analytics to track this information. Am I missing it?