2

I'm considering enabling Cloudflare for my site, which will make it so that static content is loaded from their servers instead of mine. If that's the case, how can I tally the request in our analytics platform for that piece of static content? How can I know how many times it was downloaded?

Currently we handle this server-side. That is, when somebody requests a PDF, we use an API to tally that in our analytics tool. But we'll never see the request at all if things are working properly, so....how to handle this?

  • Well Matomo tracks downloads of files automatically. If the URL doesn't have a specific (e.g. .pdf) file ending, you may need to add a class to the link: developer.matomo.org/guides/… – lw1.at Dec 17 '18 at 9:56
  • 1
    Only if those files are clicked from our website. If they're shared and clicked elsewhere Matomo doesn't have any idea. That's why we do server side tracking for these. – mlissner Dec 17 '18 at 20:51
  • That makes sense. But if you neither control the website people are coming from nor the site delivering the data, you don't really have any data to record. – lw1.at Dec 18 '18 at 9:53
  • There must be a solution for this, right? Some kind of API or something? I find it hard to believe that people give up tracking when they enable a CDN. – mlissner Dec 18 '18 at 22:55
  • Maybe there is some way to get the access.log. Then you could import it into Matomo. – lw1.at Dec 21 '18 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.