How to Track Tweets, Facebook Likes and More with Google Analytics

Don’t you wish you could track the traffic impact of Twitter, Facebook and Google+ using Google Analytics? Well now you can. Keep reading to learn how.

Google’s getting social in a big way.

Google has been quite busy lately, rolling out Google+ (Google’s social network) to a limited audience, the Google +1 button (a feature similar to Facebook’s Like button), a new Google Analytics interface and Google Analytics Social Interaction Tracking.

Google Analytics Social Interaction Tracking

This new Analytics feature allows you to track social interactions on your website, your blog or on your Facebook fan page. These actions include the Twitter button and the Facebook Like, Unlike and Send actions.

In this article, I will guide you step-by-step in adding this powerful new tracking feature to your Facebook tabs or web pages.

NOTE: Adding Google Analytics Social Tracking requires access to and modification of your web page files. It’s pretty basic, but you should be somewhat comfortable working with HTML files.

What is currently supported by Google’s Social Tracking

As of this writing, my testing shows that the following social buttons are supported:

Facebook Like, Unlike, Send

Twitter (only via the “official” Tweet button, not Tweetmeme or other third-party buttons)

Google+

I’ve not yet found a way to track the LinkedIn Share button. If anyone has had success tracking this button with the new Google Analytics, let me know in the comments!

Google’s New Google Analytics Interface and Tracking Code

In order to implement Social Interaction Tracking, you will have to update your current Google Analytics code to the latest version, and then add a few snippets of code to your HTML file.

In order to view the Social Interaction Tracking metrics, you will need to use the new Google Analytics interface, which is available as an option at the top of the page when you’re logged in to your Analytics account:

How to Get Your Updated Analytics Code

View the new Google Analytics interface by clicking “New Version” at the top right of the screen (see above image).

Click on the domain account you wish to access.

Click the “gear” icon, in the orange bar at the top right of your screen:

Click on the “Tracking Code” tab: Under “Standard” tab and below “1. What are you tracking?” select either “A single domain” (if you’re tracking a website or blog) or “Multiple top-level domains” (if you’re tracking a Facebook fan page).

Copy the code under “2. Paste this code on your site”. It should look like this, but with your “UA-xxxxxx-x” account number:

Putting the code in all the right places

The new version of your Google Analytics code should be placed before the closing </head> tag of your HTML file. (Yes, this is different. The old version was usually placed before the closing </body>, but that was then…)

Between your Analytics code and the closing </head> tag, insert this bit of code that calls the JavaScript that enables the social tracking:

The “#appId=xxxxxxxxxxxxxxx” is a random app ID that Facebook generates that allows you to access Insights for the button, but it’s not necessary for the button to work. In my example, I omit the appId value from the code, which will work fine.

IMPORTANT: You must add the snippet of JavaScript (shown below) to the code that Facebook generates so that actions on that button trigger Google Analytics:

I don’t think it matters where you put the above Twitter-tracking code, as long as it’s inside the <head></head> tags. I put it right before the closing </head> tag, after the Google Analytics tracking code and the call to the “ga_social_tracking.js” JavaScript.

A word about Google +1 tracking

As Google states on its page about Social Interaction Tracking,

Out of the box, Google Analytics provides integrated tracking with the Google +1 button. This means if you have set up both Google +1 and the latest version of Google Analytics on the same page, all +1 social interactions will be tracked automatically.

As I mentioned above, the +1 button is Google’s version of the Facebook Like button. I’ve added it to the HyperArts website and blog, but I haven’t seen much traction with it yet. However, adding it can’t hurt, and as it grows in popularity it will help your content reach a larger audience.

Troubleshooting

If you implement the above instructions accurately, you should see tracking results within several hours of initiating tracking, although Google saysit can take up to 24 hours to display results.

If, after 24 hours, you don’t see any social tracking results (and I’m assuming you will have done some testing of the buttons to ensure they work and to provide some data to Analytics):

Double-check your code. Make sure you have placed the code as instructed above, and make sure your URL values are correct.

Check the Google Analytics date range. By default, Google Analytics displays the past month of data up to the previous day. You can manually change that range to include the current day by clicking the arrow next to the date range and changing the end date to the current day:

Adding Social Tracking to your WordPress self-hosted blog: There is already a plugin for this feature.

Although this may look a bit, um, complicated, it should be pretty easy for those who are comfortable working with web files.

What are your thoughts? Do you have questions? Please leave your comments in the box below.

Thanks again Tim! Great post, you’ve found another way to streamline these tools. This will be great for showing clients their insites on Facebook, and then how that has effected their website’s traffic with Google Analytics.

I find this to be very useful, as Google has provided a more comprehensive view of how your content is being shared from share buttons. My guess is that they will expand upon this type of data.

AngieVanDenzen

Thanks Tim, can’t wait to pop this onto some of our sites & see a better picture of how our websites & social sites work together!

http://www.dynamikinternetmarketing.com/ Dino Gomez

What an amazing detailed article Tim. Thank you for providing such clear directions and for spending the time to add in screen shots. I am going to make sure to update my site to include these social analytics.

http://twitter.com/eldoren Gordon Currie

This is a great post and certainly helps many of us. I have followed Tim Ware on his website and he always provides great advice and is willing to give back. Thanks Tim and I look forward to more articles from you on Michael’s website. Cheers!

http://productlaunchthatworks.com Brian Kwong

Hi Tim, got a question, I followed your instructions and added those “like” and “tweet” buttons, but they are appearing at the way bottom of the page and the twitter button is in the middle bottom of the page, how can I position them nicely next to each other say right before or after the content? Here is how it looks like right now: http://destinationweddingplanningguide.com/destination-wedding-timeline-and-checklist-preview.php

Thanks for your help! Its obviously a great article since I took action right away =)

http://codruvrabie.blogspot.com/ Codru Vrabie

hi, Tim just a brief one, from a total novice: under social interaction//action viewing, do i need to add the twitter and facebook accounts somehow, or will they simply pop up within 24 hours?!? if i need to add, how?!? thanks it would be great for this thing to work cheers!

Ronnie

I am assuming we delete our current (old version) of GA, when we add the new one? correct.

Great information coming at the right time. Just recently I moved to a WordPress site because of the plugins for social media. Tracking clicks was one of my issues. I love this site about social media.

http://twitter.com/monininika Monika Szabadkaiova

great article and great tips! using them right away

http://www.hyperarts.com/blog/ Tim Ware

Hi Condru, Once you have all the analytics coding set up on your pages and, of course, you’re using the new “asynchronous” tracking code, then tracking will just show up in Analytics. There’s nothing you have to do within the actual Google Analytics control panel EXCEPT make sure you use the “New Version” of Google Analytics interface which you select in the top right links of any page, as illustrated in my article. Good luck!

http://www.hyperarts.com/blog/ Tim Ware

Thanks for the kind words, Gordon. Much appreciated! Tim

http://www.facebook.com/profile.php?id=1432069016 Laura Ruby Alisanne

How I Love you guys, Let me count the ways: 1. Timely, accurate info. 2. Helpful, relevant screen shots and demos. 3. User friendly. 4. Just because. By the way, we’re having a discussion in my office about tracking in GA while using custom WordPress plugins and Shareaholic plugins. We’re unsure at this point if code snippets need to be added to the GA script for each account or not. Have you any insight Tim?

http://www.boostinspiration.com Boost Inspiration

Great read. Very useful.

http://www.hyperarts.com/blog/ Tim Ware

Brian, I see your site is built on WordPress CMS. Where those buttons show up on your pages depends on how they’re coded. How did you implement them? If you did it by hand, then you’ll have to sort out the HTML/CSS issues that are causing them to show up at the bottom of your pages.

You can add plugins for these social buttons but you’ll have to make sure the plugin you install includes the code for tracking button usage via Google Analytics which is the subject of my post.

I’ll be writing up how to manually do this with a self-hosted WordPress installation. It involves edits to header.php, index.php and single.php files. You definitely have to be comfortable working within code to get it right.

So you can wait for my post, which I should have ready this week, if you want to hand code it. Or wait for a WordPress plugin that handles it. Keep checking the WordPress Plugins page.

Hope this helps!

http://www.hyperarts.com/blog/ Tim Ware

Aww shucks! Thanks Laura.

http://www.hyperarts.com/blog/ Tim Ware

Definitely!

http://codruvrabie.blogspot.com/ Codru Vrabie

thanks i’ll just wait cheers!

http://blog.adminitrack.com/ Adminitrack

Google Analytics is amazing! I use it everyday!

http://www.hyperarts.com/blog/ Tim Ware

