Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


piwik.js: enableLinkTracking() not working in Safari/Chrome/Webkit #2078

robocoder opened this Issue · 3 comments

1 participant

Anthon Pang
Anthon Pang

Reported in,71966

Upon further investigation, webkit doesn't track outlinks (whether the tracking code is in head or body) unless the anchor has a target to open in a new window/tab. Tracking piwik.js execution, the request is created but webkit suppresses the request. (Security feature?)

There is already an open ticket in webkit's trac, and apparently also affects GA (so, we are not alone), but I've opened a new one with more details and an example:

Anthon Pang

(In [3939]) refs #409:

  • always use Crockford's JSON module (renamed to JSON2) to workaround broken "native implementations"
  • add JSON unit tests
  • revert [and 3900; rewrite getVisitorId() per comment:80
  • refactor browser feature detection for fingerprinting (used to generate uuid)
  • setDomains() now takes either '*.domain' or '.domain'
  • Safari emits warnings for Content-Length and Connection as "unsafe headers" in XHR POST request

refs #1984:

  • partially revert [3882] in order for the unit tests to run
  • fix inconsistency in getCustomVariable() depending on whether it is loaded from memory or from a cookie

refs #2078 Webkit bug ("Failed to load resource") when link target is the current window/tab

  • requires further discussion because the workaround may not be desirable behavior, i.e.,
if ((new RegExp('WebKit')).test(navigatorAlias.userAgent)
    && (! || === '_self')
    && linkType === 'link')
    // open outlink in a new window = '_blank';
Anthon Pang

(In [3940]) refs #2078

Anthon Pang

Updated FAQ "Piwik doesn't track Downloads and Outlinks on my website.".

Anthon Pang robocoder added this to the Piwik 1.2 milestone
Anthon Pang robocoder self-assigned this
This issue was closed.
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.