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

add the ability to set the download/outlink tracking class (overriding piwik_download/piwik_link). #549

Closed
anonymous-matomo-user opened this issue Feb 11, 2009 · 2 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

With the new updated piwik.js it seems as if it is much harder to be able to change the class for which it tracks as download/outlink/etc

for ex.

old piwik.js had

if( source.className == “piwik_download” )
_pk_link_type = ‘download’;

and thus making it easier to change the class name to be linked to download tracking as I would change “piwik_download” to “myDownloadclass” etc as I had a standard class format for certain links that I wanted to track as download:

var pk_class = new RegExp(’(?:^| )piwik(download|link)(?: |$)‘);
var _pk_download = new RegExp(’\.(’ + _pk_download_extensions + ‘)$’, ‘i’);

‘’if (_pk_link_type == ’link’)
pk_not_site_hostname = 1;
else if (!_pk_link
type)
pk_link_type = (_pkdownload.test(source.href) ? ‘download’ : ‘link’);’’

Now with how the structure changed looks like I need to add a new statement to declare _pk_class to “myDownloadClass”.

Not sure if this was easy to understand and its not a bug fix but maybe an enhancement for future release where the user can either change the piwik download/link tracking with either changing in the .js or the standard adding piwik_download class to the website itself.

Maybe set the default of choosing the class to “piwik_download” so for users that don’t modify the .js it will not affect them.

As of now I am running my old piwik.js with 0.2.29 and all is working well still but once there are updates to the .js maybe this could be added as a new feature

Thanks,
Tom

@robocoder
Copy link
Contributor

Restated (correct me if I’m off track):
- Add the ability to set the download/outlink tracking class (overriding piwik_download/piwik_link).

@robocoder
Copy link
Contributor

(In [1151]) fixes #5775 - OO version of piwik.js which no longer modifies DOM;
remove misc/testJavascripTracker (interactive tests);
add tests/javascript (QUnit unit tests);
fixes #661 - use click event instead of mousedown;
fixes #549 - define your own download/outlink tracking classes;
fixes #5502 - add hook interface for module

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants