From 3ea78c9d8dec5eb5af424f3336e79d6509d3d0cc Mon Sep 17 00:00:00 2001 From: Sam Macbeth Date: Fri, 10 Jan 2025 11:29:16 +0100 Subject: [PATCH] Schema for ad-click attribution pixels --- pixel-definitions/common_params.json | 21 +++-- .../pixels/ad_click_attribution.json | 84 +++++++++++++++++++ 2 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 pixel-definitions/pixels/ad_click_attribution.json diff --git a/pixel-definitions/common_params.json b/pixel-definitions/common_params.json index 4a6486981..ab466ad0e 100644 --- a/pixel-definitions/common_params.json +++ b/pixel-definitions/common_params.json @@ -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"] } } \ No newline at end of file diff --git a/pixel-definitions/pixels/ad_click_attribution.json b/pixel-definitions/pixels/ad_click_attribution.json new file mode 100644 index 000000000..f4a1c12be --- /dev/null +++ b/pixel-definitions/pixels/ad_click_attribution.json @@ -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": "matching method used", + "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" + } + ] + } +} \ No newline at end of file