@metarouter/ajs-starter-kit 1.0.93 → 1.0.95

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.
Files changed (40) hide show
  1. package/.dist/build-your-own/connection.etag.json +1 -0
  2. package/.dist/build-your-own/connection.json +22 -0
  3. package/.dist/build-your-own/kit.etag.json +1 -0
  4. package/.dist/build-your-own/metadata.json +20 -0
  5. package/.dist/build-your-own/playbook.etag.json +1 -0
  6. package/.dist/build-your-own/playbook.json +11 -0
  7. package/.dist/clinch/kit.etag.json +1 -1
  8. package/.dist/clinch/metadata.json +4 -0
  9. package/.dist/clinch/playbook.etag.json +1 -1
  10. package/.dist/clinch/playbook.json +14 -2
  11. package/.dist/connection-schemas.json +74 -2
  12. package/.dist/google-ads-audience/connection.etag.json +1 -0
  13. package/.dist/google-ads-audience/connection.json +36 -0
  14. package/.dist/google-ads-audience/kit.etag.json +1 -0
  15. package/.dist/google-ads-audience/metadata.json +18 -0
  16. package/.dist/google-ads-audience/playbook.etag.json +1 -0
  17. package/.dist/google-ads-audience/playbook.json +21 -0
  18. package/.dist/google-analytics-4-collect/kit.etag.json +1 -1
  19. package/.dist/google-analytics-4-collect/metadata.json +4 -0
  20. package/.dist/google-analytics-4-collect/playbook.etag.json +1 -1
  21. package/.dist/google-analytics-4-collect/playbook.json +21 -5
  22. package/.dist/google-cm360/connection.etag.json +1 -1
  23. package/.dist/google-cm360/connection.json +12 -2
  24. package/.dist/google-cm360/kit.etag.json +1 -1
  25. package/.dist/google-cm360/metadata.json +4 -0
  26. package/.dist/nextdoor-capi/connection.etag.json +1 -0
  27. package/.dist/nextdoor-capi/connection.json +23 -0
  28. package/.dist/nextdoor-capi/kit.etag.json +1 -0
  29. package/.dist/nextdoor-capi/metadata.json +20 -0
  30. package/.dist/nextdoor-capi/playbook.etag.json +1 -0
  31. package/.dist/nextdoor-capi/playbook.json +223 -0
  32. package/.dist/snapchat-capi/connection.etag.json +1 -0
  33. package/.dist/snapchat-capi/connection.json +29 -0
  34. package/.dist/snapchat-capi/kit.etag.json +1 -0
  35. package/.dist/snapchat-capi/metadata.json +20 -0
  36. package/.dist/snapchat-capi/playbook.etag.json +1 -0
  37. package/.dist/snapchat-capi/playbook.json +720 -0
  38. package/README.md +16 -6
  39. package/index.js +162 -167
  40. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ "7436091922570e087681642eeccf224a"
@@ -0,0 +1,22 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "ENDPOINT",
5
+ "exampleValue": "my-endpoint"
6
+ }
7
+ ],
8
+ "default": {
9
+ "endpoint": "$$ENDPOINT$$",
10
+ "headers": [
11
+ {
12
+ "key": "Content-Type",
13
+ "value": "application/json"
14
+ },
15
+ {
16
+ "key": "Accept-Encoding",
17
+ "value": "application/json"
18
+ }
19
+ ],
20
+ "method": "POST"
21
+ }
22
+ }
@@ -0,0 +1 @@
1
+ "0e1da4b583dccc688ded3473ddfd3317"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Build Your Own",
5
+ "description": "Create your own integration with a third-party vendor.",
6
+ "logo": "https://cdn.metarouter.io/clinch.png",
7
+ "color": "#2b3066",
8
+ "eventSource": {
9
+ "isAndroidApp": true,
10
+ "isIosApp": true,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-05-29T00:00:00.000Z",
17
+ "note": "Version: 0.1.0\nBeta Version\nBYO initial release"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "b369e2c36983957aec3cfe2f3c3bee4b"
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
11
+ }
@@ -1 +1 @@
1
- "bb5f1493bec844c06b5be5339db26bc8"
1
+ "5cc3f74ca233fe79f65468ea9402b936"
@@ -15,6 +15,10 @@
15
15
  {
16
16
  "date": "2024-04-24T00:00:00.000Z",
17
17
  "note": "Version: 0.1.0\nBeta Version\nClinch initial release"
18
+ },
19
+ {
20
+ "date": "2024-05-29T00:00:00.000Z",
21
+ "note": "Version: 0.2.0\nAdding email and cookie id\nAdding new `identify` event"
18
22
  }