I’m not sure what you mean by “for each account”? If you mean Google’s ga_social_tracking.js, then the default that Google provides includes Google +1, Facebook Like/Unlike/Send, and Twitter. I just posted on the HyperArts Blog an article on how to track Facebook Comments Box Social Plugin, by adding a bit of JavaScript to the ga_social_tracking.js code.

Hi Tim, thanks for this great article! One quick question – I don’t have the anywhere in my facebook code. My code currently looks like this:

Where should I put the GA code to trigger the analytics?

Liz Horgan

Tim – thanks for sharing. I’m not technically adept, so my question is more of a big picture one….is this the best way to measure engagement? Are there other tools with less set up involved? Can you speak to the options available? Thanks!

http://www.hyperarts.com/blog/ Tim Ware

I do think it’s a powerful tool for measuring engagement, what content gets shared and via which social media channel. I’d say the main benefit of Google Analytics social tracking over Facebook Insights is having all the social channels and metrics available on one screen.

You can see which social buttons perform the best (I was surprised when I finally got the LinkedIn Share Button to be tracked in Analytics, that it outperforms the Facebook Like button and demolishes Google +1).

I’m sure there are things that Facebook Insights does that GA doesn’t do. But it’s only for Facebook and access to the data is complicated by the fact that data for different Web properties is under different admin screens.

A comparison of the two will likely be my next blog post

http://www.hyperarts.com/blog/ Tim Ware

UPDATE: Although I thought I’d figured out how to track LinkedIn Shares via Google Analytics, and even wrote a post about it, it turns out that a bug in LinkedIn’s API is causing Analytics to record a share every time a page with the button loads! So we’ll have to wait for LinkedIn to fix that.

http://mommylace.com/ Lace Llanora

Tim, you are heaven sent!

This is what I was just researching for days about and you’ve made it very easy to understand. I am now reading your blog ^^

Are the above steps the only ones needed to be taken even if my website has several social buttons (like, share, tweet) say per every page and content?

I downloaded the script, and placed it on our server, so it is always available.

Paul Lombardi

Tim, we currently use the analytics code on our site however for our social media interaction, we use the Wibiya toolbar. Since there is no “like” or “tweet” button code directly in our site, I would think this addition to the tracking code would not help us.

Great article, thanks! It will be interesting to see how the “social toolbar,” or sharing bars, evolves. This method is more accurate since it utilizes the API’s directly from the source and not another third-party.

Brilliant article… I will be adding this to all the websites I have built, which interact with social media (a number I’m trying to grow!) Please could you just clarify… I have switched to the new version of analytics to copy the new code, however, I already have the old analytics code on the website, I’m assuming I replace the old code with the new, however for some reason it says:

Tracking Not InstalledLast checked: 31-Dec-1969 16:00:00 PSTThe Google Analytics tracking code has not been detected on your website’s home page. For Analytics to function, you or your web administrator must add the code to each page of your website.

I do already have tracking installed, do I just replace despite this or have both?

You do have to replace the old tracking code with the new. I recall seeing that message in the new version, about the tracking not being detected. It’s probably a bug. If you switch back to the old Analytics interface, you can check if it’s tracking and I found that mine was tracking fine, despite that message. Lots of bugs to be worked out.

But if you’re seeing tracking results with your new tracking code, it’s working.

http://www.hyperarts.com/blog/ Tim Ware

You can’t. I’d suggest using the XFBML version of the , not the iframe version.

Great – Thanks very much. I had assumed it was a gliche but was seeking confirmation before changing all the coding. Thanks for a great article, really vital to what I do.

Boben

okay thanks

http://www.internetmarketingsource.net Sam Beamond

This is awesome information. Thanks for sharing. My tech team were planning to custom build tracking tools for “Likes” etc on our site. Now they don’t need to. Thanks again!

Guest

did anyone get this to work? I followed all the steps and I’m not receiving anything although i’ve been liking/unliking my page a bunch of times yesterday. The ‘non-social’ traffic does show on my analytics so I know the basic features are working.

http://jeffroach.ca/ @jeffroach

Sorry, man, you totally lost me at “Putting the code in all the right places”

Leo

Tom, I read that the ‘ga_social_tracking.js’ file must be hosted under a secure/HTTPS server in order to work. Could you confirm that?

I hosted it on my server, which I’m not sure is secure, and I’m wondering if that’s why I’m not receiving any social traffic.

