0

I have correctly included the GA tracking code snippet found here (http://support.google.com/analytics/bin/answer.py?hl=en&answer=1008080&rd=1) and it is working (& has been for years)

I have recently set up the Facebook Javascript SDK for running code when the 'like' button is clicked - this also works. In the same FB.Event function, I included googles _gaq.push _trackSocial as follows...

FB.Event.subscribe('edge.create',
function(response) {
    // do some stuff, this is working.

    // google track likes - this isn't working
    _gaq.push(['_trackSocial', 'facebook', 'like']);
}
);

No errors in console.

So either analytics takes a long time to register the likes & I haven't waited long enough or something is wrong.

Since the FB.Event & my JS functions ARE WORKING & _gaq.push does not give any errors - I am unsure what the problem is.

In Google Analytics Traffic Source > Social > Social Plugins then click on the 'Social Source' tab & it shows only Google.

RiquezJP
  • 261
  • 3
  • 12
  • 1
    FYI: Install the Chrome browser and the [GA debugger plugin](https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna). You can then see if the tracker is sent in the console in real time. Later it will show up in the reports. –  Sep 19 '12 at 01:11

2 Answers2

0

24 hours later the answer is evidently that Analytics takes a long time to update.

Although I have not changed anything Analytics is now showing Facebook as a Social Plugin.

So it just takes a really long time to show up in analytics.

RiquezJP
  • 261
  • 3
  • 12
  • You can change the date range to include the current date and you won't have to wait 24 hours. By default it doesn't include 'today' – Simon_Weaver Aug 22 '15 at 17:13
0

If you're using the 'newer' analytics.js vs the legacy ga.js version you need to use ga('send'...) instead of _gat.push(...).

I would have expected you to get an error in your situation, but this may help others.

ga or _gaq.push for Google Analytics event tracking?

If you're trying for instance to use the social-tracking.js from StuffedWeb alongside analytics.js then you'll need to convert it to the new call style.

Community
  • 1
  • 1
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689