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

Clarification in Javascript Tracking Code #796

Closed
anonymous-matomo-user opened this issue Jun 13, 2009 · 1 comment
Closed

Clarification in Javascript Tracking Code #796

anonymous-matomo-user opened this issue Jun 13, 2009 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

After reading (and reading ...) it is not 100% clear to me how this should be done.

For example:

Force a click on a link to be recorded as a download in Piwik

If you want Piwik to consider a given link as a download, you can add the piwik_download css class to the link:

<a href='last.php' class=piwik_download>Link I want to track as a download</a>

Note: you can customize and rename the CSS class used to force a click to being recorded as a download:

[...]
// now all clicks on links with the css class download will be counted as downloads
piwikTracker.setDownloadClass( download );
piwikTracker.trackPageView();
[...]

Once you are talking of 'piwik_download', then of 'download'.
Does this mean that Piwik recognize the CSS.class 'piwik_download' as 'download' and records it?
Or is this only a type and it should be always 'piwik_download' or 'downlaod'.

And - must it be always (piwik_)download or can i name the css.class as i want?
Therefore i have to build up the piwik js.code with this won created css.class

I am only asking, because i am building some implementations and widgets dynamically.

Thanks
michael

@robocoder
Copy link
Contributor

By default, Piwik will recognize a number of file extensions as downloads. However, if it's off-site, it's treated as an outlink. Using the class, "piwik_download", will force an off-site download to be treated as a download. setDownloadClass allows you to define your own class names -- let's say you already use the class name, 'download', on links to your downloads.

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 0.4.1 milestone Jul 8, 2014
@mattab mattab added the wontfix label Aug 3, 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. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants