[Dojo-interest] user google analytics

milad arabi milad.arabi at gmail.com
Tue May 15 11:22:49 EDT 2012


tnx kurt
i update to 1.7 some weeks ago.
i write this code but nothing happen:
define(["dojo/aspect"], function(aspect){
aspect.after(dojo, "xhr", function(method, args){
 console.log(method, args);
}, true);
});
i use dojo.xhrPost and dojo.xhrGet, and change above code for them,but
still not happen.
can you help me

On Tue, May 15, 2012 at 7:23 PM, Kurt Hoyt <kurt.hoyt at gmail.com> wrote:

> 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
>>
>>
>
> ________________________________________________________
> 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/767271d0/attachment.htm 


More information about the Dojo-interest mailing list