@metarouter/ajs-starter-kit 1.0.85 → 1.0.86

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.
@@ -308,6 +308,9 @@
308
308
  "password": {
309
309
  "type": "string"
310
310
  },
311
+ "privateKey": {
312
+ "type": "string"
313
+ },
311
314
  "s3": {
312
315
  "type": "object",
313
316
  "properties": {
@@ -348,6 +351,12 @@
348
351
  ],
349
352
  "additionalProperties": false
350
353
  },
354
+ "schema": {
355
+ "type": "string"
356
+ },
357
+ "snowpipe": {
358
+ "type": "string"
359
+ },
351
360
  "user": {
352
361
  "type": "string"
353
362
  },
@@ -360,7 +369,10 @@
360
369
  "password",
361
370
  "account",
362
371
  "database",
363
- "warehouse"
372
+ "warehouse",
373
+ "schema",
374
+ "snowpipe",
375
+ "privateKey"
364
376
  ],
365
377
  "additionalProperties": false
366
378
  }
@@ -0,0 +1 @@
1
+ "21a2bba123af5e571f72ec27eaceda10"
@@ -0,0 +1,40 @@
1
+ {
2
+ "default": {
3
+ "endpoint": "https://heapanalytics.com/api/track",
4
+ "method": "POST",
5
+ "headers": [
6
+ {
7
+ "key": "Content-Type",
8
+ "value": "application/json"
9
+ },
10
+ {
11
+ "key": "Accept-Encoding",
12
+ "value": "gzip, compress, br"
13
+ },
14
+ {
15
+ "key": "User-Agent",
16
+ "fromEventKey": "context.userAgent"
17
+ }
18
+ ]
19
+ },
20
+ "eventSpecific": {
21
+ "identify": {
22
+ "endpoint": "https://heapanalytics.com/api/v1/identify",
23
+ "method": "POST",
24
+ "headers": [
25
+ {
26
+ "key": "Content-Type",
27
+ "value": "application/json"
28
+ },
29
+ {
30
+ "key": "Accept-Encoding",
31
+ "value": "gzip, compress, br"
32
+ },
33
+ {
34
+ "key": "User-Agent",
35
+ "fromEventKey": "context.userAgent"
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ }
@@ -0,0 +1 @@
1
+ "77c1ad3f5a88995814a8a8a49b9d6eb9"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Heap",
5
+ "description": "Heap is a digital insights platform that gives clients complete understanding of their customers' digital journeys.",
6
+ "logo": "https://cdn.metarouter.io/heap.png",
7
+ "color": "#0F0942",
8
+ "eventSource": {
9
+ "isAndroidApp": false,
10
+ "isIosApp": false,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-03-26T05:00:00.000Z",
17
+ "note": "heap initial release."
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "30f89a94d9208b45228b3300c646845f"
@@ -0,0 +1,217 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "params": [
4
+ {
5
+ "name": "MY_APP_ID",
6
+ "defaultValue": "my-app-id",
7
+ "exampleValue": "123456789",
8
+ "description": "The environment ID corresponding to one of your environments.",
9
+ "isOptional": false
10
+ },
11
+ {
12
+ "name": "MY_USER_ID",
13
+ "defaultValue": "my-user-id",
14
+ "description": "The user_id from the Heap SDK. The user_id must be the string representation of a number between zero and 2^53 - 1.",
15
+ "isOptional": true,
16
+ "exampleValue": "1111111111111111"
17
+ }
18
+ ],
19
+ "global": {
20
+ "enrichments": [
21
+ {
22
+ "staticString": "$$MY_APP_ID$$",
23
+ "outputKey": "app_id"
24
+ }
25
+ ]
26
+ },
27
+ "default": {
28
+ "filters": [
29
+ {
30
+ "byEventNames": {
31
+ "action": "allow",
32
+ "events": [
33
+ ""
34
+ ]
35
+ }
36
+ }
37
+ ]
38
+ },
39
+ "eventSpecific": {
40
+ "cart_viewed": {
41
+ "mappings": [
42
+ {
43
+ "inputKey": "input",
44
+ "outputKey": "events",
45
+ "transforms": [
46
+ {
47
+ "expression": {
48
+ "lang": "lua",
49
+ "body": "if input.properties.products[1] ~= nil then\n return MAP(input.properties.products, function(p)\n return {\n identity = input.anonymousId,\n timestamp = input.timestamp,\n event = input.event,\n properties = {\n cart_id = input.properties.cart_id,\n category = p.category,\n image_url = p.image_url,\n name = p.name,\n product_id = p.product_id,\n sku = p.sku,\n url = p.url,\n price = TO_TRUNCATED_FLOAT(p.price, 2),\n revenue = TO_TRUNCATED_FLOAT(p.price * (p.quantity or 1), 2)\n }\n }\n end)\nelse\n return {{\n identity = input.anonymousId,\n timestamp = input.timestamp,\n event = input.event,\n properties = {\n cart_id = input.properties.cart_id\n }\n }}\nend\n"
50
+ }
51
+ }
52
+ ]
53
+ }
54
+ ]
55
+ },
56
+ "checkout_started": {
57
+ "mappings": [
58
+ {
59
+ "inputKey": "input",
60
+ "outputKey": "events",
61
+ "transforms": [
62
+ {
63
+ "expression": {
64
+ "lang": "lua",
65
+ "body": "return MAP(input.properties.products, function(p)\n return {\n identity = input.anonymousId,\n timestamp = input.timestamp,\n event = input.event,\n properties = {\n category = p.category,\n image_url = p.image_url,\n name = p.name,\n product_id = p.product_id,\n sku = p.sku,\n url = p.url,\n price = TO_TRUNCATED_FLOAT(p.price, 2),\n revenue = TO_TRUNCATED_FLOAT(p.price * (p.quantity or 1), 2)\n }\n }\nend)\n"
66
+ }
67
+ }
68
+ ]
69
+ }
70
+ ]
71
+ },
72
+ "order_completed": {
73
+ "mappings": [
74
+ {
75
+ "inputKey": "input",
76
+ "outputKey": "events",
77
+ "transforms": [
78
+ {
79
+ "expression": {
80
+ "lang": "lua",
81
+ "body": "if input.properties.products[1] ~= nil then\n return MAP(input.properties.products, function(p)\n return {\n identity = input.anonymousId,\n timestamp = input.timestamp,\n event = input.event,\n properties = {\n order_id = input.properties.order_id,\n category = p.category,\n image_url = p.image_url,\n name = p.name,\n product_id = p.product_id,\n sku = p.sku,\n url = p.url,\n price = TO_TRUNCATED_FLOAT(p.price, 2),\n revenue = TO_TRUNCATED_FLOAT(p.price * (p.quantity or 1), 2)\n }\n }\n end)\nelse\n return {{\n identity = input.anonymousId,\n timestamp = input.timestamp,\n event = input.event,\n properties = {\n order_id = input.properties.order_id\n }\n }}\nend\n"
82
+ }
83
+ }
84
+ ]
85
+ }
86
+ ]
87
+ },
88
+ "page": {
89
+ "mappings": [
90
+ {
91
+ "inputKey": "input",
92
+ "outputKey": "events",
93
+ "transforms": [
94
+ {
95
+ "expression": {
96
+ "lang": "lua",
97
+ "body": "return {{\n identity = input.anonymousId,\n event = \"Pageview\",\n timestamp = input.timestamp,\n properties = {\n path = input.properties.path or input.page.path,\n referrer = input.page.path or input.properties.referrer,\n search = input.page.path or input.properties.search,\n title = input.page.path or input.properties.title,\n url = input.page.path or input.properties.url\n }\n}}\n"
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ ]
103
+ },
104
+ "payment_info_entered": {
105
+ "mappings": [
106
+ {
107
+ "inputKey": "input",
108
+ "outputKey": "events",
109
+ "transforms": [
110
+ {
111
+ "expression": {
112
+ "lang": "lua",
113
+ "body": "return {{\n identity = input.anonymousId,\n event = input.event,\n properties = {\n checkout_id = input.properties.checkout_id,\n order_id = input.properties.order_id\n }\n}}\n"
114
+ }
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ },
120
+ "product_added": {
121
+ "mappings": [
122
+ {
123
+ "inputKey": "input",
124
+ "outputKey": "events",
125
+ "transforms": [
126
+ {
127
+ "expression": {
128
+ "lang": "lua",
129
+ "body": "return {{\n identity = input.anonymousId,\n event = input.event,\n timestamp = input.timestamp,\n properties = {\n checkout_id = input.properties.checkout_id,\n brand = input.properties.brand,\n cart_id = input.properties.cart_id,\n category = input.properties.category,\n coupon = input.properties.coupon,\n image_url = input.properties.image_url,\n name = input.properties.name,\n position = input.properties.position,\n price = input.properties.price,\n product_id = input.properties.product_id,\n quantity = input.properties.quantity,\n sku = input.properties.sku,\n url = input.properties.url,\n variant = input.properties.variant\n }\n}}\n"
130
+ }
131
+ }
132
+ ]
133
+ }
134
+ ]
135
+ },
136
+ "product_clicked": {
137
+ "mappings": [
138
+ {
139
+ "inputKey": "input",
140
+ "outputKey": "events",
141
+ "transforms": [
142
+ {
143
+ "expression": {
144
+ "lang": "lua",
145
+ "body": "return {{\n identity = input.anonymousId,\n event = input.event,\n timestamp = input.timestamp,\n properties = {\n checkout_id = input.properties.checkout_id,\n brand = input.properties.brand,\n cart_id = input.properties.cart_id,\n category = input.properties.category,\n coupon = input.properties.coupon,\n image_url = input.properties.image_url,\n name = input.properties.name,\n position = input.properties.position,\n price = input.properties.price,\n product_id = input.properties.product_id,\n quantity = input.properties.quantity,\n sku = input.properties.sku,\n url = input.properties.url,\n variant = input.properties.variant\n }\n}}\n"
146
+ }
147
+ }
148
+ ]
149
+ }
150
+ ]
151
+ },
152
+ "product_list_viewed": {
153
+ "mappings": [
154
+ {
155
+ "inputKey": "input",
156
+ "outputKey": "events",
157
+ "transforms": [
158
+ {
159
+ "expression": {
160
+ "lang": "lua",
161
+ "body": "if input.properties.products[1] ~= nil then\n return MAP(input.properties.products, function(p)\n return {\n identity = input.anonymousId,\n timestamp = input.timestamp,\n event = input.event,\n properties = {\n list_id = input.properties.list_id,\n category = p.category,\n image_url = p.image_url,\n name = p.name,\n product_id = p.product_id,\n sku = p.sku,\n url = p.url,\n price = TO_TRUNCATED_FLOAT(p.price, 2),\n revenue = TO_TRUNCATED_FLOAT(p.price * (p.quantity or 1), 2)\n }\n }\n end)\nelse\n return {{\n identity = input.anonymousId,\n timestamp = input.timestamp,\n event = input.event,\n properties = {\n list_id = input.properties.list_id,\n category = p.category\n }\n }}\nend\n"
162
+ }
163
+ }
164
+ ]
165
+ }
166
+ ]
167
+ },
168
+ "product_viewed": {
169
+ "mappings": [
170
+ {
171
+ "inputKey": "input",
172
+ "outputKey": "events",
173
+ "transforms": [
174
+ {
175
+ "expression": {
176
+ "lang": "lua",
177
+ "body": "return {{\n identity = input.anonymousId,\n event = input.event,\n timestamp = input.timestamp,\n properties = {\n checkout_id = input.properties.checkout_id,\n brand = input.properties.brand,\n cart_id = input.properties.cart_id,\n category = input.properties.category,\n coupon = input.properties.coupon,\n image_url = input.properties.image_url,\n name = input.properties.name,\n position = input.properties.position,\n price = input.properties.price,\n product_id = input.properties.product_id,\n quantity = input.properties.quantity,\n sku = input.properties.sku,\n url = input.properties.url,\n variant = input.properties.variant\n }\n}}\n"
178
+ }
179
+ }
180
+ ]
181
+ }
182
+ ]
183
+ },
184
+ "products_searched": {
185
+ "mappings": [
186
+ {
187
+ "inputKey": "input",
188
+ "outputKey": "events",
189
+ "transforms": [
190
+ {
191
+ "expression": {
192
+ "lang": "lua",
193
+ "body": "return {{\n identity = input.anonymousId,\n event = input.event,\n timestamp = input.timestamp,\n properties = {\n query = input.properties.query\n }\n}}\n"
194
+ }
195
+ }
196
+ ]
197
+ }
198
+ ]
199
+ },
200
+ "promotion_clicked": {
201
+ "mappings": [
202
+ {
203
+ "inputKey": "input",
204
+ "outputKey": "events",
205
+ "transforms": [
206
+ {
207
+ "expression": {
208
+ "lang": "lua",
209
+ "body": "return {{\n identity = input.anonymousId,\n event = input.event,\n timestamp = input.timestamp,\n properties = {\n creative = input.properties.creative,\n name = input.properties.name,\n position = input.properties.position,\n promotion_id = input.properties.promotion_id\n }\n}}\n"
210
+ }
211
+ }
212
+ ]
213
+ }
214
+ ]
215
+ }
216
+ }
217
+ }
@@ -1 +1 @@
1
- "22ebc0d235967435421c801b901ee9bc"
1
+ "7c9f9e56f3822212c9522cad93640ec9"
@@ -1,16 +1,68 @@
1
1
  {
2
+ "params": [
3
+ {
4
+ "name": "USER",
5
+ "exampleValue": "my-user"
6
+ },
7
+ {
8
+ "name": "PASSWORD",
9
+ "exampleValue": "my-password"
10
+ },
11
+ {
12
+ "name": "ACCOUNT",
13
+ "exampleValue": "my-account"
14
+ },
15
+ {
16
+ "name": "DATABASE",
17
+ "exampleValue": "my-database"
18
+ },
19
+ {
20
+ "name": "WAREHOUSE",
21
+ "exampleValue": "my-warehouse"
22
+ },
23
+ {
24
+ "name": "SCHEMA",
25
+ "exampleValue": "my-schema"
26
+ },
27
+ {
28
+ "name": "SNOWPIPE",
29
+ "exampleValue": "my-snowpipe"
30
+ },
31
+ {
32
+ "name": "PRIVATE_KEY",
33
+ "exampleValue": "my-private-key"
34
+ },
35
+ {
36
+ "name": "REGION",
37
+ "exampleValue": "my-region"
38
+ },
39
+ {
40
+ "name": "BUCKET",
41
+ "exampleValue": "my-bucket"
42
+ },
43
+ {
44
+ "name": "ACCESS_KEY",
45
+ "exampleValue": "my-access-key"
46
+ },
47
+ {
48
+ "name": "SECRET_KEY",
49
+ "exampleValue": "my-secret-key"
50
+ }
51
+ ],
2
52
  "snowflake": {
3
- "user": "my-user",
4
- "password": "my-password",
5
- "account": "my-account",
6
- "database": "my-database",
7
- "warehouse": "my-warehouse",
8
- "privateKey": "my-private-key",
53
+ "user": "$$USER$$",
54
+ "password": "$$PASSWORD$$",
55
+ "account": "$$ACCOUNT$$",
56
+ "database": "$$DATABASE$$",
57
+ "warehouse": "$$WAREHOUSE$$",
58
+ "privateKey": "$$PRIVATE_KEY$$",
59
+ "schema": "$$SCHEMA$$",
60
+ "snowpipe": "$$SNOWPIPE$$",
9
61
  "s3": {
10
- "region": "us-east-1",
11
- "bucket": "my-bucket",
12
- "access_key": "my-access-key",
13
- "secret_key": "my-access-secret"
62
+ "region": "$$REGION$$",
63
+ "bucket": "$$BUCKET$$",
64
+ "access_key": "$$ACCESS_KEY$$",
65
+ "secret_key": "$$SECRET_KEY$$"
14
66
  }
15
67
  }
16
68
  }
@@ -1 +1 @@
1
- "814eff5000dc4ff9d79d89b8e52d8587"
1
+ "410098789d41db5cf2f0d86cf73de6c8"
@@ -1,10 +1,10 @@
1
1
  {
2
- "isDraft": true,
3
- "isBeta": false,
2
+ "isDraft": false,
3
+ "isBeta": true,
4
4
  "friendlyName": "Snowflake",
5
- "description": "Snowflake is a fully-managed service that’s simple to use but can power a near-unlimited number of concurrent workloads.",
5
+ "description": "Snowflake is a cloud-based data storage and analytics service that provides rapid, easy-to-work-with access to extensive amounts of data.",
6
6
  "logo": "https://cdn.metarouter.io/logo.svg",
7
- "color": "#29b5e8",
7
+ "color": "#c6fbff",
8
8
  "eventSource": {
9
9
  "isAndroidApp": true,
10
10
  "isIosApp": true,
@@ -23,6 +23,14 @@
23
23
  {
24
24
  "date": "2023-12-13T00:00:00.000Z",
25
25
  "note": "Marked as unstable version: 0.1.0"
26
+ },
27
+ {
28
+ "date": "2023-02-07T00:00:00.000Z",
29
+ "note": "Marked as beta"
30
+ },
31
+ {
32
+ "date": "2024-03-26T00:00:00.000Z",
33
+ "note": "Enabled playbook"
26
34
  }
27
35
  ]
28
36
  }
@@ -1 +1 @@
1
- "f16c24c256a8b248553c8ae3bd5d5384"
1
+ "0ebe2986dc2c9445e8978caa77f44e95"
@@ -1,3 +1,11 @@
1
1
  {
2
- "version": "0.1.0"
2
+ "version": "0.1.1",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
3
11
  }
@@ -1 +1 @@
1
- "2d57b3ceaeb3567381f3690ebf634f0c"
1
+ "e3958940b396b0077d5813f518dbce3e"
package/README.md CHANGED
@@ -9,7 +9,9 @@ previously.
9
9
  - Commission Junction (BETA)
10
10
  - Criteo (BETA)
11
11
  - Facebook Pixel
12
+ - Heap (BETA)
12
13
  - Reddit Ads
14
+ - Snowflake (BETA)
13
15
 
14
16
  ## 2024-02
15
17
  - Azure Blob
@@ -80,7 +82,9 @@ previously.
80
82
  | Commission Junction (BETA) | 2024-03 | Bugfix: `cjevent` spelling; `cjEvent` sent only for `order_completed` events. Moved the `actionTrackerId` value as the value of the `ACTION_TRACKER_ID` param. |
81
83
  | Criteo (BETA) | 2024-03 | Migrated to Server to Server endpoint |
82
84
  | Facebook Pixel | 2024-03 | Moved context.providors.facebookPixel to context.providers.facebookTag |
85
+ | Heap (BETA) | 2024-03 | heap initial release. |
83
86
  | Reddit Ads | 2024-03 | Updated Standard events usage Version bump: 1.1.0 |
87
+ | Snowflake (BETA) | 2024-03 | Enabled playbook |
84
88
  | Azure Blob | 2024-02 | Removed Identity |
85
89
  | Google Cloud Storage (BETA) | 2024-02 | Removed Identity |
86
90
  | Google Pub/Sub | 2024-02 | Removed Identity |
package/index.js CHANGED
@@ -194,13 +194,18 @@ exports['google-pubsub'] = {
194
194
  playbook: require('./.dist/google-pubsub/playbook.json'),
195
195
  metadata: require('./.dist/google-pubsub/metadata.json')
196
196
  }
197
-
198
- exports['hubspot-event'] = {
199
- connectionTemplate: connectionSchemas.properties.hubspotEvent,
200
- endpointSchema: require('./.dist/hubspot-event/connection.json'),
201
- playbook: require('./.dist/hubspot-event/playbook.json'),
202
- metadata: require('./.dist/hubspot-event/metadata.json')
203
- }
197
+ exports.heap = {
198
+ connectionTemplate: connectionSchemas.properties.convert,
199
+ endpointSchema: require('./.dist/heap/connection.json'),
200
+ playbook: require('./.dist/heap/playbook.json'),
201
+ metadata: require('./.dist/heap/metadata.json')
202
+ },
203
+ exports['hubspot-event'] = {
204
+ connectionTemplate: connectionSchemas.properties.hubspotEvent,
205
+ endpointSchema: require('./.dist/hubspot-event/connection.json'),
206
+ playbook: require('./.dist/hubspot-event/playbook.json'),
207
+ metadata: require('./.dist/hubspot-event/metadata.json')
208
+ }
204
209
 
205
210
  exports['impact-radius'] = {
206
211
  connectionTemplate: connectionSchemas.properties.impactRadius,
@@ -584,6 +589,11 @@ exports.etags = {
584
589
  playbook: require('./.dist/google-pubsub/playbook.etag.json'),
585
590
  kit: require('./.dist/google-pubsub/kit.etag.json')
586
591
  },
592
+ heap: {
593
+ endpointSchema: require('./.dist/heap/connection.etag.json'),
594
+ playbook: require('./.dist/heap/playbook.etag.json'),
595
+ kit: require('./.dist/heap/kit.etag.json')
596
+ },
587
597
  'hubspot-event': {
588
598
  endpointSchema: require('./.dist/hubspot-event/connection.etag.json'),
589
599
  playbook: require('./.dist/hubspot-event/playbook.etag.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.85",
3
+ "version": "1.0.86",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {