pulibrary / dpul

Princeton's digital collections: Digital PUL
https://dpul.princeton.edu/
Apache License 2.0
15 stars 0 forks source link

Adds Record Page tracking to Plausible #1545

Closed sdellis closed 1 week ago

sdellis commented 1 week ago

Fixes #1534

sdellis commented 1 week ago

One question... this approach uses the simpler Plausible "snippet" rather than the manual JS approach. Is it more testable using the JS approach or is there a way with capybara that we can go to that page and ensure it sent the GET request to Plausible?

tpendragon commented 1 week ago

Does this result in two page view events when you go to a record page?

sdellis commented 1 week ago

@tpendragon It does not result in two page views. It is confusing because there are a few network calls to Plausible, but only one event with content sent. I confirmed that when a Record Page is viewed, it increments both general Page Views and Record Page views by one.