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: Wildcard support in piwik_hosts_alias #5561
Comments
This feature is a must have for our community sites. Each of our members have their own url (eg. kofl.devcon5.cc), so without wildcard support piwik would not be useable for us. We hope the feature will be implemnted soon. |
Attachment: proposed patch |
In my patch (which doesn’t use regular expressions), wildcards are specified in a separate variable. Usage example: piwik_hosts_alias = [ “example.com” ]; /\* matches only example.com / |
Anthon, thanks for your patch. we would like to minimize complexity and no of variables involved. I suggest that we don’t use regular expressions, but that the user can specify the domains in the same array piwik_hosts_alias with the notation *.domain.com In the JS, you could look for the character \* using substring and apply the same algorithm found in your patch. Also, we have this test folder: https://github.com/piwik/piwik/blob/master/misc/testJavascriptTracker |
Attachment: |
Attachment includes tests added to page2.php, and rolls-up the piwik.js patches from #141 (revised per matt’s comments), #248, and #351. |
thanks for patch vipsoft; see 887 I updated documentation in the [javascript tracking page](http://piwik.org/docs/javascript-tracking/); please let me know if this is accurate. Consider a host an alias host and not record the links to this domain as outlinks By default all links to domains other than the current domain are considered outlinks. If you have multiple domains and dont want to consider links to these websites as outlinks you can add this new JavaScript variable. There is a support for wildcard, if you want to ignore all clicks to subdomains of a specific domain. […] |
Wiki docs update looks good. |
@robocoder @zawadzinski |
Now you can specify in javascript code before including piwik.js your site domain aliases:
piwik_hosts_alias = [ “hostname1.com”, “hostname2.com”, … ];
For some site configurations we need to support wildcards so you can specify hostname like:
*.hostname.com
Keywords: piwik.js
The text was updated successfully, but these errors were encountered: