Topic-icon Adding Google Analytic Tracking

Active Subscriptions:

None
14 years 10 months ago #11913 by fb_22424954
Hey Alex,

I'm trying to figure out which file I need to edit to add a google analytic script to the like buttons.

Could you point me in the right direction.

Script Being Added:
[code]script type="text/javascript">_ga.trackFacebook();
The topic has been locked.
Support Specialist
14 years 10 months ago #11921 by alzander
Weird, just got this question in the Joomla 1.5 forum :)

We haven't tested that code, but it actually doesn't deal with Facebook directly and I wouldn't recommend adding it to JFBConnect at all. If you're using the newer Google Analytics code with the initialization code for Analytics in the head section of your page, I think you can simply add that code you put above any where in the body of your document. This can either be by putting it directly in your template's index.php file, or using something like the Custom Code Joomla module which let's you add Javascript easily to any page (like the custom HTML module with Joomla).

Again, we haven't tested that, but think the above should get you going.. and it's perfectly fine if that runs on pages even without Like buttons, just so you know.

Good luck, and definitely let us know how that goes!
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #14661 by mtk
Replied by mtk on topic Adding Google Analytic Tracking
alzander,
I've just replied to that post over 1.5 forum, but I'm curios:
can't you add the code in the page's header when needed (i.e when a like module is active, or when a content plugin is on, or just with a simple general setting)?
The topic has been locked.
Support Specialist
14 years 7 months ago #14667 by alzander
We could, but that code isn't part of Google Analytics, it requires a whole other script, which is loaded from Amazon Web Services. So, we'd need to evaluate the script, what it does, integrate it into JFBConnect or just include directly, and then test a lot. It's easy on paper, but there's a lot more to it than just "Add Script if we see {JFBCLike} on page".

Hope that helps explain,
Alex

The thread mentioned by mtk:
www.sourcecoast.com/forums/jfbconnect/jf...tracking-code#p14666
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #14669 by mtk
Replied by mtk on topic Adding Google Analytic Tracking

alzander wrote: We could, but that code isn't part of Google Analytics, it requires a whole other script, which is loaded from Amazon Web Services. So, we'd need to evaluate the script, what it does, integrate it into JFBConnect or just include directly, and then test a lot. It's easy on paper, but there's a lot more to it than just "Add Script if we see {JFBCLike} on page".

Hope that helps explain,
Alex

The thread mentioned by mtk:
www.sourcecoast.com/forums/jfbconnect/jf...tracking-code#p14666

you're probably right on this :)
The topic has been locked.
Support Specialist
14 years 7 months ago #14676 by alzander
Yeah, not saying that it can't, or won't, be done.. just that it's a little more difficult than it sounds. It's our job to make the difficult easy though, and we do agree that Google Analytics tracking is a good thing though and is a good feature to have. Hopefully in the 4.1 release later this year..

Thanks again for your input!
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 7 months ago #14680 by mtk
Replied by mtk on topic Adding Google Analytic Tracking
btw, the suggested external code (the one you need to test to integrate) in this post is located at amazon: s3.amazonaws.com/ha_js/ga_social_tracking.js

but there's a Google version: code.google.com/p/analytics-api-samples/...cial_tracking.js?r=3

(practically the same)
The topic has been locked.
Support Specialist
14 years 7 months ago #14694 by alzander
Thanks for the link. Definitely like things provided by Google themselves. Looked over the code earlier, and it seems pretty straightfoward. Have a tracker issue for this in JFBConnect v4.1 due out later this year. If it's simple, it will make it in there.

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

None
14 years 7 months ago #14788 by rdbean
Subscribing to this thread since it's going to be very cool :-)
The topic has been locked.
Support Specialist
14 years 7 months ago #14797 by alzander
We'll definitely be looking into this for the 4.1 release, and post to this thread as we test and get code that anyone may want to implement on their own. Definitely will be a good promotional point for 4.1, which we always like.. so thanks for pushing for it and working with us on the details!

Alex
The topic has been locked.