@metarouter/ajs-starter-kit 1.0.58 → 1.0.60

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.
@@ -0,0 +1 @@
1
+ "e67c30e678b5ce7a22eb933577b2a4aa"
@@ -0,0 +1,80 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "API_VERSION",
5
+ "defaultValue": "v13"
6
+ },
7
+ {
8
+ "name": "CUSTOMER_ID",
9
+ "exampleValue": "customer-id"
10
+ },
11
+ {
12
+ "name": "CUSTOMER_SECRET",
13
+ "exampleValue": "customer-secret"
14
+ },
15
+ {
16
+ "name": "DEVELOPER_TOKEN",
17
+ "exampleValue": "developer-token"
18
+ },
19
+ {
20
+ "name": "SERVICE_ACCOUNT_CLIENT_EMAIL",
21
+ "exampleValue": "service-account-client-email"
22
+ },
23
+ {
24
+ "name": "SERVICE_ACCOUNT_PRIVATE_KEY",
25
+ "exampleValue": "service-account-private-key"
26
+ }
27
+ ],
28
+ "default": {
29
+ "endpoint": "https://googleads.googleapis.com/$$API_VERSION$$/customers/$$CUSTOMER_ID$$:uploadClickConversions",
30
+ "batchSize": 1000,
31
+ "method": "POST",
32
+ "headers": [
33
+ {
34
+ "key": "Content-Type",
35
+ "value": "application/x-www-form-urlencoded"
36
+ },
37
+ {
38
+ "key": "Accept-Encoding",
39
+ "value": "application/json"
40
+ }
41
+ ],
42
+ "oauth2_auth": {
43
+ "request": {
44
+ "url": "https://oauth2.googleapis.com/token",
45
+ "contentType": "application/x-www-form-urlencoded",
46
+ "method": "POST",
47
+ "body": [
48
+ {
49
+ "key": "grant_type",
50
+ "value": "urn:ietf:params:oauth:grant-type:jwt-bearer"
51
+ }
52
+ ]
53
+ },
54
+ "responseAccessTokenKey": "access_token",
55
+ "jwt": {
56
+ "claims": [
57
+ {
58
+ "key": "aud",
59
+ "value": "https://oauth2.googleapis.com/token"
60
+ },
61
+ {
62
+ "key": "scope",
63
+ "value": "https://www.googleapis.com/auth/adwords"
64
+ },
65
+ {
66
+ "key": "iss",
67
+ "value": "$$SERVICE_ACCOUNT_CLIENT_EMAIL$$"
68
+ }
69
+ ],
70
+ "signingMethod": "SIGNING_METHOD_RS256",
71
+ "rsaPemKey": "$$SERVICE_ACCOUNT_PRIVATE_KEY$$",
72
+ "requestKey": "assertion"
73
+ }
74
+ },
75
+ "transform": {
76
+ "lang": "lua",
77
+ "body": "request.body = { conversions = batch }\nreturn request"
78
+ }
79
+ }
80
+ }
@@ -0,0 +1 @@
1
+ "9620eff31b0d54a69c515ec1b1117de0"
@@ -2,7 +2,7 @@
2
2
  "isDraft": false,
3
3
  "isBeta": true,
4
4
  "friendlyName": "Google Ads",
5
- "description": "Google Ads makes it easy to show the world what’s unique about your business, so you can reach customers searching for what you offer.",
5
+ "description": "Google Ads is an online advertising platform developed by Google, where advertisers bid to display advertisements to users.",
6
6
  "logo": "https://cdn.metarouter.io/logo.svg",
7
7
  "color": "#4185f5",
8
8
  "eventSource": {
@@ -13,12 +13,8 @@
13
13
  "inputSchema": "analytics_js",
14
14
  "releaseNotes": [
15
15
  {
16
- "date": "2021-06-24T00:00:00.000Z",
16
+ "date": "2023-05-23T00:00:00.000Z",
17
17
  "note": "Google Ads initial release."
18
- },
19
- {
20
- "date": "2022-11-16T00:00:00.000Z",
21
- "note": "Add isBeta field"
22
18
  }
23
19
  ]
24
20
  }
