/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Place this on the page: <fb:iframe name="_tracker" width="0" src="<your url>" style="visibility:hidden;display:none; width: 0px; height: 0px" frameborder=0/> Add a proxy for Google, mine is in jsp: <%@ page import="java.io.*"%><%@ page import="java.net.*"%> <% String strID = request.getParameter( "trackID" ); %> <head><title>Trackerk</title> <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"> var pageTracker = _gat._getTracker("<your google id>"); function trackClick(location) { pageTracker._trackPageview(location); //alert( location ); } trackClick("<%=strID%>"); </script> </head> Now in flash: var request:URLRequest = new URLRequest( GetGoogleURL( ) + "&trackID=" + i_ID ); request.method = URLRequestMethod.GET; navigateToURL( request, "_tracker" );
URL: http://forum.developers.facebook.com/viewtopic.php?id=14243