Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
robocoder opened this issue Feb 9, 2011 · 3 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Milestone

Comments

@robocoder
Copy link
Contributor

Reported in http://forum.piwik.org/read.php?2,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:

@robocoder
Copy link
Contributor Author

(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)
    && (!sourceElement.target.length || sourceElement.target === '_self')
    && linkType === 'link')
{
    // open outlink in a new window
    sourceElement.target = '_blank';
}

@robocoder
Copy link
Contributor Author

(In [3940]) refs #2078

@robocoder
Copy link
Contributor Author

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

@robocoder robocoder added this to the Piwik 1.2 milestone Jul 8, 2014
@robocoder robocoder self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

1 participant