[Dojo-interest] user google analytics

Kurt Hoyt kurt.hoyt at gmail.com
Tue May 15 10:53:05 EDT 2012


I think you have two options:
1. Replace the implementation of dojo.xhr with your own that renames the
existing implementation, runs your code (you'll have access to the args
object, etc.), then calls the renamed dojo.xhr.
2. If you are using Dojo 1.7, I would think dojo/aspect would help you. You
could add a "before" advice on dojo.xhr where you do your work before
dojo.xhr is called.

On Tue, May 15, 2012 at 10:12 AM, Brent Clements
<brent.clements at gmail.com>wrote:

> Sed/awk is your friend
> On May 15, 2012 9:08 AM, "milad arabi" <milad.arabi at gmail.com> wrote:
>
>> hi all
>> in my web application i want use google analytics,for this purpose i must
>> run this code on every request:_gaq.push(['_trackPageview', '/some-page']);
>> my application is big and complete and i can't edit all dojo.xhr* .
>>
>> how i can attache _gaq.push(['_trackPageview', '/some-page']); to every
>> xhr request and how retrieve xhr url  ?
>>
>> ________________________________________________________
>> Dojotoolkit: http://dojotoolkit.org
>> Reference Guide: http://dojotoolkit.org/reference-guide
>> API Documentation: http://dojotoolkit.org/api
>> Tutorials: http://dojotoolkit.org/documentation
>>
>> Dojo-interest at mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>>
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20120515/c94d2ed7/attachment.htm 


More information about the Dojo-interest mailing list