Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Improve Outbound link #23

HonzaMikula opened this Issue · 6 comments

2 participants


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:

  • Download
  • Media (HTML5 video/audio)
  • Outbound
  • MailTo

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 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 I don't know if it's bug or not.


What about change line 1104 in gas.js to:

if (
(l.protocol == 'http:' || l.protocol == 'https:') &&, document.location.hostname) === -1)

? I think it would fix the problem.

@eduardocereto eduardocereto reopened this

Good catch. I'll try to fix that.

@eduardocereto eduardocereto closed this issue from a commit
@eduardocereto eduardocereto Fixes #23 - Fail to fire outbound links if original domain is found i…
…n the url, even if outside the hostname part.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.