-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpixel_guide.json5
69 lines (69 loc) · 3.09 KB
/
pixel_guide.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
// This file defines a hypothetical pixel that showcases various features of the pixel schema
// Note: it is saved as ".json5" as it will mostly be viewed through GitHub UI
"m.my.first.pixel": {
// Required fields:
"description": "Fires when my cool feature is used.",
"owners": ["ddg_username"],
"triggers": ["exception", "scheduled"],
// [Optional] - parameterized portions of the pixel name, if applicable
// The examples below result in: m.my.first.pixel.[new|returning].exceptiontype.{exception}.[phone|tablet]
"suffixes": [
{
// Custom suffix, used only by this pixel
"description": "suffixes that indicates type of user",
// enum - see https://json-schema.org/understanding-json-schema/reference/enum
"enum": ["new", "returning"]
},
{
// Another custom suffix with a static portion
"key": "exceptiontype",
"description": "exception that occured",
// implicit string type - indicating various values can occur
// examples provided to showcase possible values
"examples": ["filenotfoundexception", "anotherexception"]
},
// Shortcut to a common suffix (defined by each platform in common_suffixes.json):
"device_type"
],
// [Optional] - parameters carried by the pixel, if applicable
"parameters": [
// Shortcut to a common parameter (defined by each platform in common_params.json):
"appVersion",
// Custom parameters, used only by this pixel:
{
"key": "count",
"description": "Number of times an event occured.",
// Integer type - see https://json-schema.org/understanding-json-schema/reference/numeric
"type": "integer",
"minimum": 0,
"maximum": 100
},
{
"key": "date",
"description": "Date the event occured",
// Format - see https://json-schema.org/understanding-json-schema/reference/string
"format": "date"
},
{
"key": "is_default",
"description": "Whether the browser is set as default",
// Boolean - see https://json-schema.org/understanding-json-schema/reference/boolean
"type": "boolean"
},
{
"key": "blocked_trackers",
"description": "List of blocked trackers",
// Array - see https://json-schema.org/understanding-json-schema/reference/array
"type": "array",
"items": {
"type": "string"
},
// Examples - used when params are more open-ended
"examples": [["tracker1", "tracker2"], ["tracker3"]]
}
],
// [Optional] if temporary pixel - specify expiration date:
"expires": "2025-12-31"
}
}