How to Track Likes and Tweets in Google Analytics

How to Track Likes and Tweets in Google Analytics

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).

Step 1:

Insert this file Social Tracking.js on every page of your website, right after your regular Analytics code.

How to include a JavaScript file:

A word of warning – in order for this to work, your share buttons need to look like this when you view your source code




Step 2:

Insert the following code straight after the file from Step 1:

This initializes our tracking so it actually goes into Google Analytics.

Step 3:

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

1 Comment

Post a Comment