nette.ajax.js icon indicating copy to clipboard operation
nette.ajax.js copied to clipboard

Not working ga.ajax.js

Open JanMikes opened this issue 9 years ago • 2 comments

Since url is contained in settings.url (payload.url is always undefined), the extensions was useless - it never pushed pageview tracking to GA.

This fix works fine for me, I have changed lines 4 and 5 like this:

success: function (payload, status, jqXHR, settings) {
        var url = settings.url || payload.redirect;

Sorry for not sending pull request, but I have never tried it yet,.. maybe in future :)

JanMikes avatar Jan 21 '15 00:01 JanMikes

IIRC you were supposed to send actual URL of the ajax-loaded page, in payload.url.

Majkl578 avatar Jan 21 '15 01:01 Majkl578

IMHO the redirect should not be tracked, because it will be tracked after the actual redirect.

@Lexinek please do try to send pullrequest - fork the repository, create new branch, commit changes and open pullrequest using github GUI. There is nothing to worry :)

fprochazka avatar Jan 21 '15 01:01 fprochazka