Skip to content

Commit

Permalink
Document pixels sent by the extension (#2875)
Browse files Browse the repository at this point in the history
* Specify breakage report pixels

* First autofill pixel

* Tidy up parameter definitions

* Add pixel validation to lint check

* Fix validation path

* Schema improvements

* Re-add pixel-schema dependency
  • Loading branch information
sammacbeth authored Jan 3, 2025
1 parent 2b850d4 commit 4a001ff
Show file tree
Hide file tree
Showing 7 changed files with 753 additions and 118 deletions.
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
cache: 'npm'
- run: npm run install-ci
- run: npm run lint && echo 'No lint issues!' || (npm run lint-fix; git diff; echo 'Lint check failed, review diff above or run "npm run lint-fix"'; return 1)
- run: npm run validate-pixel-defs

build:
strategy:
Expand Down
415 changes: 298 additions & 117 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
"dev-chrome": "make watch browser=chrome type=dev",
"beta-firefox": "make beta-firefox browser=firefox type=release",
"release-chrome": "make browser=chrome type=release && make chrome-release-zip",
"beta-chrome": "make chrome-beta browser=chrome type=release"
"beta-chrome": "make chrome-beta browser=chrome type=release",
"validate-pixel-defs": "validate-ddg-pixel-defs pixel-definitions"
},
"devDependencies": {
"@duckduckgo/eslint-config": "github:duckduckgo/eslint-config#v0.1.0",
"@duckduckgo/pixel-schema": "github:duckduckgo/pixel-schema#v1.0.3",
"@fingerprintjs/fingerprintjs": "^4.5.1",
"@playwright/test": "^1.49.1",
"@types/chrome": "^0.0.269",
Expand Down
15 changes: 15 additions & 0 deletions pixel-definitions/common_params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extensionVersion": {
"key": "extensionVersion",
"type": "string",
"description": "",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
"examples": ["2024.10.16"]
},
"atb": {
"key": "atb",
"type": "string",
"pattern": "v[0-9]{1,3}-[0-7]([a-z]{2})?",
"description": "Add to browser value, corresponding to the users install week and day"
}
}
12 changes: 12 additions & 0 deletions pixel-definitions/common_suffixes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"browser": {
"type": "string",
"description": "Browser type",
"enum": ["chrome", "firefox", "edg", "opera", "brave"]
},
"extension": {
"type": "string",
"description": "Platform text.",
"enum": ["extension"]
}
}
26 changes: 26 additions & 0 deletions pixel-definitions/pixels/autofill.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"email.tooltop.show": {
"description": "",
"owners": [
"emanuele"
],
"triggers": [
"other"
],
"suffixes": [
"extension",
"browser"
],
"parameters": [
{
"key": "cohort",
"description": "Beta cohort"
},
{
"key": "duck_address_last_used",
"description": "",
"format": "date"
}
]
}
}
Loading

0 comments on commit 4a001ff

Please sign in to comment.