jnessier / ReverseProxy-PlausibleAnalytics

Reverse proxy for Plausible Analytics, written in PHP for Shared Hostings on Apache.
MIT License
30 stars 6 forks source link

is it possible to track file downloads ? #11

Open Badelmaust opened 10 months ago

Badelmaust commented 10 months ago

Hi,

Thanks for this great feature. I'd like to add download tracking. I've modified options.php by trying :

$whitelist = [
    /js/script.js',
    /js/script.outbound-links.js',
    /js/script.file-downloads.js',
    /api/event
];

or

$whitelist = [
    /js/script.js',
    /js/script.file-downloads.outbound-links.js',
    /api/event
];

but nothing is displayed on the Goals panel. Perhaps there's another syntax to use?

Regards Badel

jnessier commented 9 months ago

Did you create the event goals to track the download? It does not look like an issue of the proxy script at first sight.

More: https://plausible.io/docs/file-downloads-tracking#step-2-create-a-custom-event-goal-in-your-plausible-analytics-account