@@ -0,0 +1 @@
1
+ "f759558132e2943190386e11e5972566"
@@ -0,0 +1,124 @@
1
+ {
2
+ "version": "v0.0.1",
3
+ "params": [
4
+ {
5
+ "name": "CUSTOMER_ID",
6
+ "exampleValue": "customer-id"
7
+ },
8
+ {
9
+ "name": "ORDER_COMPLETED_CONVERSION_ACTION",
10
+ "defaultValue": "order-completed-conversion-action"
11
+ }
12
+ ],
13
+ "default": {
14
+ "filters": [
15
+ {
16
+ "byEventNames": {
17
+ "action": "allow",
18
+ "events": [
19
+ ""
20
+ ]
21
+ }
22
+ }
23
+ ]
24
+ },
25
+ "global": {
26
+ "mappings": [
27
+ {
28
+ "inputKey": "context.providers.googleGtag.gbraid",
29
+ "outputKey": "gbraid"
30
+ },
31
+ {
32
+ "inputKey": "context.providers.googleGtag.wbraid",
33
+ "outputKey": "wbraid"
34
+ },
35
+ {
36
+ "inputKey": "context.providers.googleGtag.gclid",
37
+ "outputKey": "gclid"
38
+ },
39
+ {
40
+ "inputKey": "input",
41
+ "outputKey": "userIdentifiers",
42
+ "transforms": [
43
+ {
44
+ "expression": {
45
+ "lang": "lua",
46
+ "body": "if input.traits.email then\n return {{ hashedEmail = TO_SHA256_HASH(LOWER(TRIM(input.traits.email))) }}\nend"
47
+ }
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "inputKey": "input",
53
+ "outputKey": "conversionDateTime",
54
+ "transforms": [
55
+ {
56
+ "expression": {
57
+ "lang": "lua",
58
+ "body": "local date = input.originalTimestamp or input.sentAt\nlocal timezoneOffset = input.context.providers.googleGtag.timezone_offset or 0\nreturn TO_DATE_TIME(date, { inputFormat = \"2006-01-02T15:04:05Z07:00\", inputLocation = { offset = timezoneOffset*60 }, outputFormat = \"2006-01-02 15:04:05-07:00\" })"
59
+ }
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ },
65
+ "eventSpecific": {
66
+ "order_completed": {
67
+ "mappings": [
68
+ {
69
+ "inputKey": "input",
70
+ "outputKey": "conversionAction",
71
+ "transforms": [
72
+ {
73
+ "expression": {
74
+ "body": "return \"customers/$$CUSTOMER_ID$$/conversionActions/$$ORDER_COMPLETED_CONVERSION_ACTION$$\"",
75
+ "lang": "lua"
76
+ }
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "inputKey": "properties.currency",
82
+ "outputKey": "currencyCode",
83
+ "transforms": [
84
+ {
85
+ "modifyString": "uppercase"
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "inputKey": "properties.revenue",
91
+ "outputKey": "conversionValue"
92
+ },
93
+ {
94
+ "inputKey": "properties.order_id",
95
+ "outputKey": "orderId"
96
+ },
97
+ {
98
+ "inputKey": "input",
99
+ "outputKey": "cartData.items",
100
+ "transforms": [
101
+ {
102
+ "expression": {
103
+ "body": "return MAP(\n input.properties.products,\n function (p)\n return {\n productId = p.product_id,\n quantity = p.quantity or 1,\n unitPrice = p.price\n }\n end\n)",
104
+ "lang": "lua"
105
+ }
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "inputKey": "input",
111
+ "outputKey": "customVariables",
112
+ "transforms": [
113
+ {
114
+ "expression": {
115
+ "body": "return {{\n conversionCustomVariable = \"customers/$$CUSTOMER_ID$$/conversionCustomVariables/$$ORDER_COMPLETED_CONVERSION_ACTION$$/conversion_custom_variable_name_here\",\n value = \"custom_variable_value_here\"\n}}",
116
+ "lang": "lua"
117
+ }
118
+ }
119
+ ]
120
+ }
121
+ ]
122
+ }
123
+ }
124
+ }
@@ -0,0 +1 @@
1
+ "e3364d04f0bee50000ee105d7f9aa3f0"
@@ -0,0 +1,24 @@
1
+ {
2
+ "default": {
3
+ "endpoint": "https://tags.w55c.net/rs",
4
+ "headers": [
5
+ {
6
+ "key": "Referer",
7
+ "fromEventKey": "context.page.referrer"
8
+ },
9
+ {
10
+ "key": "X-Forwarded-For",
11
+ "fromEventKey": "context.ip"
12
+ },
13
+ {
14
+ "key": "User-Agent",
15
+ "fromEventKey": "context.userAgent"
16
+ }
17
+ ],
18
+ "method": "GET",
19
+ "transform": {
20
+ "lang": "lua",
21
+ "body": "if (batch[1].w55c) then request.headers[\"Cookie\"] = 'wfivefivec=' .. batch[1].w55c end\nreturn request"
22
+ }
23
+ }
24
+ }
@@ -0,0 +1 @@
1
+ "62c18576ae9d02a04baff87ce2f7a33d"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": false,
4
+ "friendlyName": "Roku",
5
+ "description": "Roku Ad Manager allows clients to programmatically purchase Roku inventory and reach users on the Roku platform. Our integration allows you to send data to Roku to track advertising campaigns.",
6
+ "logo": "https://cdn.metarouter.io/logo.svg",
7
+ "color": "#6f1ab1",
8
+ "eventSource": {
9
+ "isAndroidApp": "no",
10
+ "isIosApp": "no",
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2023-04-27T00:00:00.000Z",
17
+ "note": "Roku initial release."
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "2a55870597dbad9f5718e0ba2e0b9f45"
@@ -0,0 +1,106 @@
1
+ {
2
+ "version": "v0.0.1",
3
+ "params": [
4
+ {
5
+ "name": "PAGE_PIXEL_ID",
6
+ "exampleValue": "page-pixel-id"
7
+ },
8
+ {
9
+ "name": "ORDER_COMPLETED_PIXEL_ID",
10
+ "exampleValue": "order-completed-pixel-id"
11
+ }
12
+ ],
13
+ "default": {
14
+ "filters": [
15
+ {
16
+ "byEventNames": {
17
+ "action": "allow",
18
+ "events": [
19
+ ""
20
+ ]
21
+ }
22
+ }
23
+ ]
24
+ },
25
+ "global": {
26
+ "mappings": [
27
+ {
28
+ "inputKey": "context.ip",
29
+ "outputKey": "aIP"
30
+ },
31
+ {
32
+ "inputKey": "anonymousId",
33
+ "outputKey": "aGM"
34
+ },
35
+ {
36
+ "inputKey": "context.providers.roku.wfivefivec",
37
+ "outputKey": "w55c"
38
+ },
39
+ {
40
+ "inputKey": "context.traits.email",
41
+ "outputKey": "aEM",
42
+ "transforms": [
43
+ {
44
+ "toHash": "sha256"
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ },
50
+ "eventSpecific": {
51
+ "order_completed": {
52
+ "enrichments": [
53
+ {
54
+ "outputKey": "id",
55
+ "staticString": "$$ORDER_COMPLETED_PIXEL_ID$$"
56
+ },
57
+ {
58
+ "outputKey": "t",
59
+ "staticString": "checkout"
60
+ }
61
+ ],
62
+ "mappings": [
63
+ {
64
+ "inputKey": "properties.order_id",
65
+ "outputKey": "tx"
66
+ },
67
+ {
68
+ "inputKey": "input",
69
+ "outputKey": "sku",
70
+ "transforms": [
71
+ {
72
+ "expression": {
73
+ "lang": "lua",
74
+ "body": "return JOIN(PLUCK(input.properties.products, \"sku\"), \",\")"
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "inputKey": "input",
81
+ "outputKey": "price",
82
+ "transforms": [
83
+ {
84
+ "expression": {
85
+ "lang": "lua",
86
+ "body": "return SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end))"
87
+ }
88
+ }
89
+ ]
90
+ }
91
+ ]
92
+ },
93
+ "page": {
94
+ "enrichments": [
95
+ {
96
+ "outputKey": "id",
97
+ "staticString": "$$PAGE_PIXEL_ID$$"
98
+ },
99
+ {
100
+ "outputKey": "t",
101
+ "staticString": "page"
102
+ }
103
+ ]
104
+ }
105
+ }
106
+ }
package/index.js CHANGED
@@ -130,11 +130,11 @@ exports.gcs = {
130
130
  metadata: require('./.dist/gcs/metadata.json')
131
131
  }
132
132
 
133
- exports['google-ad-words'] = {
134
- connectionTemplate: connectionSchemas.properties.googleAdWords,
135
- endpointSchema: require('./.dist/google-ad-words/connection.json'),
136
- playbook: require('./.dist/google-ad-words/playbook.json'),
137
- metadata: require('./.dist/google-ad-words/metadata.json')
133
+ exports['google-ads'] = {
134
+ connectionTemplate: connectionSchemas.properties.googleAds,
135
+ endpointSchema: require('./.dist/google-ads/connection.json'),
136
+ playbook: require('./.dist/google-ads/playbook.json'),
137
+ metadata: require('./.dist/google-ads/metadata.json')
138
138
  }
139
139
 
140
140
  exports['google-analytics'] = {
@@ -286,6 +286,13 @@ exports['rev-jet'] = {
286
286
  metadata: require('./.dist/rev-jet/metadata.json')
287
287
  }
288
288
 
289
+ exports.roku = {
290
+ connectionTemplate: connectionSchemas.properties.roku,
291
+ endpointSchema: require('./.dist/roku/connection.json'),
292
+ playbook: require('./.dist/roku/playbook.json'),
293
+ metadata: require('./.dist/roku/metadata.json')
294
+ }
295
+
289
296
  exports.roomvo = {
290
297
  connectionTemplate: connectionSchemas.properties.roomvo,
291
298
  endpointSchema: require('./.dist/roomvo/connection.json'),
@@ -476,10 +483,10 @@ exports.etags = {
476
483
  playbook: require('./.dist/gcs/playbook.etag.json'),
477
484
  kit: require('./.dist/gcs/kit.etag.json')
478
485
  },
479
- 'google-ad-words': {
480
- endpointSchema: require('./.dist/google-ad-words/connection.etag.json'),
481
- playbook: require('./.dist/google-ad-words/playbook.etag.json'),
482
- kit: require('./.dist/google-ad-words/kit.etag.json')
486
+ 'google-ads': {
487
+ endpointSchema: require('./.dist/google-ads/connection.etag.json'),
488
+ playbook: require('./.dist/google-ads/playbook.etag.json'),
489
+ kit: require('./.dist/google-ads/kit.etag.json')
483
490
  },
484
491
  'google-analytics': {
485
492
  endpointSchema: require('./.dist/google-analytics/connection.etag.json'),
@@ -586,6 +593,11 @@ exports.etags = {
586
593
  playbook: require('./.dist/rev-jet/playbook.etag.json'),
587
594
  kit: require('./.dist/rev-jet/kit.etag.json')
588
595
  },
596
+ roku: {
597
+ endpointSchema: require('./.dist/roku/connection.etag.json'),
598
+ playbook: require('./.dist/roku/playbook.etag.json'),
599
+ kit: require('./.dist/roku/kit.etag.json')
600
+ },
589
601
  roomvo: {
590
602
  endpointSchema: require('./.dist/roomvo/connection.etag.json'),
591
603
  playbook: require('./.dist/roomvo/playbook.etag.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- "00a1119e77914ebb412cba0b4bda50ca"
@@ -1,6 +0,0 @@
1
- {
2
- "default": {
3
- "endpoint": "TODO",
4
- "method": "GET"
5
- }
6
- }
@@ -1 +0,0 @@
1
- "667db0d54084ba450d06a2bff9d0f292"
@@ -1,24 +0,0 @@
1
- {
2
- "isDraft": true,
3
- "isBeta": false,
4
- "friendlyName": "Adobe Analytics",
5
- "description": "An Enterprise-level web analytics platform that is accessible by anyone within an organization,\nyet is robust enough to adapt to advanced analytics needs.",
6
- "logo": "https://cdn.metarouter.io/logo.svg",
7
- "color": "#CF4853",
8
- "eventSource": {
9
- "isAndroidApp": true,
10
- "isIosApp": true,
11
- "isWebApp": true
12
- },
13
- "inputSchema": "analytics_js",
14
- "releaseNotes": [
15
- {
16
- "date": "2021-06-24T00:00:00.000Z",
17
- "note": "Adobe Analytics initial release."
18
- },
19
- {
20
- "date": "2022-11-16T00:00:00.000Z",
21
- "note": "Add isBeta field"
22
- }
23
- ]
24
- }
@@ -1 +0,0 @@
1
- "b595e137717755bf1031fcaa01ce64b5"
@@ -1,3 +0,0 @@
1
- {
2
- "version": "v0.0.1"
3
- }
@@ -1 +0,0 @@
1
- "6b43ed086a94df1146973713df5a9313"
@@ -1,12 +0,0 @@
1
- {
2
- "params": [
3
- {
4
- "name": "CONVERSION_ID",
5
- "exampleValue": "my-conversion-id"
6
- }
7
- ],
8
- "default": {
9
- "endpoint": "https://www.googleadservices.com/pagead/conversion/$$CONVERSION_ID$$/",
10
- "method": "GET"
11
- }
12
- }
@@ -1 +0,0 @@
1
- "3cceb92d73d335e9c013d6743bfd5cb9"
@@ -1 +0,0 @@
1
- "b595e137717755bf1031fcaa01ce64b5"
@@ -1,3 +0,0 @@
1
- {
2
- "version": "v0.0.1"
3
- }