_ga.trackFacebook();
echo "";
on the tutorial they recoomend putting it just inside the <fb:like> tag, but looking at the source code of their page, they just place it at the page's header (which is logically good since it's just JS).alzander wrote: Our forum strips out a lot of text, so I don't know exactly what you were looking for. However, the _ga.trackFacebook(); code looks like it can be placed anywhere on the page. I wouldn't put it in the asynchronous call to the Facebook at all, but would simply include it in the header, or even just in the body of the document in any script tag.
I'd say that ideally, it would actually go in the same area as the Google Analytics code to make sure that library has properly loaded first, but I haven't tested what you're trying to do at all, so can't really say the best course.
Hope this helps,
Alex
www.joomla.co.il (it's in Hebrew, but look on the right, below the login)alzander wrote: We still haven't done any testing with this. Can you post (or PM) your page with the code inserted, and we'll see what we can do?
yeah, I said they are not adding the code in the fb:like tag.alzander wrote: The code definitely shouldn't be added 'within' the fb:like tag, as that would cause a mess of problems. That is what they say, but even if you look at their code snippets, the ga.trackFacebook call is outside (right before) the fb:like opening tag.
the code is after the ga_social_tracking.js, simply like this:alzander wrote: As for the code working itself, if you put it in the head, it would have to be after the ga_social_tracking.js inclusion. If that's still not working, if you have Notifications setup in JFBConnect for new comments and likes, try disabling that (temporarily) and see if that lets the Like's start showing. Both use the same notification system, which should be fine, but it's our best suggestion to try changing to see if it helps.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Google Analytics Social Button Tracking -->
<script src="https://s3.amazonaws.com/ha_js/ga_social_tracking.js"></script>
<script type="text/javascript">_ga.trackFacebook();</script>
...
</head>As suggested, I've disabled the notification on the above website, so if you click LIKE we would be able to test it...alzander wrote: Let us know how it goes, and we'll be looking into something like this in a future release as well.
Alex
FB.init({appId: '{$appId}', status: true, cookie: true, xfbml: true, oauth: true, channelUrl: '{$channelurl}'});{$subs}{$resizeCode}FB.init({appId: '{$appId}', status: true, cookie: true, xfbml: true, oauth: true, channelUrl: '{$channelurl}'});{$subs}{$resizeCode}
_ga.trackFacebook();just curios: is it a speed issue?alzander wrote: Clicked.
Not sure if the Analytics code, as shown on your page, will work as it's possible the Facebook Javascript library won't be fully loaded by the time your code tries to 'attach' to it.
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.
