nette.ajax.js
nette.ajax.js copied to clipboard
Not working ga.ajax.js
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 :)
IIRC you were supposed to send actual URL of the ajax-loaded page, in payload.url
.
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 :)