http://www.pioresimitacoes.com.br/ Piores Imitações

I gave this post a Like on Facebook just to help your Social’s Metrics, lol.

Very good text and very easy to understand.

http://www.hyperarts.com/blog/ Tim Ware

It should be hosted under HTTPS *if* you’re using this on a Facebook iFrame tab. It works fine hosted under HTTP if you’re using it on a website.

Have you tested your social buttons on your site and then looked for the tracking in the *new* Google Analytics interface? Make sure you’ve read this article closely. If you use the old tracking code or try to view social actions in the old interface, it won’t work. And double-check your coding etc. Cheers!

http://www.hyperarts.com/blog/ Tim Ware

LOL! Someone should write a song!

http://www.hyperarts.com/blog/ Tim Ware

Did you change the date range in the *new* analytics to show the date you’re testing? Remember, by default Google Analytics shows the previous month up to the previous day.

Then I’d say double-check your coding.

Hopefully, there’s not an error in the code in the article. I did check it carefully, but I’m only human

http://dreamflymarketing.com Camden Smith

So if I have WordPress although I can edit the root file and the header code because a plug in provides the buttons I can’t insert the java script for the FB like button etc. correct? Or does that go in the header also?

http://www.hyperarts.com/blog/ Tim Ware

Right, Camden. If you use a plugin for your WordPress social buttons, I don’t think you can modify the code they generate. And the button, as I describe in this article, needs an additional JavaScript function called when it’s clicked.

So you can either wait for a plugin that incorporates this code or hand code the social buttons and manually add them to the index.php and single.php WP templates.

And, as you mention, the stuff goes in header.php.

I’ll very soon be writing a post about manually adding the GA tracking to self-hosted WordPress sites.

propagandahouse

Thanks Tim great guide here – and about time Google added social tracking to their analytics!

Fiona

Hi, great article thank you .Do you know how to track QR code clicks?

Elisavov

I meant integrate it into the old GA version (synchronous tracking) — can anyone confirm this?

http://twitter.com/JessieEckert Jessie Eckert

Can’t wait to start tracking! Thanks for the informative post.

Leo

I did use the new tracking code, and did read this article very carefully. I double checked every bits of code I added, and somehow it still isn’t working…

I just don’t know what to do now. The website I’m trying to ‘social track’ is http://www.ultimatewasher.com/index.htm, if you could have a quick look at it and perhaps find why it’s not ‘social tracking’, you’d be my hero!

Leo

hey Tim,

I did check, double check, triple check everything. I’m out of ideas now. I’m using the new tracking code, followed your steps very carefully. Still not working.

I replied earlier with my website’s url for you to check if you had time but I guess that’s not allowed here. So since I can’t show you my code, I guess all I can ask now is if you can think of anything that might explain why it’s not working?

As I said earlier, basic/old version stats are working, but social ones like facebook likes/tweets are not.

I’m testing this on the website of a company called Ultimate Washer, on the index.htm page only, in case you want to have a look (and if this doesn’t get deleted again).

Thanks a lot,

Leo

http://www.hyperarts.com/blog/ Tim Ware

Leo, I looked at your code and I see that you link to ga_social_tracking.js under HTTPS. I’m not sure why you made it a secure URL, but I suggest changing that to simply http://. Everything else seemed to check out.

And you are using the NEW Google Analytics to view your tracking, and you’re setting the data range to the day you’re testing?

That’s all I can think of. Let me know if you get it working and what the issue was.

I think my code was actually working from the beginning. Your ‘like’ showed up, and that was before I made the change.

I was testing my code by liking/unliking the page with my facebook account, but I guess that doesn’t work. Maybe Google has a way to see that and does not record it.

I liked/unliked the page a few times after seeing that your ‘like’ had been recorded. Nothing happened. I then asked a friend to like the page, and that was recorded.

Anyway, you might want to add this to your article

Thanks a lot for your help!

Leo

http://www.hyperarts.com/blog/ Tim Ware

Glad you sorted it out, Leo!

Make sure you don’t have a filter set in Google Analytics to not record visits or actions *you* take from a specific IP address. That may be why you’re not seeing your own tests.

Mtavora2002

Question about the javascript code http://app.tabpress.com/js/ga_social_tracking.js, do I need to use this code from app.tabpress.com or can i save the javascript file directly from my server? My concern was, if this is not google owned server/domain… it may go down in the long run and the tracking will not work anymore…

