Skip to content

Feat/implement analytics for impressions and clicks #247

@devgenix

Description

@devgenix

This issue addresses implementing analytics to;

  1. Register an impression when a resource is viewed.
  2. Register a click when a resource is expanded.

Note: A resource refers to a Poll, a Question, or an Article.

To implement number 1, it's suggested that you would need to use a library or write custom code to detect when a resource is in the viewport of the user's browser/device. One popular library for this is react-intersection-observer. When a resource is in the viewport, you would make a request to the backend to record an impression.

To implement number 2, you would also need to track when a user clicks to expand a resource. You could do this by attaching an event listener to the expand button and making a request to the backend when the button is clicked to record the click.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions