Sending analytics to my site from an unknown site

I’m about to sell some JavaScript code using an online market place and wondering if there is a way to use Matomo to send data from the customer’s site (where they have added the JavaScript they have purchased from me). I’m thinking there must be a restful way such as sending a query string containing the customer’s URL and other analytics back to my Matomo site. I would include these restful calls in the JavaScript in an obsfucated/minified way so they hopefully don’t get removed by the customer, but I appreciate that another JavaScript developer would be able to remove it. Any ideas to point me in the right direction will be greatly appreciated. Note that I won’t be collecting personally identifiable data such as the customer’s IP address, so would not require consent. The reason I would like to collect this data is to see how much my JavaScript is being used and from which sites, and ideally be able to identify if there is anyone using the JavaScript that didn’t purchase it from the online market place.

I think I found what I was looking for here: https://developer.matomo.org/guides/tracking-javascript-guide
I just needed to spend a bit more time looking.

Hi @MrZombie
Be careful, some browsers (and also site configuration especially CSP headers) can prevent the sending of information to your Matomo server… :frowning:

Also, some developers could do retro engineering on your code, and then copy then remove the tracking part…