Leo

Where would I be able to check that?

http://www.hyperarts.com/blog/ Tim Ware

You don’t have to use that host. You can upload the ga_social_tracking.js file to your own server and call that URL. Sorry for the confusion!

http://www.hyperarts.com/blog/ Tim Ware

Click on the gear/cog icon in the far right of the orange bar. On the next screen you’ll see the Profiles tab and the Assets tab are highlighted. You’ll see a “Filters” tab a few to the right of the Assets tab.

If you’ve never set up a filter, then you shouldn’t see one now. But perhaps someone else set that up for you and filtered out results coming from your home or office. This is generally the best practice to ensure accurate stats, but for testing you’d want to temporarily disable or remove that filter.

Is anyone having issues with tracking Twitter? I’ve implemented this and starting to see Likes and +1, however no Twitter yet. Have implemented and double checked code used, have ensured date range is correct and ensured no Filter is set to ignore interaction from tests.

Once more – great article! 1. You might want to bold that the tracking code placement has changed! Ouch! 2. Also, I am not seeing the schedule reports – weird. Are you? If you do can you send a screen shot? 3. In lieu of the icons, I use @addthis:disqus – I see it as an event. Is there a way to track the selection(s) in this?

Thanks!

Benjamin Hübner

Great post here! I)´m using Postrank analytics at the moment to track social interaction,but this seems to be a lot better!

This might also help you track sharing through LinkedIn. For campaign source I set “social_sharing”, for medium I set “linkedin” (or any other medium such as Facebook, Twitter, or Google+) and for campaign name “general_campaign”.

This little trick will provide you with a nice overview of the amount of shares in Google Analytics.

Alex_Votocracy

It will be interesting to see how Google+ will be used in the future. Read about how “Double Rainbow Guy” started his candidacy for president on Facebook: http://on.mash.to/nrbLpC

That plugin would say if it is set up for the new Analytics social tracking. If it’s not, you’d have to hard-code into your WordPress files: header.php, index.php, single.php (or however your particular template names the header, landing page and single-post files).

Stephen de lange

The plugin only says it is installed, I can see it is displaying the buttons, It also only displays google +1 in analytics – here is the url http://www.bgpsychologists.co.za/ maybe you can look at the source to see if I implemented your script correctly?

http://www.hyperarts.com/blog/ Tim Ware

Stephen, I checked out your source code. You won’t get the Analytics tracking for Facebook & Twitter because it’s not coded as shown in this article. Just compare your source code to the examples here.

So if the social buttons on your site are generated by a WordPress plugin, that plugin isn’t set up for tracking with Google Analytics.

http://www.debi-z.com Aviva B

Thanks so much, Tim. The WordPress plugin you gave a link to above (which actually is called “Social Media Tracking” as mentioned by Stephen in the last comment, so that’s a little confusing), puts the buttons in a rather messy order. I’m currently using the “really simple share” wordpress plugin. It’s not set up for Analytics automatically, but if I add the code in my header, etc – should it work as long as the button links are coming from facebook.com and twitter.com? (To clarify – you said it won’t work with “third party buttons”. Does that mean that I have to actually go to Twitter’s official page and get it to generate the button for me for it to work, or as long as the plugin generating the buttons is doing it from twitter.com, it’s fine?) Thanks for the help!

I can understand the amount of efforts and time you have spent to write this ‘Great’ post. Thanks a lot for this valuable information.

http://pulse.yahoo.com/_SRWDWB2AN55CC4D2THRCQC5XVE Janice Maddox

I just paid $22.87 for an iPad2-64GB and my girlfriend loves her Panasonic Lumix GF 1 Camera that we got for $38.76 there arriving tomorrow by UPS. I will never pay such expensive retail prices in stores again. Especially when I also sold a 40 inch LED TV to my boss for $675 which only cost me $62.81 to buy. Here is the website we use to get it all from, GetCent.com

http://www.hyperarts.com/blog/ Tim Ware

Third-party buttons — aka WordPress plugins — generate the code. However, as I describe in this post, the Facebook Social Plugin code needs the call to the JavaScript function “_ga.trackFacebook” and if your third-party button doesn’t include this, then you won’t get the Google Analytics tracking.This is why I say that you have to hand-code this for your self-hosted WordPress site or blog rather than use a social-button plugin UNLESS that plugin includes a call to activate the GA tracking.I hope this helps!

