vojtech-dobes / nette.ajax.js

Flexible AJAX for Nette Framework. Supports snippets, redirects etc.
https://componette.org/vojtech-dobes/nette.ajax.js/
MIT License
149 stars 85 forks source link

Not working ga.ajax.js #113

Open JanMikes opened 9 years ago

JanMikes commented 9 years ago

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 :)

Majkl578 commented 9 years ago

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

fprochazka commented 9 years ago

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 :)