× Joomla Facebook Connect support forum

Topic-icon Adding Google Analytics Facebook Like Tracking Code

Support Specialist
14 years 7 months ago #14720 by alzander
Not a speed issue. A browser issue. The head of a document loads first.. the file you're including uses FB, which is loaded from the all.js file which isn't loaded until later in the body by JFBConnect. Putting the code in the System plugin like I mentioned will do things in the proper order and should be cross-browser compatible. Now, it may work, but would be up to different timings of different browsers.

Hope that makes sense.
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #14721 by mtk
for this issue, and also in general, wouldn't it be better to load JFBConnect's needed JSs in the head too?
The topic has been locked.
Support Specialist
14 years 7 months ago #14722 by alzander
No :)

There's a lot of thought that's gone into the design of JFBConnect for both browser and Facebook compatibility. The code needs to load in the body of the document because it's specially setup in a way to 'defer' the loading of the Javascript until after the full page has loaded. This allows for a faster load time (in the head section, the Facebook library would have to load fully before the page is loaded) while also allowing for the Facebook widgets (Likes, Comments, etc) to be guaranteed to be displayed on the page to the user.

What we do is recommended by Facebook, and has been only slightly modified by us for some compatibility issues that we've run into to make sure everything goes as smooth as it can.

Alex
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #14723 by mtk
thanks for the info... :)

I've added the line according to your recommendation.
The topic has been locked.
Support Specialist
14 years 7 months ago #14724 by alzander
Please let us know how it goes. We'll definitely be looking into this for the next release, so having some confirmation of it working will help us out and help to make sure it's in the next release (and you don't have to worry about modifications in the future).

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #14730 by mtk
sorry, no Social Engagements in Analytics... :(
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #14770 by mtk
OK, now I have Analytics trackings... :D

2 things we need to test out:
  1. set back the notifications to see if it still works.
  2. add tracking for "registrations"
The topic has been locked.
Support Specialist
14 years 7 months ago #14800 by alzander
mtk,
So it sounds like you're actually seeing the tracking now? Just want to make sure.. it helps us as we'll be adding this soon for the 4.1 release and some positive feedback ahead of time is always nice to have.

Definitely try with normal notifications enabled. I don't think it should cause a problem.. but if it does, we can help, and with 4.1, we should easily be able to get them all to play nice.

As for registrations, what do you mean by this.. simply clicks of the "Login With Facebook" button, or something else?

Thanks,
Alex
The topic has been locked.