Oscar Iyanez

Excellent job. Very easy to learn. I´m interesting in all this stuff about google analytics and your web will be good reference to me . Thanks a lot

Eve

This is a great article, easy to understand and follow. I have the FB tracking working perfectly, but am having issues with the Twitter tracking. I have placed the tracking code in the section, and the Tweet button code in the of the page. I have tested the Tweet button myself, and asked another person to do so, but the results are not showing up in my Analytics Social section (I am definitely viewing the New Version as I can see the FB actions) What else should I check?

http://www.hyperarts.com/blog/ Tim Ware

I don’t know how you can integrate AddThis into Google Analytics. AddThis is a widget that generates its own code. It would have to integrate the GA tracking JavaScript in order to have it be tracked.

I just paid $22.87 for an iPad2-64GB and my girlfriend loves her Panasonic Lumix GF 1 Camera that we got for $38.76 there arriving tomorrow by UPS. I will never pay such expensive retail prices in stores again. Especially when I also sold a 40 inch LED TV to my boss for $675 which only cost me $62.81 to buy. Here is the website we use to get it all from, PennyHub.com

http://twitter.com/theandyreport Andy

Aaron, I wrestled with this most of today and finally figured out that I needed to leave the reference to widgets.js out on the generated tweet button code. So the reference to platform.twitter.com/widgets.js only exists in the asynchronous chunk right before the closing

Hope it helps

hal spencer

good tips here. It helps 1 week after I inserted some of these buttons manually. I wonder how it can be used with Piwik as some sites are not using GA

http://www.ivolves.com/ Ivo

Lisa & Boben – not sure if you’ll see this, but Facebook gives you 2 ways to use their like button: 1. Through an iFrame and 2. through the .

Looks like you’re using the iFrame option. When you customize your like button, at the end click on “Generate/Get Code” and select the second type of code of the two (you’ll see the tag)

http://www.ivolves.com/ Ivo

Tim – quick question. My website doesn’t utilize a standard header file that is the same across all pages, but it does have a footer that is the same on all pages. Could I place the Twitter analytics code in my footer instead of the header? I know it won’t be in the tags that way but how much does it matter?

I just don’t want to have to open every single page I have and insert that code in the ..it will take forever. Thanks!

http://www.hyperarts.com/blog/ Tim Ware

Ivo, It might work to put the tag in your footer, as it’s asynchronous. My suggestion is to test to find out for sure.

jzhaoc

good tips, there are also other services available which can automatically can track all the click on the webpage without setting up tracking for each component, like twitter and facebook button, check this out http://www.skyglue.com

Thank your for your informative, clear and concise guide of implementing the Social Interaction Analytics for Facebook Social Plugins. This article is very helpful for newbies like me.

That said, I do have some questions requiring yr advice. I’ve added the Facebook script asynchronously, as I implement multiple facebook XFBML buttons throughout my blog, (if I may) you can have a peek at my blog http://when2meets2.blogspot.com/search?max-results=7 Since the example you’ve used in this guide mentions adding the “extra” analytics script within the “standard” Facebook Like button implementation,

i.e.

I would like to ask if this would somehow be different for my case? Thanks in advance

Very nice tutorial! Do you know if appId also is optional when loading your like button with asynchronous js ? Like in this example: http://code.google.com/p/analytics-api-samples/source/browse/trunk/src/tracking/javascript/v5/social/facebook_js_async.htmlThanks!

Great post Tim – did you ever write up the post about hand coding in wordpress? I’m using the Google Analyticator plugin – any idea if it uses the new GA code or old? Trying to figure out if all I need to do is add the social tracking code to my buttons or if I need to find a new GA plugin or manually code it all.

Anyone else having problems tracking Retweets (twitter shares) using the method described above? I can now see the FB likes/unlikes/comments and +1 data in my Google Analytics social section, but I’m not seeing anything Twitter-related. Any thoughts?

My website has randomly slowed down since adding the tracking script from app.tabpress.com. The browser just hangs until it loads…I downloaded a copy of it and put it on my server to avoid those issues. Google’s scripts always load fine but app.tabpress.com must get overloaded…

Added this onto my site and it’s still not working. The socialtracking.js file it says that this code won’t work if you use the asynchronous method to load scripts, yet you’re loading in the analytics code asynchronously??

