snowplow / snowplow/snowplow-javascript-tracker

Allow media/youtube `enable` functions to also accept an array of `id`s

Open
#1,128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently id is required to be a string, meaning the function (either enableYouTubeTracking or enableMediaTracking has to be called multiple times for as many videos. Allowing id to accept either a string or an array of strings would be a convenient way to track multiple videos.

From a cursory glance at the code it seems like it would be fairly straightforward to add in a non-breaking way.

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

Start with the enableYouTubeTracking and enableMediaTracking entry points and inspect how each currently handles the id argument. Check the surrounding media and YouTube tests if present, then verify that both functions support a string or an array of strings while preserving existing single-id behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
analytics
Issue type
Feature
Difficulty
2/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.