If you’ve implemented social sharing buttons (“Like This Page” or “Tweet This”) then you’re probably wishing you could track these metrics inside your analytics account.
Here I’m going to show you how to do it, in English and not techno-babble (though I am assuming you have a basic understanding of HTML).
Insert this file Social Tracking.js on every page of your website, right after your regular Analytics code.
A word of warning – in order for this to work, your share buttons need to look like this when you view your source code
Insert the following code straight after the file from Step 1:
This initializes our tracking so it actually goes into Google Analytics.
Watch as Analytics begins to show you how many Likes/Unlikes/Shares and Tweets your site is generating.
The official Google documentation is here: Official Docs