* Helper method to track social features. This assumes all the social * scripts / apis are loaded synchronously. If they are loaded async, * you might need to add the nextwork specific tracking call to the * a callback once the network’s script has loaded.Some help would be really appreciated from anyone that’s managed to get this to work.Regards, Jason

Raqwilliams

Hi, I followed your instructions on putting the code in the right place but I keep getting the response WARNING: Your HTML contains some tags that are not permitted. These have been removed from your changes. What I’m I doing wrong? Please help

I have the code setup for my client..but I was wondering if he’s able to see who liked his website (external website with like button on it) http://www.craigleephoto.com/ I’m assuming he won’t be able see who liked his website like you can see who liked you facebook fan page?

Hello! Nice post! In my blog I described how to add Google +1 Button to every WordPress blog post in respect to iNove theme. I added the +1 button manually editing php files. Probably, it could be useful for someone. The article is here – WordPress: How to add Google +1 Button to WordPress blog post. Thanks!

Jsimonoff

Tim, these instructions made it easy to get tracking to work with Twitter, but for some reason it isn’t working for FB Likes. I’m checking the network tab in Chrome developer tools, and, with Twitter, I see the _utm.gif object to by, but it never happens for Like.

I’m at a loss how to figure out what the problem might be. I’ve got the code exactly as you say, and I’m not getting any JavaScript console errors. Do you (or anyone) have any suggestions how to debug this?

Nice post Tim. I agree that social sharing data is very important to track and measure as social provides content marketing distribution and ROI, both directly and through enhanced rankings in the search results, especially with the latest Google update, Search, Plus Your World. Thanks for the detailed instructions for adding facebook and twitter buttons and how to track. I am also going to take a look at the WordPress social tracking plugin you reference at the end of your post for use on the eBiz ROI blog. Happy Internet Marketing!

http://www.threelas.com/ Putri Arisnawati

Thank you friend. this is awesome. I have practiced this. Friends… is that fine if I change it with _ga.trackSocial ?

Kabir2880

Fantastic. You are doing a great job bro!!!!!!!

http://www.ferreemoney.com/ Neil Ferree

Now that G+ has 100 million members and social shares [ FB likes, RT’s, +1’s ] is having a much greater impact on SEO this article [penned 6 months ago] shows that your radar is working better than most Tim!

The good news is your excellent 1-2-3 How To article details what’s needed to track a site’s social share activity. The bad news is the majority of my sites and my SMB clients are using widgets to display Likes, +1 & RT’s.

The social media tracking plugin sounds like it might be adequate to get the job done, else I’ll have to bone up on my how to insert java script code before the code routine. Strong work Tim!

http://www.gablabelle.com/ Gab Labelle

Great infos! Do you know if the same exists for the Tumblr Share button (installed on a WordPress blog).

JZ Hunter

Hello, I am new to all these and having hard time to create my website using Google free website creator with FB, Twitt, and other social media buttons included. The main problem is that it does not allow the user to modify the page source code (opens it as read only, at least in my case). However, it has “Apps Scripts” option and when I click on it, a page with untitled project name opens allowing the user to type scripts; do you know if this is the same as copy and past the code in the HTML file for the page? does anyone know a good source of information that has step by step instructions how to create a good website on Google and include all the social media buttons and Analytics in it? Any help will be appreciated.

Currently i have a site that Tracks Google adwords when you go directly to google adwords website, but if you go through the “newer google analytics” it will not show the tracking. How do i get all of the Google adwords campaigns from the old adwords site to the NEW google analytics site as well as track the organic traffic, but still be able to differentiate between the ADWORDS and the ORGANIC traffic. THANKS A TON>

Has anyone been able to successfully implement google analytics to their facebook, twitter, and blog pages? I have already joined google analytics and created the script/code. However, I am new to HTML and not sure how on my pages I can modify HTML/FBML/iFrame files to add the script/code.

If you have done it, please let me know how or point me to the right website to find the step by step instruction.

hzscorpion

Have you succeeded to implement the script in HTML/FBML/iFrame for your pages? I have google analytics account and have the code to insert in the source files, but not sure how I can access the HTML files to copy and past the code. Where on your pages do you find them and how do you modify and save changes? Do you know? Or a resource who shows how? I have followed all the instructions that I could find on Internet (e.g. websites like this one, youtube, etc.) but none of them has worked so far.

