Skip to content

Commit a9c7f14

Browse files
author
Lucas Adamski
committed
initial pixel schema WIP
1 parent 64ecd0b commit a9c7f14

13 files changed

+1788
-0
lines changed

PixelDefinitions/.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

PixelDefinitions/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
For information about documenting pixels and validating them, see https://github.com/duckduckgo/pixel-schema/blob/main/README.md

PixelDefinitions/asana_notify.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"assignee": "ladamski",
3+
"followers": ["jeannamatthews", "nshuba", "sammacbeth"],
4+
"tagPixelOwners": false
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
// This file will define pixels sent by the native experiments framework
3+
defaultSuffixes: [],
4+
activeExperiments: {},
5+
}
6+

PixelDefinitions/package-lock.json

Lines changed: 1307 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PixelDefinitions/package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "@duckduckgo/windows-browser",
3+
"version": "1.0.0",
4+
"dependencies": {
5+
"@duckduckgo/pixel-schema": "github:duckduckgo/pixel-schema#v1.0.8",
6+
"prettier": "^3.5.1"
7+
},
8+
"scripts": {
9+
"validate-defs-without-formatting": "validate-ddg-pixel-defs .",
10+
"validate-defs": "validate-ddg-pixel-defs . && prettier . --check",
11+
"lint": "prettier . --check",
12+
"lint.fix": "prettier . --write"
13+
},
14+
"prettier": {
15+
"singleQuote": true,
16+
"printWidth": 140,
17+
"tabWidth": 4,
18+
"overrides": [
19+
{
20+
"files": "*.json5",
21+
"options": {
22+
"parser": "json",
23+
"tabWidth": 4
24+
}
25+
}
26+
]
27+
}
28+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// This file defines commonly used params - this does NOT mean they are added by default
2+
// In your pixel definitions, you can reference these params by their key
3+
// See TEMPLATE.json for an example
4+
{
5+
"appVersion": {
6+
"key": "appVersion",
7+
"type": "string",
8+
"description": "",
9+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?$",
10+
"examples": ["0.89.3"]
11+
},
12+
"atb": {
13+
"key": "atb",
14+
"type": "string",
15+
"pattern": "v[0-9]{1,3}-[0-7]([a-z]{2})?",
16+
"description": "Add to browser value, corresponding to the users install week and day"
17+
},
18+
"channel": {
19+
"key": "channel",
20+
"type": "string",
21+
"description": "The channel the user is on",
22+
"enum": ["dev", "canary", "beta", "preview", "stable", "unknown", "unpackaged"]
23+
},
24+
"remoteConfigEtag": {
25+
"key": "remoteConfigEtag",
26+
"description": "",
27+
"pattern": "\"[-0-9a-f]{32}\""
28+
}
29+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// See https://app.asana.com/0/72649045549333/1208001118995887/f.
2+
{
3+
"pixel_name": {
4+
"description": "Describe when the pixel fires and its purpose",
5+
// Github usernames of the people responsible for the pixel (https://github.com/duckduckgo/internal-github-asana-utils/blob/main/user_map.yml)
6+
"owners": ["nshuba"],
7+
"triggers": ["other"],
8+
"suffixes": [
9+
// A suffix is a dynamic part of the pixel name, e.g. "some.pixel.[count|daily]"
10+
"first_daily_count", // shortcut to a commonly used suffix, defined in common_suffixes.json.
11+
{
12+
// Custom suffix.
13+
"description": "Describe the custom suffix and its purpose",
14+
"enum": ["suffix1", "suffix2"]
15+
}
16+
],
17+
"parameters": [
18+
// Commonly used param, defined in params_dictionary.json.
19+
"appVersion",
20+
// Commonly used param, defined in params_dictionary.json.
21+
"channel",
22+
{
23+
"key": "paramKey",
24+
"description": "Describe the parameter and its purpose"
25+
}
26+
],
27+
// If pixel is temporary, remove if pixel is permanent.
28+
"expires": "2025-01-30"
29+
}
30+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// See https://app.asana.com/1/137249556945/project/392891325557410/task/1210882421460693
2+
{
3+
m_autocomplete_displayed_bookmark_android_phone: {
4+
description: 'TBD',
5+
owners: [],
6+
suffixes: ['platform', 'form_factor'],
7+
parameters: ['appVersion'],
8+
},
9+
m_autocomplete_displayed_bookmark_android_tablet: {
10+
description: 'TBD',
11+
owners: [],
12+
suffixes: ['platform', 'form_factor'],
13+
parameters: ['appVersion'],
14+
},
15+
m_autocomplete_displayed_favorite_android_phone: {
16+
description: 'TBD',
17+
owners: [],
18+
suffixes: ['platform', 'form_factor'],
19+
parameters: ['appVersion'],
20+
}
21+
}
22+

0 commit comments

Comments
 (0)