pulibrary / figgy

Valkyrie-based digital repository backend.
Other
35 stars 4 forks source link

Track Downloads through Plausible #6376

Closed tpendragon closed 1 month ago

tpendragon commented 2 months ago

These should be the downloads that go through the "Downloads" controller.

Acceptance Criteria

Notes

We want Figgy to send the data to DPUL's Plausible for this.

We might be able to get this via https://plausible.io/docs/file-downloads-tracking

We might want to track this through the buttons, or we might get this one for free through #6378.

https://plausible.io/docs/subdomain-hostname-filter#how-to-track-the-user-journey-across-domain-and-subdomains has some useful docs.

We either need a way to measure where the downloads are coming from via some tag manipulation, or have a custom metric we send to the API with some parameters and filter from those.

Answering the questions in these notes will take some research, which is part of this ticket.

First Step

Look at the downloads tracking documentation and see if it'll help.

tpendragon commented 1 month ago

File download tracking didn't work (I guess it doesn't interface with javascript), and neither did outbound link tracking.