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

Exclude folders #1750

Closed
oparoz opened this issue Oct 3, 2010 · 13 comments
Closed

Exclude folders #1750

oparoz opened this issue Oct 3, 2010 · 13 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. worksforme The issue cannot be reproduced and things work as intended.

Comments

@oparoz
Copy link

oparoz commented Oct 3, 2010

There is a way to exclude URL Query parameters, but I couldn't find anything to exclude folders.

I would find it useful to be able to exclude a list of folders like /admin, etc.

@sgiehl
Copy link
Member

sgiehl commented Oct 3, 2010

Why don't you exlude those folders by not including the tracking there?

@oparoz
Copy link
Author

oparoz commented Oct 3, 2010

I thought about that, but it's not always easily feasible.
Let's say you're using a CMS and you don't want to track each time somebody goes to login/index.html.
You would have to write some code excluding the code to appear on certain URLs instead of just pasting the piwik code into the template.
Also, a user would find it convenient to filter folders from the Piwik interface because he realizes that some don't provide valuable info.

@robocoder
Copy link
Contributor

Excluding a parameter is different from excluding a path. The former still tracks the pageview and visit. The latter (as I understand it) asks that we exclude the pageview but presumably still track the visit.

Instead of excluding the pageview in the tracker, would a datatable filter work for you?

@sgiehl
Copy link
Member

sgiehl commented Oct 3, 2010

I would only track the visit if the visitor has at least one pageview outside of the excluded paths.

What about implementing a function in piwik.js to define those paths and then only track pageviews that are not within the excluded paths.

@oparoz
Copy link
Author

oparoz commented Oct 3, 2010

I agree with SteveG.
That would prevent some uninteresting visits from polluting the rest of the stats, but we would still track the visitors for all the other pages/folders

@robocoder
Copy link
Contributor

In that case, let's mark this as a wontfix. Adding a new method to piwik.js which simply acts as a wrapper for a one-liner seems silly, especially considering that we'd have to also have document it and add unit tests.

To exclude a pageview:

if (!window.location.pathname.match(/^\/(admin|login)\//))
    tracker.trackPageView();

@oparoz
Copy link
Author

oparoz commented Oct 3, 2010

You mean, adding this to the code on the pages to track?

@robocoder
Copy link
Contributor

yes. the advantage of doing it on the client is that there's no tracking data sent to the server, nor wasted cycles on the server to process something that you're not going to record anyways.

@oparoz
Copy link
Author

oparoz commented Oct 3, 2010

Sounds good to me.
Should be added to the faq :)

@mattab
Copy link
Member

mattab commented Nov 16, 2010

I added the FAQ on http://piwik.org/faq/how-to/#faq_89

let me know if the text can/should be improved, thanks!

@oparoz
Copy link
Author

oparoz commented Nov 16, 2010

There is no FAQ #89 on that page. Hasn't been published yet?

@mattab
Copy link
Member

mattab commented Nov 16, 2010

It should be now, thx

@oparoz
Copy link
Author

oparoz commented Nov 16, 2010

Well done. Thank you :)

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. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

4 participants