snowplow / snowplow/snowplow-javascript-tracker

Add text-selection tracking

Open
#582 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category:browser priority:low type:enhancement
Dominant language
TypeScript
Stars
590
Forks
232
Avg merge
2h 22m
Merged PRs (30d)
3

Description

For text-heavy websites, like blogs or newspapers we can add text-selection tracking, which triggers event whenever user highlighted some part of paragraph (important part probably). This allows our users to implement medium-like "top-highlight" feature.

I see API something like:

snowplow_name_here('enableHighlightTracking', '.content.article') // .content.article is DOM selector

Which sends to collector event with startSymbol: number and endSymbol: number (maybe also contentHash: string so analysts can be sure they're comparing same blocks of text). These startSymbol and endSymbol can later be joined with content of text block.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no implementation files or tests. Start by reviewing the tracker’s existing public APIs and event schemas, then determine how text selection, the proposed selector, and optional content hash should behave. Done means an agreed API and event contract are implemented with coverage for the selection boundaries and emitted fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
analytics, api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.