Skip to content

Instantly share code, notes, and snippets.

@Opticks-io
Last active September 27, 2018 13:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Opticks-io/e6ff4a599cad209c53a786173a025d19 to your computer and use it in GitHub Desktop.
Save Opticks-io/e6ff4a599cad209c53a786173a025d19 to your computer and use it in GitHub Desktop.
Opticks Integration
{
"type": "object",
"required": ["opticksClickId", "ts", "invalidClickReasons", "analysis", "delivered", "fallbackUrl"],
"additionalProperties": false,
"properties": {
"version": {
"type": "integer",
"title": "The Version Schema ",
"default": 0,
"examples": [
2
]
},
"opticksClickId": {
"type": "string",
"title": "The Opticksclickid Schema ",
"default": "",
"examples": [
"track_20180528004215_a4bdb381_fe23_40ab_8202_ec3029bf8bd2"
]
},
"delivered": {
"type": "boolean",
"title": "The Delivered Schema ",
"default": false,
"examples": [
true
]
},
"fallbackUrl": {
"type": ["string","null"]
},
"ts": {
"type": "integer",
"title": "The Ts Schema ",
"description": "Unix timestamp (UTC)",
"default": 0,
"examples": [
1527868404
]
},
"invalidClickReasons": {
"type": "array",
"minItems": 0,
"uniqueItems": true,
"items": {
"examples": [
"blockedHeaderInjectionTraffic"
],
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.json#/definitions/invalid_click_reasons"
}
},
"analysis": {
"type": "object",
"required": ["level", "detections"],
"properties": {
"level": {
"type": "string",
"title": "The Level Schema ",
"default": "",
"examples": [
"medium"
],
"enum": [
"low",
"medium",
"high"
]
},
"detections": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"group": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.json#/definitions/click_detection_groups"
},
"triggers": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.json#/definitions/click_detection_triggers"
}
}
}
}
}
}
}
}
}
{
"type": "object",
"required": [
"opticksClickId",
"ts",
"invalidClickReasons",
"analysis",
"delivered",
"fallbackUrl"
],
"additionalProperties": false,
"properties": {
"version": {
"type": "integer",
"enum": [
3
]
},
"opticksClickId": {
"type": "string",
"title": "The Opticksclickid Schema ",
"default": "",
"examples": [
"track_20180528004215_a4bdb381_fe23_40ab_8202_ec3029bf8bd2"
]
},
"delivered": {
"type": "boolean",
"title": "The Delivered Schema ",
"default": false,
"examples": [
true
]
},
"fallbackUrl": {
"type": [
"string",
"null"
],
"title": "The Fallbackurl Schema ",
"default": null,
"examples": [
null
]
},
"ts": {
"type": "integer",
"title": "The Ts Schema ",
"description": "Unix timestamp (UTC)",
"default": 0,
"examples": [
1527868404
]
},
"invalidClickReasons": {
"type": "array",
"minItems": 0,
"uniqueItems": true,
"items": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.v3.json#/definitions/invalid_click_reason"
}
},
"analysis": {
"type": "object",
"required": [
"level",
"detections"
],
"additionalProperties": false,
"properties": {
"level": {
"type": "string",
"title": "The Level Schema ",
"default": "",
"examples": [
"medium"
],
"enum": [
"low",
"medium",
"high"
]
},
"detections": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.v3.json#/definitions/click_detection"
}
}
}
}
}
}
{
"type": "object",
"additionalProperties": false,
"required": [
"opticksClickId",
"reported",
"invalidConversionReasons",
"analysis"
],
"properties": {
"version": {
"type": "integer",
"title": "The Version Schema ",
"default": 1,
"examples": [
1
]
},
"opticksClickId": {
"type": "string",
"title": "The Opticksclickid Schema ",
"default": "",
"examples": [
"track_20180528004215_a4bdb381_fe23_40ab_8202_ec3029bf8bd2"
]
},
"macros": {
"type": "object"
},
"reported": {
"type": "boolean",
"title": "The Reported Schema ",
"default": true,
"examples": [
false
]
},
"invalidConversionReasons": {
"type": "array",
"minItems": 0,
"uniqueItems": true,
"items": {
"type": "string",
"title": "The 0th Schema ",
"default": "",
"examples": [
"mediumRisk"
],
"enum": [
"mediumRisk",
"highRisk"
]
}
},
"analysis": {
"type": "object",
"required": [
"level",
"detections"
],
"properties": {
"level": {
"type": "string",
"title": "The Level Schema ",
"default": "low",
"examples": [
"medium"
],
"enum": [
"low",
"medium",
"high"
]
},
"detections": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"group": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.json#/definitions/all_detection_groups"
},
"triggers": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.json#/definitions/all_detection_triggers"
}
}
}
}
}
}
}
}
}
{
"type": "object",
"additionalProperties": false,
"required": [
"opticksClickId",
"reported",
"invalidConversionReasons",
"analysis"
],
"properties": {
"version": {
"type": "integer",
"enum": [
3
]
},
"opticksClickId": {
"type": "string",
"default": "",
"examples": [
"track_20180528004215_a4bdb381_fe23_40ab_8202_ec3029bf8bd2"
]
},
"macros": {
"type": "object"
},
"reported": {
"type": "boolean",
"default": true,
"examples": [
false
]
},
"invalidConversionReasons": {
"type": "array",
"minItems": 0,
"uniqueItems": true,
"items": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.v3.json#/definitions/invalid_conversion_reason"
}
},
"analysis": {
"type": "object",
"required": [
"level",
"detections"
],
"properties": {
"level": {
"type": "string",
"default": "low",
"examples": [
"medium"
],
"enum": [
"low",
"medium",
"high"
]
},
"detections": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "https://gist.github.com/Opticks-io/e6ff4a599cad209c53a786173a025d19/raw/schema_definitions.v3.json#/definitions/all_detections"
}
}
}
}
}
}
{
"definitions": {
"invalid_click_reasons": {
"enum": [
"blockedHeaderInjectionTraffic",
"blockedDangerousIPTraffic",
"offerPaused",
"blockedMalwareAPKTraffic",
"subpublisherBlacklist",
"blockedIframeTraffic",
"blockedProxyTraffic",
"campaignPaused",
"blockedAdultAcquisitionTraffic"
]
},
"click_detection_groups": {
"enum": [
"Repeated users",
"Header Injections",
"Harmful applications",
"Non-reputable IP addresses",
"Proxy Traffic",
"Iframe",
"Suspicious acquisition",
"Adult acquisition",
"BrowserDeviceOSTampering"
]
},
"conversion_detection_groups": {
"enum": [
"Suspicious conversion patterns"
]
},
"all_detection_groups": {
"anyOf": [
{
"$ref": "#/definitions/click_detection_groups"
},
{
"$ref": "#/definitions/conversion_detection_groups"
}
]
},
"click_detection_triggers": {
"enum": [
"Repeated IP + User Agent",
"MSISDN Injection",
"Referer Injection",
"WASPA List",
"Offer not rendered",
"Malicious code found",
"IP flagged as Unrouteable",
"IP flagged as Organization",
"IP flagged for low reputation",
"IP flagged for Spam",
"IP flagged for Abuse",
"IP flagged for Attacks",
"IP flagged as Anonymizer",
"IP flagged as Malware",
"Public proxy",
"VPN proxy",
"Web proxy",
"Hosting/CDN proxy",
"Tor proxy",
"Iframe",
"Tiny Iframe",
"Non-PlayStore APK",
"Adult Traffic",
"Blacklisted APK",
"Malformed client data"
]
},
"conversion_detection_triggers": {
"enum": [
"CTIT anomaly",
"2H CR > 5%",
"2H CR > 15%",
"2H Offer-TrafficSource-SubPub CR Anomaly",
"Browser features distribution anomaly"
]
},
"all_detection_triggers": {
"anyOf": [
{
"$ref": "#/definitions/click_detection_triggers"
},
{
"$ref": "#/definitions/conversion_detection_triggers"
}
]
}
}
}
{
"definitions": {
"click_detection_group": {
"type": "object",
"required": [
"id",
"group"
],
"additionalProperties": false,
"properties": {
"group": {
"type": "string"
},
"id": {
"type": "integer",
"enum": [
1,
2,
3,
4,
5,
6,
7,
8
]
}
}
},
"click_detection_trigger": {
"type": "object",
"required": [
"id",
"trigger"
],
"additionalProperties": false,
"properties": {
"trigger": {
"type": "string"
},
"id": {
"type": "integer",
"enum": [
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31
]
}
}
},
"click_detection": {
"properties": {
"group": {
"$ref": "#/definitions/click_detection_group"
},
"triggers": {
"type": "array",
"items": {
"$ref": "#/definitions/click_detection_trigger"
}
}
}
},
"invalid_click_reason": {
"type": "object",
"required": [
"id",
"reason"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"enum": [
37,
38,
39,
40,
41,
42,
43,
44,
45
]
},
"reason": {
"type": "string"
}
}
},
"invalid_conversion_reason": {
"type": "object",
"required": [
"id",
"reason"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"enum": [
46,
47
]
},
"reason": {
"type": "string"
}
}
},
"conversion_detection_group": {
"type": "object",
"required": [
"id",
"group"
],
"additionalProperties": false,
"properties": {
"group": {
"type": "string"
},
"id": {
"type": "integer",
"enum": [
9
]
}
}
},
"conversion_detection_trigger": {
"type": "object",
"required": [
"id",
"trigger"
],
"additionalProperties": false,
"properties": {
"trigger": {
"type": "string"
},
"id": {
"type": "integer",
"enum": [
32,
33,
34,
35,
36
]
}
}
},
"conversion_detection": {
"properties": {
"group": {
"$ref": "#/definitions/conversion_detection_group"
},
"triggers": {
"type": "array",
"items": {
"$ref": "#/definitions/conversion_detection_trigger"
}
}
}
},
"all_detection_groups": {
"anyOf": [
{
"$ref": "#/definitions/click_detection_group"
},
{
"$ref": "#/definitions/conversion_detection_group"
}
]
},
"all_detection_triggers": {
"anyOf": [
{
"$ref": "#/definitions/click_detection_trigger"
},
{
"$ref": "#/definitions/conversion_detection_trigger"
}
]
},
"all_detections":{
"anyOf":[
{
"$ref": "#/definitions/click_detection"
},
{
"$ref": "#/definitions/conversion_detection"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment