0

I am about to sell a module that I coded for e-commerce websites, and I was wondering if it's possible, to insert some extra code in it in order to know which websites are running the module. In other words, let's say a customer buys my module, then install it on its website, is there a way for me to know which website it is ?

I don't want any other info than "which website", my goal is not to trace users, but simply to have a statistic of the number of websites where my module is installed (because, it can be for instance that a customer buy the module then install it on several other websites...)

Thanks for your help

Aymeric

ailauli69
  • 522
  • 6
  • 19
  • If you were doing your server side stuff in node.js, you can make a route to check the `req.get('host')` value, as specified [here](https://stackoverflow.com/questions/18498726/how-do-i-get-the-domain-originating-the-request-in-express-js). Your javascript that you give to other people could either be hosted by you, and you could record the host information before returning them the javascript to run, or could include some code to make a fetch to a url that records the host information – TKoL Sep 21 '20 at 12:08

1 Answers1

0

Difficult to answer without knowing what you are running, PHP, JS, etc. but when I created a similar plugin for WordPress there are some hooks for when a plugin is activated/deactivated. I just put an HTTP call into my API that told me when someone activated or deactivated the plugin and I got a rough idea. I mean, if they don't deactivate it properly, e.g. delete the files, then you would get a false positive of them using it, but not many folk do that.

TeeJayEss
  • 151
  • 1
  • 12