@metarouter/ajs-starter-kit 1.0.78 → 1.0.79

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
+ "eeda0ad0e6e29b0e4c74a37861e207d4"
@@ -0,0 +1,17 @@
1
+ {
2
+ "amazon_redshift_v2": {
3
+ "load_cadence": "6h",
4
+ "user": "my-user",
5
+ "password": "my-password",
6
+ "host": "my-host",
7
+ "port": "my-port",
8
+ "database": "my-database",
9
+ "schema": "my-schema",
10
+ "s3": {
11
+ "region": "us-east-1",
12
+ "bucket": "my-bucket",
13
+ "access_key": "my-access-key",
14
+ "secret_key": "my-access-secret"
15
+ }
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ "32a81767b155b64e25f8ef5efd994eaf"
@@ -0,0 +1,24 @@
1
+ {
2
+ "isDraft": true,
3
+ "isBeta": false,
4
+ "friendlyName": "Amazon Redshift",
5
+ "description": "Amazon's managed server-less enterprise-level data warehouse.\nCollect structured data and run powerful queries to unlock custom insights with your customer data.",
6
+ "logo": "https://cdn.metarouter.io/logo.svg",
7
+ "color": "#396AB8",
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": "Amazon Redshift initial release."
18
+ },
19
+ {
20
+ "date": "2022-11-16T00:00:00.000Z",
21
+ "note": "Add isBeta field"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1 @@
1
+ "49cecd39b3c33954561fcbf0f6cc17b2"
@@ -0,0 +1,88 @@
1
+ {
2
+ "version": "v1.0.0",
3
+ "global": {
4
+ "mappings": [
5
+ {
6
+ "inputKey": "messageId",
7
+ "outputKey": "id"
8
+ },
9
+ {
10
+ "inputKey": "userId",
11
+ "outputKey": "user_id"
12
+ },
13
+ {
14
+ "inputKey": "previousId",
15
+ "outputKey": "previous_id"
16
+ },
17
+ {
18
+ "inputKey": "anonymousId",
19
+ "outputKey": "anonymous_id"
20
+ },
21
+ {
22
+ "inputKey": "originalTimestamp",
23
+ "outputKey": "original_timestamp"
24
+ },
25
+ {
26
+ "inputKey": "receivedAt",
27
+ "outputKey": "received_at"
28
+ },
29
+ {
30
+ "inputKey": "sentAt",
31
+ "outputKey": "sent_at"
32
+ },
33
+ {
34
+ "inputKey": "timestamp",
35
+ "outputKey": "timestamp"
36
+ },
37
+ {
38
+ "inputKey": "integrations",
39
+ "outputKey": "integrations",
40
+ "transforms": [
41
+ {
42
+ "toScalar": "string"
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "inputKey": "type",
48
+ "outputKey": "type"
49
+ },
50
+ {
51
+ "inputKey": "event",
52
+ "outputKey": "event"
53
+ },
54
+ {
55
+ "inputKey": "name",
56
+ "outputKey": "name"
57
+ },
58
+ {
59
+ "inputKey": "category",
60
+ "outputKey": "category"
61
+ }
62
+ ],
63
+ "spreadings": [
64
+ {
65
+ "inputKey": "context",
66
+ "flatten": {
67
+ "separator": "_",
68
+ "prefix": "context",
69
+ "depth": 5
70
+ }
71
+ },
72
+ {
73
+ "inputKey": "traits",
74
+ "flatten": {
75
+ "separator": "_"
76
+ }
77
+ },
78
+ {
79
+ "inputKey": "properties",
80
+ "flatten": {
81
+ "separator": "_"
82
+ }
83
+ }
84
+ ]
85
+ },
86
+ "eventSpecific": {},
87
+ "default": {}
88
+ }
@@ -0,0 +1 @@
1
+ "d57939f1af32b8bab3de9a469358e7c0"
@@ -0,0 +1,6 @@
1
+ {
2
+ "default": {
3
+ "endpoint": "https://fls.doubleclick.net/activityj",
4
+ "method": "GET"
5
+ }
6
+ }
@@ -0,0 +1 @@
1
+ "c7b3c0dd7607cc5a524171847aefd499"
@@ -0,0 +1,24 @@
1
+ {
2
+ "isDraft": true,
3
+ "isBeta": false,
4
+ "friendlyName": "Google DoubleClick Digital Marketing",
5
+ "description": "DoubleClick Digital Marketing (DDM) is an integrated ad-technology platform\nthat enables agencies and advertisers\nto more effectively create, manage and grow high-impact digital marketing campaigns.\nDDM integrates world-class solutions to help buyers run holistic campaigns across multiple channels.",
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": "Google DoubleClick Digital Marketing initial release."
18
+ },
19
+ {
20
+ "date": "2022-11-16T00:00:00.000Z",
21
+ "note": "Add isBeta field"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1 @@
1
+ "b595e137717755bf1031fcaa01ce64b5"
@@ -0,0 +1,3 @@
1
+ {
2
+ "version": "v0.0.1"
3
+ }
@@ -0,0 +1 @@
1
+ "9fc0ae425863d2350a2fd57d7de81451"
@@ -0,0 +1,52 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "API_SECRET",
5
+ "exampleValue": "my-api-secret",
6
+ "description": "Software-level credentials that allow a program to access your account.Select Property settings->Data collection then select Measurement Protocol API secrets to create a new API secret"
7
+ },
8
+ {
9
+ "name": "FIREBASE_APP_ID",
10
+ "exampleValue": "my-firebase-app-id",
11
+ "description": "The identifier for a Firebase app. Found in the Firebase console under Project Settings > General > Your Apps > App ID"
12
+ }
13
+ ],
14
+ "default": {
15
+ "endpoint": "https://www.google-analytics.com/mp/collect?api_secret=$$API_SECRET$$&firebase_app_id=$$FIREBASE_APP_ID$$",
16
+ "method": "POST",
17
+ "headers": [
18
+ {
19
+ "key": "Content-Type",
20
+ "value": "application/json"
21
+ },
22
+ {
23
+ "key": "Accept-Encoding",
24
+ "value": "gzip, compress, br"
25
+ },
26
+ {
27
+ "key": "User-Agent",
28
+ "fromEventKey": "context.userAgent"
29
+ },
30
+ {
31
+ "key": "Authority",
32
+ "value": "www.google-analytics.com"
33
+ },
34
+ {
35
+ "key": "Accept-Language",
36
+ "value": "en-US,en;q=0.9"
37
+ },
38
+ {
39
+ "key": "Sec-Fetch-Dest",
40
+ "value": "empty"
41
+ },
42
+ {
43
+ "key": "Sec-Fetch-Mode",
44
+ "value": "cors"
45
+ },
46
+ {
47
+ "key": "Sec-Fetch-Site",
48
+ "value": "cross-site"
49
+ }
50
+ ]
51
+ }
52
+ }
@@ -0,0 +1 @@
1
+ "2c6360a283a10783e3b5238c96b8d5a3"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Firebase",
5
+ "description": "Firebase is an app measurement solution, available at no charge, that provides insight on app usage and user engagement",
6
+ "logo": "https://cdn.metarouter.io/google-firebase.png",
7
+ "color": "#FFA611",
8
+ "eventSource": {
9
+ "isAndroidApp": true,
10
+ "isIosApp": true,
11
+ "isWebApp": false
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-01-15T05:00:00.000Z",
17
+ "note": "google-firebase initial release."
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "fc138a8e3e150b5571f0781ddf1f7d8d"
@@ -0,0 +1,142 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "global": {
4
+ "filters": [
5
+ {
6
+ "byEventNames": {
7
+ "action": "deny",
8
+ "events": [
9
+ "identify",
10
+ "screen",
11
+ "page"
12
+ ]
13
+ }
14
+ }
15
+ ],
16
+ "mappings": [
17
+ {
18
+ "inputKey": "context.providers.googleFirebase.appInstanceId",
19
+ "outputKey": "app_instance_id"
20
+ },
21
+ {
22
+ "inputKey": "context.providers.googleFirebase.nonPersonalizedAds",
23
+ "outputKey": "non_personalized_ads",
24
+ "defaultBool": false
25
+ }
26
+ ]
27
+ },
28
+ "eventSpecific": {
29
+ "order_completed": {
30
+ "mappings": [
31
+ {
32
+ "inputKey": "input",
33
+ "outputKey": "events",
34
+ "transforms": [
35
+ {
36
+ "expression": {
37
+ "lang": "lua",
38
+ "body": "local events = {}\n\nlocal event = {\n name = \"purchase\",\n params = {\n currency = UPPER(input.properties.currency),\n value = 0, -- Initializing total cart value,\n coupon = input.properties.coupon,\n transaction_id = input.properties.order_id,\n items = {}\n }\n}\n\nfor _, product in ipairs(input.properties.products) do\n local item = {\n item_id = product.product_id,\n item_name = product.name,\n index = #event.params.items,\n item_category = product.category,\n affiliation = input.properties.affiliation,\n price = product.price,\n quantity = product.quantity or 1\n }\n\n -- Updates the total value with the running total\n event.params.value = event.params.value + (item.price * item.quantity)\n\n table.insert(event.params.items, item)\nend\n\ntable.insert(events, event)\nreturn events"
39
+ }
40
+ }
41
+ ]
42
+ }
43
+ ]
44
+ },
45
+ "cart_viewed": {
46
+ "mappings": [
47
+ {
48
+ "inputKey": "input",
49
+ "outputKey": "events",
50
+ "transforms": [
51
+ {
52
+ "expression": {
53
+ "lang": "lua",
54
+ "body": "local events = {}\n\nlocal event = {\n name = \"view_cart\",\n params = {\n currency = UPPER(input.properties.currency),\n value = 0, -- Initializing total cart value,\n coupon = input.properties.coupon,\n items = {}\n }\n}\n\nfor _, product in ipairs(input.properties.products) do\n local item = {\n item_id = product.product_id,\n item_name = product.name,\n index = #event.params.items,\n item_category = product.category,\n affiliation = input.properties.affiliation,\n price = product.price,\n quantity = product.quantity or 1\n }\n\n -- Updates the total value with the running total\n event.params.value = event.params.value + (item.price * item.quantity)\n\n table.insert(event.params.items, item)\nend\n\ntable.insert(events, event)\nreturn events"
55
+ }
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ },
61
+ "product_list_viewed": {
62
+ "mappings": [
63
+ {
64
+ "inputKey": "input",
65
+ "outputKey": "events",
66
+ "transforms": [
67
+ {
68
+ "expression": {
69
+ "lang": "lua",
70
+ "body": "local events = {}\n\nlocal event = {\n name = \"view_item_list\",\n params = {\n currency = UPPER(input.properties.currency),\n coupon = input.properties.coupon,\n item_list_id = input.properties.list_id,\n items = {}\n }\n}\n\nfor _, product in ipairs(input.properties.products) do\n local item = {\n item_id = product.product_id,\n item_name = product.name,\n index = #event.params.items,\n item_category = product.category,\n affiliation = input.properties.affiliation,\n price = product.price\n }\n\n table.insert(event.params.items, item)\nend\n\ntable.insert(events, event)\nreturn events"
71
+ }
72
+ }
73
+ ]
74
+ }
75
+ ]
76
+ },
77
+ "checkout_started": {
78
+ "mappings": [
79
+ {
80
+ "inputKey": "input",
81
+ "outputKey": "events",
82
+ "transforms": [
83
+ {
84
+ "expression": {
85
+ "lang": "lua",
86
+ "body": "local events = {}\n\nlocal event = {\n name = \"begin_checkout\",\n params = {\n currency = UPPER(input.properties.currency),\n value = 0, -- Initializing total cart value,\n coupon = input.properties.coupon,\n items = {}\n }\n}\n\nfor _, product in ipairs(input.properties.products) do\n local item = {\n item_id = product.product_id,\n item_name = product.name,\n index = #event.params.items,\n item_category = product.category,\n affiliation = input.properties.affiliation,\n price = product.price,\n quantity = product.quantity or 1\n }\n\n -- Updates the total value with the running total\n event.params.value = event.params.value + (item.price * item.quantity)\n\n table.insert(event.params.items, item)\nend\n\ntable.insert(events, event)\nreturn events"
87
+ }
88
+ }
89
+ ]
90
+ }
91
+ ]
92
+ },
93
+ "product_added": {
94
+ "mappings": [
95
+ {
96
+ "inputKey": "input",
97
+ "outputKey": "events",
98
+ "transforms": [
99
+ {
100
+ "expression": {
101
+ "lang": "lua",
102
+ "body": "return {{\n name = \"add_to_cart\",\n currency = UPPER(input.properties.currency),\n value = input.properties.price * (input.properties.quantity or 1),\n params = {\n item_id = input.properties.product_id,\n item_name = input.properties.name,\n }\n }}"
103
+ }
104
+ }
105
+ ]
106
+ }
107
+ ]
108
+ },
109
+ "product_viewed": {
110
+ "mappings": [
111
+ {
112
+ "inputKey": "input",
113
+ "outputKey": "events",
114
+ "transforms": [
115
+ {
116
+ "expression": {
117
+ "lang": "lua",
118
+ "body": "return {{\n name = \"view_item\",\n currency = UPPER(input.properties.currency),\n value = input.properties.price * (input.properties.quantity or 1),\n params = {\n item_id = input.properties.product_id,\n item_name = input.properties.name,\n }\n }}"
119
+ }
120
+ }
121
+ ]
122
+ }
123
+ ]
124
+ },
125
+ "products_searched": {
126
+ "mappings": [
127
+ {
128
+ "inputKey": "input",
129
+ "outputKey": "events",
130
+ "transforms": [
131
+ {
132
+ "expression": {
133
+ "lang": "lua",
134
+ "body": "return {{\n name = \"search\",\n params = {\n search_term = input.properties.query\n }\n }}"
135
+ }
136
+ }
137
+ ]
138
+ }
139
+ ]
140
+ }
141
+ }
142
+ }
package/index.js CHANGED
@@ -111,12 +111,12 @@ exports.convert = {
111
111
  metadata: require('./.dist/convert/metadata.json')
112
112
  },
113
113
 
114
- exports.criteo = {
115
- connectionTemplate: connectionSchemas.properties.criteo,
116
- endpointSchema: require('./.dist/criteo/connection.json'),
117
- playbook: require('./.dist/criteo/playbook.json'),
118
- metadata: require('./.dist/criteo/metadata.json')
119
- }
114
+ exports.criteo = {
115
+ connectionTemplate: connectionSchemas.properties.criteo,
116
+ endpointSchema: require('./.dist/criteo/connection.json'),
117
+ playbook: require('./.dist/criteo/playbook.json'),
118
+ metadata: require('./.dist/criteo/metadata.json')
119
+ }
120
120
 
121
121
  exports['customer-io'] = {
122
122
  connectionTemplate: connectionSchemas.properties.customerIo,
@@ -178,6 +178,13 @@ exports['google-cm360'] = {
178
178
  metadata: require('./.dist/google-cm360/metadata.json')
179
179
  }
180
180
 
181
+ exports['google-firebase'] = {
182
+ connectionTemplate: connectionSchemas.properties.googlefirebase,
183
+ endpointSchema: require('./.dist/google-firebase/connection.json'),
184
+ playbook: require('./.dist/google-firebase/playbook.json'),
185
+ metadata: require('./.dist/google-firebase/metadata.json')
186
+ }
187
+
181
188
  exports['google-pubsub'] = {
182
189
  connectionTemplate: connectionSchemas.properties.googlePubsub,
183
190
  playbook: require('./.dist/google-pubsub/playbook.json'),
@@ -539,6 +546,10 @@ exports.etags = {
539
546
  playbook: require('./.dist/google-cm360/playbook.etag.json'),
540
547
  kit: require('./.dist/google-cm360/kit.etag.json')
541
548
  },
549
+ 'google-firebase': {
550
+ playbook: require('./.dist/google-firebase/playbook.etag.json'),
551
+ kit: require('./.dist/google-firebase/kit.etag.json')
552
+ },
542
553
  'google-pubsub': {
543
554
  playbook: require('./.dist/google-pubsub/playbook.etag.json'),
544
555
  kit: require('./.dist/google-pubsub/kit.etag.json')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.78",
3
+ "version": "1.0.79",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {