guardian / guardian/dotcom-rendering

Web Tracking Source Of Truth

Open
#8,045 2 comments 0 reactions 0 assignees View on GitHub
Team Candidate: WebX
Dominant language
TypeScript
Stars
274
Forks
34
Avg merge
2d 22h
Merged PRs (30d)
121

Description

### Background

We track the rendering and interaction with the various components in our page using two attributes:

* `data-component="component-name"`. We add this to the element we want to track. The page views table will then contain `component-name` when the element is present on the page.
* `data-link-name="link-name"`. We add this to the anchor for which clicks we want to be tracked. The page views table will then contain `link-name` when the link is clicked.

See more info [here](https://github.com/guardian/dotcom-rendering/blob/2729d6de5ab13c1cade00e862510460467484f07/dotcom-rendering/index.d.ts#L573-L604)

This way we send data to Ophan which become available to the Data Analysts.

### Task
This ticket is to work closely with the D&I team to create a "source of truth" document for the web that will allow both engineers and analysts to have a comprehensive guide to everything they might need to know in one place. The aim is to create something that not only held technical tracking details, but also provides context as to what different features are, and guidance around why particular fields are chosen to hold different types of data.

See example of a [WIP document](https://docs.google.com/spreadsheets/d/1wmyH5RwVyD1nYBEpnaLBZLawCqc55QSfSsUKdzCaaX4/edit#gid=1067343797) the Apps and D&I teams have put together.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.