Many pages dynamically load some of content using Java Script (AJAX). If in dynamically loading content is some outbound links, GAS won't track them. In jQuery is something like .live() to solve this problem. It is possible to improve Outbound link tracker this way?
Closing as invalid.
GAS already uses Event delegation that mimics jQuery live.
Its applied to:
The only places that don't use event delegation are Form Tracking and Youtube/Vimeo video tracking.
Form tracking doesn't use it because change events don't bubble on ie8-
Youtube and Vimeo don't use because they are not DOM events, we use an API to track those.
Then I don't know it's my fault or bug in GAS, but on site http://crazycafe.centrum.cz it doesn't work. In very top of the page is black navigation to other services. This navigation is loading dynamically using Java Script and if I click on some services, GAS doesn't make event. I don't have idea why.
Ok i know what is the problem. We use current domain as utm_source parametr, so GAS thinks that it's internal link even it's not. For example http://www.cars.cz/?utm_source=crazycafe.centrum.cz&utm_medium=header. I don't know if it's bug or not.
What about change line 1104 in gas.js to:
(l.protocol == 'http:' || l.protocol == 'https:') &&
sindexOf.call(l.hostname, document.location.hostname) === -1)
? I think it would fix the problem.
Good catch. I'll try to fix that.
Fixes #23 - Fail to fire outbound links if original domain is found i…
…n the url, even if outside the hostname part.