Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page scroll depth #108

Open
nelsonic opened this issue Jun 20, 2024 · 1 comment
Open

Page scroll depth #108

nelsonic opened this issue Jun 20, 2024 · 1 comment
Assignees
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement help wanted technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

At present our chosen Analytics platform https://github.com/plausible/analytics does not support page scroll tracking. 😢
There is an open discussion: plausible/analytics#121 but there hasn't been much progress from the author/maintainer: plausible/analytics#121 (comment)
image

I offered to contribute the code up-stream: plausible/analytics#121 (comment)
image

We are paying customers (€11/month) and GitHub sponsors ...
plausible-analytics-sponsor

We need this feature.
As I wrote in my comment on their discussion forum, we are either going to fork and add the feature
or we will gladly submit it up-stream for everyone to benefit from.

I realise this is a non-trivial amount of work.
There needs to be a new DB table that allows streaming events.
And they need to maintain a full copy of each page to show the page-scroll.
This has important security/privacy considerations too.
Like where will the copies of pages be stored? how is this managed?
If the user-agent is viewing something sensitive like medical, finance or other personal data, how is that treated? 💭
So it would need to be opt-in i.e. not enabled by default.

@nelsonic nelsonic added enhancement help wanted discuss Share your constructive thoughts on how to make progress with this issue technical A technical issue that requires understanding of the code, infrastructure or dependencies labels Jun 20, 2024
@nelsonic nelsonic added this to More ToDo ThanCanEver Be Done in Nelson's List via automation Jun 20, 2024
@nelsonic nelsonic self-assigned this Jun 20, 2024
@nelsonic nelsonic moved this from More ToDo ThanCanEver Be Done to Backlog (Prioritized) in Nelson's List Jun 20, 2024
@nelsonic
Copy link
Member Author

Had a look at https://github.com/adieuadieu/serverless-chrome last night. 👀

Context:

In my mind there are 3 potential approaches to tracking page scroll:

  1. Capture capture the page URL, viewport dimensions for the useragent and then the scroll offset.
    This is the most basic approach and will work most of the time for public pages.
    But it won't work for single-page-aps (SPAs) with
  2. Take a snapshot (.png) of the page using headless Firefox / Chrome
    with the dimensions corresponding to the screen of the user-agent.
  3. Download the html, css and js of the whole page.
    And then render it in an <iframe> to show the interaction with scrolling.

For public pages that are openly accessible on the interwebs there is no privacy concern.
But for Web Apps with personal/confidential data we may be need to add an extra step to anonymise the data. 💭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement help wanted technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Nelson's List
  
Backlog (Prioritized)
Status: 📋 Backlog
Development

No branches or pull requests

1 participant