Skip to content

Commit

Permalink
Schema for ad-click attribution pixels (#2892)
Browse files Browse the repository at this point in the history
* Schema for ad-click attribution pixels

* Update pixel-definitions/pixels/ad_click_attribution.json

Co-authored-by: Steven Englehardt <[email protected]>

---------

Co-authored-by: Steven Englehardt <[email protected]>
  • Loading branch information
sammacbeth and englehardt authored Jan 15, 2025
1 parent 6ea0c3f commit 26b29af
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 7 deletions.
21 changes: 14 additions & 7 deletions pixel-definitions/common_params.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"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"
},
"appVersion": {
"key": "appVersion",
"type": "string",
"description": "Extension version, but sent with 'appVersion' key.",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
"examples": ["2024.10.16"]
},
"extensionVersion": {
"key": "extensionVersion",
"type": "string",
"description": "Current version of the extension.",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
"examples": ["2024.10.16"]
}
}
84 changes: 84 additions & 0 deletions pixel-definitions/pixels/ad_click_attribution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"m.ad.click.detected": {
"description": "Fire a pixel at the point the conditional allowlist is registered with the app",
"owners": [
"dvandyke",
"senglehart"
],
"triggers": [
"page_load"
],
"suffixes": [
"extension",
"browser"
],
"parameters": [
"appVersion",
{
"key": "domainDetection",
"description": "Whether the SERP-provided domain matches what was heuristically detected.",
"enum": [
"none",
"matched",
"mismatch",
"serp_only",
"heuristic_only"
]
},
{
"key": "heuristicDetectionEnabled",
"description": "if heuristicDetection enabled via config",
"enum": [
"0",
"1"
]
},
{
"key": "domainDetectionEnabled",
"description": "if domainDetection enabled via config",
"enum": [
"0",
"1"
]
}
]
},
"m.ad.click.active": {
"description": "Fire a pixel on the first instance an allowlist is \"used\", once per registration.",
"owners": [
"dvandyke",
"senglehart"
],
"triggers": [
"page_load"
],
"suffixes": [
"extension",
"browser"
],
"parameters": [
"appVersion"
]
},
"m.pageloads.with.ad.attribution": {
"description": "Aggregate the number of page loads that have had an active exemption over the course of some time period",
"owners": [
"dvandyke",
"senglehart"
],
"triggers": [
"page_load"
],
"suffixes": [
"extension",
"browser"
],
"parameters": [
{
"key": "count",
"description": "Number of page loads with an exemption in time period",
"type": "integer"
}
]
}
}

0 comments on commit 26b29af

Please sign in to comment.