Tracking -any- site

I’ve got an unusual question: is it possible to track an unknown number of web sites and domain names (i.e., add a wildcard for a domain name).

The use case I have is the following:

  • I’m publishing a JS library, for which I’d like to know the usage.
  • This JS library can be used by others, on any range of websites and domain names (i.e., I won’t know where the lib will be used)
  • I’d like to add a piwik tracker to the library (with options for both the developer re-using my lib to disable tracking, as well as a ‘deny’ option for end users)

Now, piwik requires that I specify a URL whenever I add a ‘website’. Makes sense, though in my case I won’t know which URLs will use my library. Is it possible to enter something like a wildcard in the URL field, or is there another way to make my use-case work?

Best, Laurens

Hi Laurens

Even though Piwik asks for URLs, it will still track data when the requests do not come from this URL.
So technically you can track any of your users’s data in one website in Piwik.

Ah, thats even easier, thanks!

Hi - I’m reactivating this old thread since it’s exactly what I’m looking for, but not sure if the functionality is still the same after 7y. In my case, I add following to my tracking code:

_paq.push([“setDomains”, [".xy1.com",".xy2.com","*.xy3.com"]]); to track several domains and subdomains which belong to the same project.

Can I wildcard setDomains somehow to track all domains and subdomains? Eg.

_paq.push([“setDomains”, ["..*"]]);

That would help a lot because I don’t want to change the tracking code for each new domain/subdomain.

Thank you very much for your help.