AbdFatah / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Tracking code - better Google Web Toolkit GWT integration #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Name of API affected:
  Analytics Data Collection / ga.js tracking code.

Request summary:
 It would be nice to have ga.js tracking code with better GWT integration.
 e.g. allow for Asynchronous loading callback to javascript or GWT
application once the  ga.js tracking code is loaded.

Use Cases:
 Web applications created with Google Web Toolkit, there are many.
 Allow for application to control when tracking code APIs is loaded.

Description:

 The standard example require developer to add 
 <script type="text/javascript"> to html page of the GWT application.

 Even so Asynchronous Tracking can be used there are no direct way for
application to know if tracking code is loaded other then use timer and
check for existence of variable "_gat".

 I managed to create a GWT code that injects ga.js into working GWT
application at the time when developer of application decides to do so.

(Apache License, Version 2.0)
https://pyx4j.com/viewvc/trunk/gwt/pyx-gwt-commons/src/main/java/com/pyx4j/gwt/c
ommons/GoogleAnalytics.java?view=markup

The idea to inject JS was taken from google Ajax API loader
 http://code.google.com/p/gwt-google-apis/

Anyway Thanks!
Vlad

Original issue reported on code.google.com by skarzhev...@gmail.com on 12 Feb 2010 at 7:06

Attachments:

GoogleCodeExporter commented 9 years ago
Removing an obsolete label that was used when these issues were in the 
gdata-issues project.

Original comment by jrobbins@google.com on 21 Jul 2011 at 10:04

GoogleCodeExporter commented 9 years ago
Changing the issue type to match the organization desired in this project.

Original comment by jrobbins@google.com on 21 Jul 2011 at 10:06