Sign in to follow this  
CleanCruiser

Tracking click events with Google Analytics

Recommended Posts

I'm trying to track click events on a calendar built using fusion charts, found at www.cleancruising.com.au. I don't understand flash too well which is why I can't figure out how to track click events using Google Analytics. Google's help page on the matter can be found here: http://www.google.com/support/googleanalytics/bin/answer.py?answer=55520&topic=11006. I think it requires editing the flash file itself but I'm not sure. Has anyone found a solution for this?

Share this post


Link to post
Share on other sites

hi,

Thanks for using FusionCharts.

You can always call a JavaScirpt function from links.. say, link='GATracker('YOURGAID')'

**YOURGAID = the ID that GA gives to a page : e.g.UA-1644710-1

This will call a JS function on your HTML page (you need to write the function ...

 

<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

 

<script type="text/javascript">

function GATracker(GAID){

var pageTracker = _gat._getTracker(GAID);

pageTracker._initData();

pageTracker._trackPageview();

}

</script>

 

Now, make use of the link in your Chart XML and you will find GA receiving Data

Share this post


Link to post
Share on other sites

Thanks for this suggestion. An example task currently has a value of link='/search.asp?dep_date=1/09/2008&region=1'. How do I combine this with the tracking link, eg link='JavaScript:GATracker('YOURGAID')'? Or can I add two links for the one task?

Share this post


Link to post
Share on other sites

hi,

You need to provide only 1 link to a task. Either the URL or Javascript functions. You can go for either of the 2 options.

1. use the link to call 1 javascript function and 1 JS command : The first - tracking to GA, Second calling the ASP file.

link='GATracker('YOURGAID' );location.href='/search.asp?dep_date=1/09/2008&region=1' '

2. Write the JS for GA in the Search.asp file so that when ever it it called it will execute GA Tracking.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this