@metarouter/ajs-starter-kit 1.0.51 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dist/actioniq/kit.etag.json +1 -1
- package/.dist/acuity-ads/kit.etag.json +1 -1
- package/.dist/acuity-ads/metadata.json +1 -1
- package/.dist/adobe/kit.etag.json +1 -1
- package/.dist/adobe/metadata.json +1 -1
- package/.dist/amazon-redshift-v2/kit.etag.json +1 -1
- package/.dist/amazon-redshift-v2/metadata.json +1 -1
- package/.dist/amnet/kit.etag.json +1 -1
- package/.dist/amnet/metadata.json +1 -1
- package/.dist/amobee/kit.etag.json +1 -1
- package/.dist/amplitude/kit.etag.json +1 -1
- package/.dist/amplitude/metadata.json +1 -1
- package/.dist/apps-flyer-android/kit.etag.json +1 -1
- package/.dist/apps-flyer-android/metadata.json +1 -1
- package/.dist/apps-flyer-ios/kit.etag.json +1 -1
- package/.dist/apps-flyer-ios/metadata.json +1 -1
- package/.dist/bing-ads/kit.etag.json +1 -1
- package/.dist/bing-ads/playbook.etag.json +1 -1
- package/.dist/bing-ads/playbook.json +2 -2
- package/.dist/blob/kit.etag.json +1 -1
- package/.dist/bloomreach/kit.etag.json +1 -1
- package/.dist/bloomreach/metadata.json +1 -1
- package/.dist/blueshift/kit.etag.json +1 -1
- package/.dist/blueshift/metadata.json +1 -1
- package/.dist/braze/kit.etag.json +1 -1
- package/.dist/criteo/kit.etag.json +1 -1
- package/.dist/criteo/metadata.json +1 -1
- package/.dist/customer-io/kit.etag.json +1 -1
- package/.dist/customer-io/metadata.json +1 -1
- package/.dist/facebook-pixel/kit.etag.json +1 -1
- package/.dist/gcs/kit.etag.json +1 -1
- package/.dist/google-ad-words/kit.etag.json +1 -1
- package/.dist/google-analytics/kit.etag.json +1 -1
- package/.dist/google-analytics/playbook.etag.json +1 -1
- package/.dist/google-analytics/playbook.json +1 -1
- package/.dist/google-analytics-4/kit.etag.json +1 -1
- package/.dist/google-analytics-4/playbook.etag.json +1 -1
- package/.dist/google-analytics-4/playbook.json +2 -2
- package/.dist/google-bigquery-streaming/kit.etag.json +1 -1
- package/.dist/google-bigquery-streaming/metadata.json +1 -1
- package/.dist/google-cm360/kit.etag.json +1 -1
- package/.dist/google-cm360/metadata.json +1 -1
- package/.dist/google-double-click/kit.etag.json +1 -1
- package/.dist/google-double-click/metadata.json +1 -1
- package/.dist/google-pubsub/kit.etag.json +1 -1
- package/.dist/google-pubsub/metadata.json +1 -1
- package/.dist/hubspot-event/connection.etag.json +1 -0
- package/.dist/hubspot-event/connection.json +22 -0
- package/.dist/hubspot-event/kit.etag.json +1 -0
- package/.dist/hubspot-event/metadata.json +20 -0
- package/.dist/hubspot-event/playbook.etag.json +1 -0
- package/.dist/hubspot-event/playbook.json +63 -0
- package/.dist/impact-radius/kit.etag.json +1 -1
- package/.dist/impact-radius/metadata.json +1 -1
- package/.dist/in-market/kit.etag.json +1 -1
- package/.dist/in-market/metadata.json +1 -1
- package/.dist/in-market/playbook.etag.json +1 -1
- package/.dist/in-market/playbook.json +1 -1
- package/.dist/kafka/kit.etag.json +1 -1
- package/.dist/kafka/metadata.json +1 -1
- package/.dist/kinesis/kit.etag.json +1 -1
- package/.dist/kinesis/metadata.json +1 -1
- package/.dist/lytics/kit.etag.json +1 -1
- package/.dist/lytics/metadata.json +1 -1
- package/.dist/media-math/kit.etag.json +1 -1
- package/.dist/merkle/kit.etag.json +1 -1
- package/.dist/mixpanel/kit.etag.json +1 -1
- package/.dist/movable-ink/kit.etag.json +1 -1
- package/.dist/pinterest/kit.etag.json +1 -1
- package/.dist/pinterest/playbook.etag.json +1 -1
- package/.dist/pinterest/playbook.json +4 -4
- package/.dist/rev-jet/kit.etag.json +1 -1
- package/.dist/rev-jet/metadata.json +1 -1
- package/.dist/roomvo/kit.etag.json +1 -1
- package/.dist/s3/kit.etag.json +1 -1
- package/.dist/s3/metadata.json +1 -1
- package/.dist/salesforce-cdp/kit.etag.json +1 -1
- package/.dist/snapchat/kit.etag.json +1 -1
- package/.dist/snapchat/playbook.etag.json +1 -1
- package/.dist/snapchat/playbook.json +2 -2
- package/.dist/snowflake/kit.etag.json +1 -1
- package/.dist/thetradedesk-conversion-events/connection.etag.json +1 -0
- package/.dist/thetradedesk-conversion-events/connection.json +33 -0
- package/.dist/thetradedesk-conversion-events/kit.etag.json +1 -0
- package/.dist/thetradedesk-conversion-events/metadata.json +20 -0
- package/.dist/thetradedesk-conversion-events/playbook.etag.json +1 -0
- package/.dist/thetradedesk-conversion-events/playbook.json +133 -0
- package/.dist/thetradedesk-data-advertiser-firstparty/connection.etag.json +1 -0
- package/.dist/thetradedesk-data-advertiser-firstparty/connection.json +37 -0
- package/.dist/thetradedesk-data-advertiser-firstparty/kit.etag.json +1 -0
- package/.dist/thetradedesk-data-advertiser-firstparty/metadata.json +20 -0
- package/.dist/thetradedesk-data-advertiser-firstparty/playbook.etag.json +1 -0
- package/.dist/thetradedesk-data-advertiser-firstparty/playbook.json +42 -0
- package/.dist/twitter-conversions/kit.etag.json +1 -1
- package/.dist/twitter-conversions/playbook.etag.json +1 -1
- package/.dist/twitter-conversions/playbook.json +3 -3
- package/.dist/verizon-media/kit.etag.json +1 -1
- package/.dist/videoamp/kit.etag.json +1 -1
- package/.dist/videoamp/metadata.json +1 -1
- package/.dist/xandr/kit.etag.json +1 -1
- package/index.js +36 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"isDraft": false,
|
|
3
3
|
"isBeta": true,
|
|
4
4
|
"friendlyName": "RevJet",
|
|
5
|
-
"description": "A tool designed to help enterprises manage how advertising content is personalized across media channels
|
|
5
|
+
"description": "A tool designed to help enterprises manage how advertising content is personalized across media channels,\nincluding dynamic creative optimization and experimentation.",
|
|
6
6
|
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
7
|
"color": "#FF430A",
|
|
8
8
|
"eventSource": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
package/.dist/s3/kit.etag.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
package/.dist/s3/metadata.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"isDraft": false,
|
|
3
3
|
"isBeta": false,
|
|
4
4
|
"friendlyName": "Amazon S3",
|
|
5
|
-
"description": "Amazon Simple Storage Service (Amazon S3) is an object storage service
|
|
5
|
+
"description": "Amazon Simple Storage Service (Amazon S3) is an object storage service\nthat offers industry-leading scalability, data availability, security, and performance.",
|
|
6
6
|
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
7
|
"color": "#e1523c",
|
|
8
8
|
"eventSource": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"f6956e3139b33ab88851bda198412aef"
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
{
|
|
199
199
|
"expression": {
|
|
200
200
|
"lang": "lua",
|
|
201
|
-
"body": "return SUM(MAP(input.properties.products
|
|
201
|
+
"body": "return SUM(\n MAP(input.properties.products,\n function (p)\n return p.quantity\n end\n))"
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
]
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
{
|
|
238
238
|
"expression": {
|
|
239
239
|
"lang": "lua",
|
|
240
|
-
"body": "return SUM(MAP(input.properties.products
|
|
240
|
+
"body": "return SUM(\n MAP(input.properties.products,\n function (p)\n return p.quantity\n end\n))"
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"90086aadabb281ce9c4008f2ae16e8f2"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": [
|
|
3
|
+
{
|
|
4
|
+
"name": "SECRET_KEY",
|
|
5
|
+
"exampleValue": "my-secret-key"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "SECRET_KEY_DATA_PROVIDER",
|
|
9
|
+
"exampleValue": "my-secret-key-data-provider"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"default": {
|
|
13
|
+
"endpoint": "https://insight.adsrvr.org/track/ecomm",
|
|
14
|
+
"headers": [
|
|
15
|
+
{
|
|
16
|
+
"key": "Content-Type",
|
|
17
|
+
"value": "application/json"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"method": "POST",
|
|
21
|
+
"batchSize": 10,
|
|
22
|
+
"transform": {
|
|
23
|
+
"lang": "lua",
|
|
24
|
+
"body": "request.body = { data = batch }\nreturn request"
|
|
25
|
+
},
|
|
26
|
+
"providerAuth": {
|
|
27
|
+
"tradedesk": {
|
|
28
|
+
"secretKey": "$$SECRET_KEY$$",
|
|
29
|
+
"secretKeyDataProvider": "$$SECRET_KEY_DATA_PROVIDER$$"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isDraft": false,
|
|
3
|
+
"isBeta": false,
|
|
4
|
+
"friendlyName": "TheTradeDesk Conversion Events",
|
|
5
|
+
"description": "Real time conversion events API\nhttps://api.thetradedesk.com/v3/portal/data/doc/DataConversionEventsApi#parameters-items",
|
|
6
|
+
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
|
+
"color": "#F54D44",
|
|
8
|
+
"eventSource": {
|
|
9
|
+
"isAndroidApp": true,
|
|
10
|
+
"isIosApp": true,
|
|
11
|
+
"isWebApp": true
|
|
12
|
+
},
|
|
13
|
+
"inputSchema": "analytics_js",
|
|
14
|
+
"releaseNotes": [
|
|
15
|
+
{
|
|
16
|
+
"date": "2022-11-29T00:00:00.000Z",
|
|
17
|
+
"note": "First iteration of Real-Time Conversion Events API"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"3a0cbfab87d1aaffccfb947a42a3ba5e"
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.0.1",
|
|
3
|
+
"params": [
|
|
4
|
+
{
|
|
5
|
+
"name": "MERCHANT_ID",
|
|
6
|
+
"exampleValue": "my-merchant-id"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "TRACKER_ID",
|
|
10
|
+
"exampleValue": "my-tracker-id"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "ADVERTISER_ID",
|
|
14
|
+
"exampleValue": "my-advertiser-id"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "PRIVACY_TYPE",
|
|
18
|
+
"exampleValue": "GDPR"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"eventSpecific": {
|
|
22
|
+
"order_completed": {
|
|
23
|
+
"mappings": [
|
|
24
|
+
{
|
|
25
|
+
"inputKey": "properties.total",
|
|
26
|
+
"outputKey": "value"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputKey": "input",
|
|
30
|
+
"outputKey": "currency",
|
|
31
|
+
"transforms": [
|
|
32
|
+
{
|
|
33
|
+
"expression": {
|
|
34
|
+
"lang": "lua",
|
|
35
|
+
"body": "return UPPER(input.properties.currency)"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"inputKey": "input",
|
|
42
|
+
"outputKey": "items",
|
|
43
|
+
"transforms": [
|
|
44
|
+
{
|
|
45
|
+
"expression": {
|
|
46
|
+
"lang": "lua",
|
|
47
|
+
"body": "products = MAP(input.properties.products, function(p)\n return {\n item_code = p.sku,\n name = p.name,\n qty = p.quantity,\n price = p.price,\n cat = p.category\n }\n end\n )\n return products"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"global": {
|
|
56
|
+
"enrichments": [
|
|
57
|
+
{
|
|
58
|
+
"staticString": "$$MERCHANT_ID$$",
|
|
59
|
+
"outputKey": "merchant_id"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"staticString": "$$ADVERTISER_ID$$",
|
|
63
|
+
"outputKey": "adv"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"staticString": "$$TRACKER_ID$$",
|
|
67
|
+
"outputKey": "tracker_id"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"mappings": [
|
|
71
|
+
{
|
|
72
|
+
"inputKey": "anonymousId",
|
|
73
|
+
"outputKey": "token"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"inputKey": "originalTimestamp",
|
|
77
|
+
"outputKey": "ts_utc"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"inputKey": "ip",
|
|
81
|
+
"outputKey": "client_ip"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"inputKey": "input",
|
|
85
|
+
"outputKey": "event_name",
|
|
86
|
+
"transforms": [
|
|
87
|
+
{
|
|
88
|
+
"expression": {
|
|
89
|
+
"lang": "lua",
|
|
90
|
+
"body": "-- event name\nif input.event then\n return input.event\nelse\n return input.type\nend"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"inputKey": "input",
|
|
97
|
+
"outputKey": "privacy_settings",
|
|
98
|
+
"transforms": [
|
|
99
|
+
{
|
|
100
|
+
"expression": {
|
|
101
|
+
"body": "-- privacy settings\nis_applicable = false\nprivacy_type = \"$$PRIVACY_TYPE$$\"\nif LOWER(privacy_type) == \"gdpr\" then is_applicable = true end\nprivacy_settings = {{\n privacy_type = privacy_type,\n is_applicable = is_applicable,\n consent_string = true\n}}\nreturn privacy_settings",
|
|
102
|
+
"lang": "lua"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"inputKey": "input",
|
|
109
|
+
"outputKey": "adid",
|
|
110
|
+
"transforms": [
|
|
111
|
+
{
|
|
112
|
+
"expression": {
|
|
113
|
+
"lang": "lua",
|
|
114
|
+
"body": "-- client side tradedesk ID set ID\nttd_id = input.context.providers.theTradeDesk.ttd_id\nif ttd_id\nthen\n return ttd_id\nend"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"inputKey": "input",
|
|
121
|
+
"outputKey": "adid_type",
|
|
122
|
+
"transforms": [
|
|
123
|
+
{
|
|
124
|
+
"expression": {
|
|
125
|
+
"body": "-- client side tradedesk ID set type\nttd_id = input.context.providers.theTradeDesk.ttd_id\nif ttd_id\nthen\n return \"TDID\"\nend",
|
|
126
|
+
"lang": "lua"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"95e2f9cdc5f12e89570bea0390456a5e"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"params": [
|
|
3
|
+
{
|
|
4
|
+
"name": "SECRET_KEY",
|
|
5
|
+
"exampleValue": "my-secret-key"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "SECRET_KEY_DATA_PROVIDER",
|
|
9
|
+
"exampleValue": "my-secret-key-data-provider"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "ADVERTISER_ID",
|
|
13
|
+
"exampleValue": "my-advertiser-id"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"default": {
|
|
17
|
+
"endpoint": "https://use-data.adsrvr.org/data/advertiser",
|
|
18
|
+
"headers": [
|
|
19
|
+
{
|
|
20
|
+
"key": "Content-Type",
|
|
21
|
+
"value": "application/json"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"method": "POST",
|
|
25
|
+
"batchSize": 100,
|
|
26
|
+
"transform": {
|
|
27
|
+
"lang": "lua",
|
|
28
|
+
"body": "request.body = {\n AdvertiserId = \"$$ADVERTISER_ID$$\",\n Items = batch,\n}\nreturn request"
|
|
29
|
+
},
|
|
30
|
+
"providerAuth": {
|
|
31
|
+
"tradedesk": {
|
|
32
|
+
"secretKey": "$$SECRET_KEY$$",
|
|
33
|
+
"secretKeyDataProvider": "$$SECRET_KEY_DATA_PROVIDER$$"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isDraft": false,
|
|
3
|
+
"isBeta": false,
|
|
4
|
+
"friendlyName": "TheTradeDesk Firstparty Advertiser Data",
|
|
5
|
+
"description": "Creates segments with a time to live to be used in different audiences\n\nDocs\nhttps://api.thetradedesk.com/v3/portal/data/doc/post-data-advertiser-firstparty\n\nPlaybook will generate segments anytime we have a TDID in the request.\nSegments Names:\n- Page view: page view | page | page title\n- Order Completed : order completed | product name | product sku\n- Order Completed : order total < 100\n- Product Added : product added | product name | product sku\n- Product Removed : product removed | product name | product sku\n\nFor order completed events with a total it will categorize the segment in $100 chunks.\nA total of $156 will create a segment named \"order total < 200\"",
|
|
6
|
+
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
|
+
"color": "#F54D44",
|
|
8
|
+
"eventSource": {
|
|
9
|
+
"isAndroidApp": true,
|
|
10
|
+
"isIosApp": true,
|
|
11
|
+
"isWebApp": true
|
|
12
|
+
},
|
|
13
|
+
"inputSchema": "analytics_js",
|
|
14
|
+
"releaseNotes": [
|
|
15
|
+
{
|
|
16
|
+
"date": "2022-11-29T00:00:00.000Z",
|
|
17
|
+
"note": "First iteration of Firstparty advertiser data"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"049bb35264639af0fca9e3b210b09537"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.0.1",
|
|
3
|
+
"params": [
|
|
4
|
+
{
|
|
5
|
+
"name": "TTL_IN_MINUTES",
|
|
6
|
+
"exampleValue": "43200"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"global": {
|
|
10
|
+
"filters": [
|
|
11
|
+
{
|
|
12
|
+
"byConditions": {
|
|
13
|
+
"action": "allow",
|
|
14
|
+
"when": {
|
|
15
|
+
"stringNotEqual": {
|
|
16
|
+
"inputPath": "context.providers.theTradeDesk.ttd_id",
|
|
17
|
+
"value": ""
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"mappings": [
|
|
24
|
+
{
|
|
25
|
+
"inputKey": "context.providers.theTradeDesk.ttd_id",
|
|
26
|
+
"outputKey": "TDID"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputKey": "input",
|
|
30
|
+
"outputKey": "Data",
|
|
31
|
+
"transforms": [
|
|
32
|
+
{
|
|
33
|
+
"expression": {
|
|
34
|
+
"lang": "lua",
|
|
35
|
+
"body": "\n-- variables needed from input schema --\nevent = LOWER(input.event)\nevent_type = LOWER(input.type)\npage_title = LOWER(input.context.page.title)\ntimestamp = input.originalTimestamp\nproducts = input.properties.products\ntotal = input.properties.total\nsingle_product_name = LOWER(input.properties.name)\nsingle_product_sku = LOWER(input.properties.sku)\n-- END --\n\nif event == null\nthen\n segment_name = \"page view | \" .. event_type .. \" | \" .. page_title\n return {{\n Name = segment_name,\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }}\nelse\n segment_name = event\n if products == null\n then\n\n if event == \"product added\" or segment_name == \"product viewed\"\n then\n segment_name = event .. \" | \" .. single_product_name .. \" | \" .. single_product_sku\n end\n return {{\n Name = segment_name,\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }}\n\n else\n p = {}\n p = MAP(products, function(p)\n return {\n Name = LOWER(event .. \" | \" .. p.name .. \" | \" .. p.sku),\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp\n }\n end\n )\n if total ~= null\n then\n\n -- function --\n function totalRounded(total, divisible)\n total = math.floor(total)\n if total <= 0\n then\n return \"= 0\"\n end\n total = math.floor((total + divisible) / divisible) * divisible\n return \"< \" .. total\n end\n -- END --\n\n table.insert(p, {\n Name = \"order total \" .. totalRounded(tonumber(total), 100),\n TTLInMinutes = TO_ROUNDED_INT($$TTL_IN_MINUTES$$),\n TimestampUtc = timestamp,\n })\n end\n return p\n end\nend"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"ef7cdafcf17f80ccce205680ee4bc6ac"
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
{
|
|
177
177
|
"expression": {
|
|
178
178
|
"lang": "lua",
|
|
179
|
-
"body": "return SUM(MAP(input.properties.products
|
|
179
|
+
"body": "return SUM(\n MAP(input.properties.products,\n function (p)\n return p.quantity or 1\n end\n))"
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
]
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
{
|
|
189
189
|
"expression": {
|
|
190
190
|
"lang": "lua",
|
|
191
|
-
"body": "return string.format(\"%.2f\"
|
|
191
|
+
"body": "return string.format(\"%.2f\",\n SUM(\n MAP(input.properties.products,\n function (p)\n return p.price * (p.quantity or 1)\n end\n )))"
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
]
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
{
|
|
221
221
|
"expression": {
|
|
222
222
|
"lang": "lua",
|
|
223
|
-
"body": "return SUM(MAP(input.properties.products
|
|
223
|
+
"body": "return SUM(\n MAP(input.properties.products,\n function (p)\n return p.quantity or 1\n end\n ))"
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"isDraft": false,
|
|
3
3
|
"isBeta": true,
|
|
4
4
|
"friendlyName": "VideoAmp",
|
|
5
|
-
"description": "The VideoAmp Platform provides measurement and optimization tools
|
|
5
|
+
"description": "The VideoAmp Platform provides measurement and optimization tools\nthat unify audiences across the disparate systems of traditional TV, streaming video and digital media.",
|
|
6
6
|
"logo": "https://cdn.metarouter.io/logo.svg",
|
|
7
7
|
"color": "#121212",
|
|
8
8
|
"eventSource": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
"d41d8cd98f00b204e9800998ecf8427e"
|
package/index.js
CHANGED
|
@@ -169,6 +169,13 @@ exports['google-pubsub'] = {
|
|
|
169
169
|
metadata: require('./.dist/google-pubsub/metadata.json')
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
exports['hubspot-event'] = {
|
|
173
|
+
connectionTemplate: connectionSchemas.properties.hubspotEvent,
|
|
174
|
+
endpointSchema: require('./.dist/hubspot-event/connection.json'),
|
|
175
|
+
playbook: require('./.dist/hubspot-event/playbook.json'),
|
|
176
|
+
metadata: require('./.dist/hubspot-event/metadata.json')
|
|
177
|
+
}
|
|
178
|
+
|
|
172
179
|
exports['impact-radius'] = {
|
|
173
180
|
connectionTemplate: connectionSchemas.properties.impactRadius,
|
|
174
181
|
endpointSchema: require('./.dist/impact-radius/connection.json'),
|
|
@@ -277,6 +284,20 @@ exports.snowflake = {
|
|
|
277
284
|
metadata: require('./.dist/snowflake/metadata.json')
|
|
278
285
|
}
|
|
279
286
|
|
|
287
|
+
exports['thetradedesk-conversion-events'] = {
|
|
288
|
+
connectionTemplate: '',
|
|
289
|
+
endpointSchema: require('./.dist/thetradedesk-conversion-events/connection.json'),
|
|
290
|
+
playbook: require('./.dist/thetradedesk-conversion-events/playbook.json'),
|
|
291
|
+
metadata: require('./.dist/thetradedesk-conversion-events/metadata.json')
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
exports['thetradedesk-data-advertiser-firstparty'] = {
|
|
295
|
+
connectionTemplate: '',
|
|
296
|
+
endpointSchema: require('./.dist/thetradedesk-data-advertiser-firstparty/connection.json'),
|
|
297
|
+
playbook: require('./.dist/thetradedesk-data-advertiser-firstparty/playbook.json'),
|
|
298
|
+
metadata: require('./.dist/thetradedesk-data-advertiser-firstparty/metadata.json')
|
|
299
|
+
}
|
|
300
|
+
|
|
280
301
|
exports['twitter-conversions'] = {
|
|
281
302
|
connectionTemplate: connectionSchemas.properties.twitterConversions,
|
|
282
303
|
endpointSchema: require('./.dist/twitter-conversions/connection.json'),
|
|
@@ -426,6 +447,11 @@ exports.etags = {
|
|
|
426
447
|
playbook: require('./.dist/google-pubsub/playbook.etag.json'),
|
|
427
448
|
kit: require('./.dist/google-pubsub/kit.etag.json')
|
|
428
449
|
},
|
|
450
|
+
'hubspot-event': {
|
|
451
|
+
endpointSchema: require('./.dist/hubspot-event/connection.etag.json'),
|
|
452
|
+
playbook: require('./.dist/hubspot-event/playbook.etag.json'),
|
|
453
|
+
kit: require('./.dist/hubspot-event/kit.etag.json')
|
|
454
|
+
},
|
|
429
455
|
'impact-radius': {
|
|
430
456
|
endpointSchema: require('./.dist/impact-radius/connection.etag.json'),
|
|
431
457
|
playbook: require('./.dist/impact-radius/playbook.etag.json'),
|
|
@@ -502,6 +528,16 @@ exports.etags = {
|
|
|
502
528
|
playbook: require('./.dist/snowflake/playbook.etag.json'),
|
|
503
529
|
kit: require('./.dist/snowflake/kit.etag.json')
|
|
504
530
|
},
|
|
531
|
+
'thetradedesk-conversion-events': {
|
|
532
|
+
endpointSchema: require('./.dist/thetradedesk-conversion-events/connection.etag.json'),
|
|
533
|
+
playbook: require('./.dist/thetradedesk-conversion-events/playbook.etag.json'),
|
|
534
|
+
kit: require('./.dist/thetradedesk-conversion-events/kit.etag.json')
|
|
535
|
+
},
|
|
536
|
+
'thetradedesk-data-advertiser-firstparty': {
|
|
537
|
+
endpointSchema: require('./.dist/thetradedesk-data-advertiser-firstparty/connection.etag.json'),
|
|
538
|
+
playbook: require('./.dist/thetradedesk-data-advertiser-firstparty/playbook.etag.json'),
|
|
539
|
+
kit: require('./.dist/thetradedesk-data-advertiser-firstparty/kit.etag.json')
|
|
540
|
+
},
|
|
505
541
|
'twitter-conversions': {
|
|
506
542
|
endpointSchema: require('./.dist/twitter-conversions/connection.etag.json'),
|
|
507
543
|
playbook: require('./.dist/twitter-conversions/playbook.etag.json'),
|