19
23
  ]
20
24
  }
@@ -1 +1 @@
1
- "951c2216d3ed21325ca668032a97ee10"
1
+ "cdf4a552559724196307adf15bd7b93e"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0",
2
+ "version": "0.2.0",
3
3
  "params": [
4
4
  {
5
5
  "name": "CLIENT_ID",
@@ -45,6 +45,10 @@
45
45
  }
46
46
  ],
47
47
  "mappings": [
48
+ {
49
+ "inputKey": "context.providers.clinch.sid",
50
+ "outputKey": "clinch-sid"
51
+ },
48
52
  {
49
53
  "inputKey": "input",
50
54
  "outputKey": "timestamp",
@@ -75,7 +79,7 @@
75
79
  "transforms": [
76
80
  {
77
81
  "expression": {
78
- "body": "if input.context.traits.email then return TO_SHA256_HASH(LOWER(TRIM(input.context.traits.email))) end",
82
+ "body": "local email = input.traits.email or input.context.traits.email\nif (email) then return TO_SHA256_HASH(LOWER(TRIM(email))) end",
79
83
  "lang": "lua"
80
84
  }
81
85
  }
@@ -90,6 +94,14 @@
90
94
  ]
91
95
  },
92
96
  "eventSpecific": {
97
+ "identify": {
98
+ "enrichments": [
99
+ {
100
+ "staticString": "Other",
101
+ "outputKey": "type"
102
+ }
103
+ ]
104
+ },
93
105
  "page": {
94
106
  "enrichments": [
95
107
  {
@@ -67,6 +67,38 @@
67
67
  ],
68
68
  "additionalProperties": false
69
69
  },
70
+ "googleAdsAudience": {
71
+ "type": "object",
72
+ "properties": {
73
+ "audienceId": {
74
+ "type": "string"
75
+ },
76
+ "customerId": {
77
+ "type": "string"
78
+ },
79
+ "developerToken": {
80
+ "type": "string"
81
+ },
82
+ "principalEmail": {
83
+ "type": "string"
84
+ },
85
+ "privateKey": {
86
+ "type": "string"
87
+ },
88
+ "serviceAccountEmail": {
89
+ "type": "string"
90
+ }
91
+ },
92
+ "required": [
93
+ "audienceId",
94
+ "customerId",
95
+ "developerToken",
96
+ "privateKey",
97
+ "principalEmail",
98
+ "serviceAccountEmail"
99
+ ],
100
+ "additionalProperties": false
101
+ },
70
102
  "googleBigqueryStreaming": {
71
103
  "type": "object",
72
104
  "properties": {
@@ -99,11 +131,14 @@
99
131
  },
100
132
  "profileId": {
101
133
  "type": "number"
134
+ },
135
+ "profileIdStr": {
136
+ "type": "string"
102
137
  }
103
138
  },
104
139
  "required": [
105
- "profileId",
106
- "credentialsJson"
140
+ "credentialsJson",
141
+ "profileIdStr"
107
142
  ],
108
143
  "additionalProperties": false
109
144
  },
@@ -377,6 +412,43 @@
377
412
  "privateKey"
378
413
  ],
379
414
  "additionalProperties": false
415
+ },
416
+ "testTimeout": {
417
+ "type": "object",
418
+ "properties": {
419
+ "timeoutMax": {
420
+ "type": "object",
421
+ "properties": {
422
+ "nanos": {
423
+ "type": "number"
424
+ },
425
+ "seconds": {
426
+ "type": "number"
427
+ }
428
+ },
429
+ "additionalProperties": false
430
+ },
431
+ "timeoutMin": {
432
+ "type": "object",
433
+ "properties": {
434
+ "nanos": {
435
+ "type": "number"
436
+ },
437
+ "seconds": {
438
+ "type": "number"
439
+ }
440
+ },
441
+ "additionalProperties": false
442
+ },
443
+ "timeoutPercent": {
444
+ "type": "number"
445
+ }
446
+ },
447
+ "required": [
448
+ "timeoutMax",
449
+ "timeoutPercent"
450
+ ],
451
+ "additionalProperties": false
380
452
  }
381
453
  },
382
454
  "additionalProperties": false
@@ -0,0 +1 @@
1
+ "dd5d5b5086806dc799fba93b944e6fe5"
@@ -0,0 +1,36 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "AUDIENCE_ID",
5
+ "defaultValue": "audience_id"
6
+ },
7
+ {
8
+ "name": "CUSTOMER_ID",
9
+ "defaultValue": "customer_id"
10
+ },
11
+ {
12
+ "name": "DEVELOPER_TOKEN",
13
+ "defaultValue": "developer_token"
14
+ },
15
+ {
16
+ "name": "PRINCIPAL_EMAIL",
17
+ "defaultValue": "principal_email"
18
+ },
19
+ {
20
+ "name": "PRIVATE_KEY",
21
+ "defaultValue": "private_key"
22
+ },
23
+ {
24
+ "name": "SERVICE_ACCOUNT_EMAIL",
25
+ "defaultValue": "service_account_email"
26
+ }
27
+ ],
28
+ "google_ads_audience": {
29
+ "audience_id": "$$AUDIENCE_ID$$",
30
+ "customer_id": "$$CUSTOMER_ID$$",
31
+ "developer_token": "$$DEVELOPER_TOKEN$$",
32
+ "principal_email": "$$PRINCIPAL_EMAIL$$",
33
+ "private_key": "$$PRIVATE_KEY$$",
34
+ "service_account_email": "$$SERVICE_ACCOUNT_EMAIL$$"
35
+ }
36
+ }
@@ -0,0 +1 @@
1
+ "007a6fa7c4ba24ea16c9f9dc55e91cf7"
@@ -0,0 +1,18 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Google Ads Audience",
5
+ "description": "Based on an AUDIENCE_ID, this job adds operations to the specified offline user data job.\nIt specifically adds the ajs annonimous ID to the job. When the event is an order completed, it adds details about that product.\nThis playbook was built based on this document https://developers.google.com/google-ads/api/rest/reference/rest/v16/customers.offlineUserDataJobs/addOperations\n",
6
+ "logo": "https://cdn.metarouter.io/logo.svg",
7
+ "color": "#4185f5",
8
+ "eventSource": {
9
+ "isWebApp": true
10
+ },
11
+ "inputSchema": "analytics_js",
12
+ "releaseNotes": [
13
+ {
14
+ "date": "2024-05-29T00:00:00.000Z",
15
+ "note": "Google Ads Audience initial release, version 0.1.0."
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1 @@
1
+ "b50a7f40db43c66953cc042623bbead0"
@@ -0,0 +1,21 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "lang": "lua",
7
+ "body": "local data = {\n userIdentifiers = {\n {\n thirdPartyUserId = input.anonymousId\n }\n },\n consent = {\n adUserData = \"GRANTED\",\n adPersonalization = \"GRANTED\"\n }\n}\nreturn data"
8
+ }
9
+ ]
10
+ },
11
+ "eventSpecific": {
12
+ "order_completed": {
13
+ "expressions": [
14
+ {
15
+ "lang": "lua",
16
+ "body": "local DEFAULT_COUNTRY_CODE = \"US\"\nlocal DEFAULT_CURRENCY_CODE = \"USD\"\nlocal DEFAULT_LANGUAGE_CODE = \"en\"\nif input.properties.products == nil then\n return\nend\nif input.properties.products[1] == nil then\n return\nend\nlocal currencyCode = DEFAULT_CURRENCY_CODE\nif input.properties.currency ~= nil then\n currencyCode = input.properties.currency\nend\n-- Code formats https://developers.google.com/google-ads/api/data/codes-formats#country-codes\nfunction splitLocale(inputText)\n if inputText == nil then\n return DEFAULT_LANGUAGE_CODE, DEFAULT_COUNTRY_CODE\n end\n local parts = {}\n for part in string.gmatch(inputText, \"([^%-]+)\") do\n table.insert(parts, part)\n end\n -- Assign language and country with defaults\n local language = parts[1] or DEFAULT_LANGUAGE_CODE\n local country = parts[2] or DEFAULT_COUNTRY_CODE\n return language, country\nend\nlocal languageCode, countryCode = splitLocale(input.context.locale)\nlocal data = {\n transactionAttribute = {\n transactionDateTime = TO_DATE_TIME(input.timestamp, {outputFormat = \"2006-01-02 15:04:05\"}),\n transactionAmountMicros = input.properties.total * 1000000,\n currencyCode = currencyCode,\n orderId = tostring(input.properties.order_id),\n itemAttribute = {\n itemId = input.properties.products[1].product_id,\n countryCode = countryCode,\n languageCode = languageCode,\n quantity = input.properties.products[1].quantity\n }\n }\n}\nreturn data"
17
+ }
18
+ ]
19
+ }
20
+ }
21
+ }
@@ -1 +1 @@
1
- "2a0d86144463cb51f969c55a08589663"
1
+ "8ec58bb2e7d1e161146ccf01fe78f1d3"
@@ -15,6 +15,10 @@
15
15
  {
16
16
  "date": "2024-04-24T00:00:00.000Z",
17
17
  "note": "Google Analytics 4 (Collect) initial release; Beta version"
18
+ },
19
+ {
20
+ "date": "2024-05-29T00:00:00.000Z",
21
+ "note": "Version: 0.2.0\nUpdated `context.providers` usage for the `gclid` and `dclid` fields"
18
22
  }
19
23
  ]
20
24
  }
@@ -1 +1 @@
1
- "1efb703a8c64bf6674e18f7dd4cb210f"
1
+ "c8f5c74cce99369cd2c0a321dd3239e3"
@@ -1,14 +1,30 @@
1
1
  {
2
- "version": "0.1.0",
2
+ "version": "0.2.0",
3
3
  "global": {
4
4
  "mappings": [
5
5
  {
6
- "inputKey": "context.providers.googleGtag.data.gclid",
7
- "outputKey": "gclid"
6
+ "inputKey": "input",
7
+ "outputKey": "gclid",
8
+ "transforms": [
9
+ {
10
+ "expression": {
11
+ "lang": "lua",
12
+ "body": "if input.context.providers.googleGtag.data.gclid then return SPLIT(input.context.providers.googleGtag.data.gclid, \".\", 3)[3] end"
13
+ }
14
+ }
15
+ ]
8
16
  },
9
17
  {
10
- "inputKey": "context.providers.googleGtag.data.dclid",
11
- "outputKey": "dclid"
18
+ "inputKey": "input",
19
+ "outputKey": "dclid",
20
+ "transforms": [
21
+ {
22
+ "expression": {
23
+ "lang": "lua",
24
+ "body": "if input.context.providers.googleGtag.data.dclid then return SPLIT(input.context.providers.googleGtag.data.dclid, \".\", 3)[3] end"
25
+ }
26
+ }
27
+ ]
12
28
  },
13
29
  {
14
30
  "inputKey": "input",
@@ -1 +1 @@
1
- "e65a3facc63d436efa068c81da8ab5a2"
1
+ "d5ee5f6c8a0cc64778af8610df2faae0"
@@ -1,6 +1,16 @@
1
1
  {
2
+ "params": [
3
+ {
4
+ "name": "PROFILE_ID_STR",
5
+ "defaultValue": "my-profile-id-str"
6
+ },
7
+ {
8
+ "name": "CREDENTIALS_JSON",
9
+ "defaultValue": "my-credentials-json"
10
+ }
11
+ ],
2
12
  "googleCM360": {
3
- "profileID": 1,
4
- "credentialsJSON": "my-credentials-json"
13
+ "credentialsJSON": "$$CREDENTIALS_JSON$$",
14
+ "profileIdStr": "$$PROFILE_ID_STR$$"
5
15
  }
6
16
  }
@@ -1 +1 @@
1
- "d8169a6463a086209425b4aeb417ac58"
1
+ "46967bbdca4f62bb261e8cd08df0126f"
@@ -23,6 +23,10 @@
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": "2024-05-23T00:00:00.000Z",
29
+ "note": "Deprecate field profileId and Create field profileIdStr"
26
30
  }
27
31
  ]
28
32
  }
@@ -0,0 +1 @@
1
+ "bf1f8b4ee7a42addf33f6ed285e178fc"
@@ -0,0 +1,23 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "ACCESS_TOKEN",
5
+ "isOptional": false,
6
+ "exampleValue": "my-access-token"
7
+ }
8
+ ],
9
+ "default": {
10
+ "method": "POST",
11
+ "headers": [
12
+ {
13
+ "key": "Content-Type",
14
+ "value": "application/json"
15
+ },
16
+ {
17
+ "key": "Authorization",
18
+ "value": "Bearer $$ACCESS_TOKEN$$"
19
+ }
20
+ ],
21
+ "endpoint": "https://ads.nextdoor.com/v2/api/conversions/track"
22
+ }
23
+ }
@@ -0,0 +1 @@
1
+ "74ea04f8032c2f8ee14f736d7df4706d"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Nextdoor - CAPI",
5
+ "description": "Nextdoor's CAPI is a server-to-server integration that allows advertisers to send conversion event data directly to Nextdoor's servers.",
6
+ "logo": "https://cdn.metarouter.io/nextdoor-capi.png",
7
+ "color": "#8ED500",
8
+ "eventSource": {
9
+ "isAndroidApp": true,
10
+ "isIosApp": true,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-06-05T00:00:00.000Z",
17
+ "note": "Version: 0.1.0\nBeta Version\nNextdoor CAPI initial release"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "aafbbfc35ddbc48217183c00b28ccb23"