Tracking the “social shares” on your websites accomplishes a couple of important data points. 1) you verify the social signals your site is generating, which in turn will validate you are monitoring the correct SMM sites your prospects / clients are active on 2) you can easily check where your social shares are having the greatest impact for building mind share with your target audience.

hzscorpion

As I have asked few times already, I am trying to use google analytics (GA) that has not worked for me yet. I am looking for the information how I can add the java code created in my GA account to HTML, FBML, and iFrame for my pages. I am not in social media business but would like to track likes, friends, page views, and followers on my personal social media. The info on internet shows everything but how to modify the source files on my pages (where to find them and how access them), Anyone?

Hi thanks for the article – have there been any changes to the way one has to do this ? Then if one is sharing an article or the site is using the share – this article on Facebook function, would one use the social method or would one create a virtual page view ?

All the documentation which is still sparse on this only address’s the ‘like’ or +Google buttons which is slightly different to the share method.

Thank you Tim for the very informative article. It helped me a lot integrating the social tracking w/ Google Analytics. I have one issue though (I use the Google Chrome Analytics Debugger):

With facebook-likes, the “Social Action URL” is the SEF-pretty URL. With twitter, they are just the “/?p=[article_id]”. How could I change this? I want to see how many likes / tweets a certain article of my wordpress(.org)-blog gets, but I guess it’s dificult if they have different action-url shown in the analytics-report.

i don’t know google analytics could do that. this is very helpful article. thanks

http://www.facebook.com/adamgilardi Adam David Gilardi

Thanks Tim! Very good article. We use Omniture for tracking though… is there any method that will work for us?

The social plugins tell you how many people like, tweet or plused something, but not necessarily specifically from that page, that is the kind of data I am wanting to get, and Im not sure how to accomplish it.

Wow! I really love this article. It has really helped me tracking social networks in analytics. Just like all your other articles this was explained in detail so that a lay man like me can understand it easily. Thanks

http://www.thewebcitizen.com Ilias Chelidonis

The thing with Google is that you need to add coding to have it word properly and most of us are not good at this, i would recommend http://www.wpsocialstats.com and socialmetricspro.com , both are really good

ghost7

Hi Tim,

Thanks for the great post. I know you wrote this just over a year but is this info still accurate or has there been any changes strictly to facebook and twitter only?

Thanks

David Nielsen

There is also an easier way to track your clicks or downloads in Google Analytics. Use http://www.permly.com , they offer direct click tracking in Google Analytics without the need to change any codings of your website.

Hi Tim, Been a long time since anyone posted here so I hope you get this? Is this code still applicable October 2013.. I’m using Universal tracking. You mentioned this is asynchronous. I get the Like functionality but nothing showing up under my Social -> Plugin in Analytics after follow the code step by step. Thanks David

I want to like my webpage(personal website) from any visitors facebook account. Is it possible or not? if possible so say what is the way to done?

Rajeev Mansukhani

Great Tutorial. I have a question…. Ideally I would want a single interface in google analytics to report entire social activity. The like, share, tweet, retweet, all on one dashboard. Google Analytics is claiming to track all activity on twitter. Twitter had Twitter Analytics for paid users. Now they has it open to all. I am wondering if google analytics could track it anyways, then why would they have it paid in the first place. And why do they open it up to all users when after the google twitter deal revived, google analytics would be able to track each activity anyways. Twitter seems to be in a constant search of a revenue stream to a point where they would want to enforce USD 1 / year for the blue checkmark to your twitter account. Even though I believe this is a great way to segregate the regulars from the inactive accounts, I believe it is a desperate move to improve revenue stream. Even though this discussion is not about twitter revenue stream, do you think that the google twitter deal would quickly improve accessibility into twitter activity and therefore make twitter analytics irrelevant….

Discover which social network marketers most plan on investing in. Hint: it’s not what you think. 50 pages, 80+ charts! Get this free report and never miss another great article from Social Media Examiner.Join 340,000 of your peers.

Get Your FREE Copy of the Social Media Marketing Industry Report

Wondering how your peers are using social media? Discover which social network marketers most plan on investing in (hint: it’s not what you think). Also see how much time marketers spend on social media and much more (50 pages, 80+ charts)! Get this free report and never miss another great article from Social Media Examiner.Join more than 340,000 of your peers!