@metarouter/ajs-starter-kit 1.0.45 → 1.0.47

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.
@@ -1 +1 @@
1
- "f4bd49f6f16693983da50442d811e840"
1
+ "153f38d38a806f6ce6f74c5982fe5f38"
@@ -22,6 +22,10 @@
22
22
  {
23
23
  "date": "2021-11-26T00:00:00.000Z",
24
24
  "note": "uses batch endpoint"
25
+ },
26
+ {
27
+ "date": "2022-09-29T00:00:00.000Z",
28
+ "note": "uses blank playbook"
25
29
  }
26
30
  ]
27
31
  }
@@ -1 +1 @@
1
- "cf7f4703e1c655c3415c5aefdb6a6544"
1
+ "b595e137717755bf1031fcaa01ce64b5"
@@ -1,181 +1,3 @@
1
1
  {
2
- "version": "v0.0.1",
3
- "global": {
4
- "filters": [
5
- {
6
- "byEventNames": {
7
- "action": "allow",
8
- "events": [
9
- "identify",
10
- "page",
11
- "products_searched",
12
- "product_list_viewed",
13
- "product_viewed",
14
- "product_added",
15
- "cart_viewed",
16
- "order_completed"
17
- ]
18
- }
19
- }
20
- ],
21
- "enrichments": [
22
- {
23
- "outputKey": "timestamp",
24
- "date": {
25
- "format": "2006-01-02T15:04:05-0700"
26
- }
27
- }
28
- ],
29
- "mappings": [
30
- {
31
- "inputKey": "anonymousId",
32
- "outputKey": "cookie"
33
- },
34
- {
35
- "inputKey": "userId",
36
- "outputKey": "customer_id"
37
- }
38
- ]
39
- },
40
- "eventSpecific": {
41
- "identify": {
42
- "enrichments": [
43
- {
44
- "staticString": "identify",
45
- "outputKey": "event"
46
- }
47
- ],
48
- "mappings": [
49
- {
50
- "inputKey": "traits.email",
51
- "outputKey": "email"
52
- },
53
- {
54
- "inputKey": "traits.name",
55
- "outputKey": "firstname"
56
- }
57
- ]
58
- },
59
- "page": {
60
- "enrichments": [
61
- {
62
- "staticString": "pageload",
63
- "outputKey": "event"
64
- }
65
- ],
66
- "mappings": [
67
- {
68
- "inputKey": "context.page.url",
69
- "outputKey": "url"
70
- },
71
- {
72
- "inputKey": "properties.referrer",
73
- "outputKey": "referrer"
74
- },
75
- {
76
- "inputKey": "context.ip",
77
- "outputKey": "ip"
78
- },
79
- {
80
- "inputKey": "context.userAgent",
81
- "outputKey": "user_agent"
82
- }
83
- ]
84
- },
85
- "products_searched": {
86
- "enrichments": [
87
- {
88
- "staticString": "search",
89
- "outputKey": "event"
90
- }
91
- ],
92
- "mappings": [
93
- {
94
- "inputKey": "properties.query",
95
- "outputKey": "keywords"
96
- }
97
- ]
98
- },
99
- "product_list_viewed": {
100
- "enrichments": [
101
- {
102
- "staticString": "product_list_viewed",
103
- "outputKey": "event"
104
- }
105
- ],
106
- "mappings": [
107
- {
108
- "inputKey": "properties.category",
109
- "outputKey": "category"
110
- },
111
- {
112
- "inputKey": "properties.list_id",
113
- "outputKey": "list_id"
114
- },
115
- {
116
- "inputKey": "properties.products",
117
- "outputKey": "product_ids",
118
- "transforms": [
119
- {
120
- "pluckValues": {
121
- "extractKey": "product_id"
122
- }
123
- }
124
- ]
125
- }
126
- ]
127
- },
128
- "product_viewed": {
129
- "enrichments": [
130
- {
131
- "staticString": "view",
132
- "outputKey": "event"
133
- }
134
- ],
135
- "mappings": [
136
- {
137
- "inputKey": "input",
138
- "outputKey": "products",
139
- "transforms": [
140
- {
141
- "expression": {
142
- "lang": "lua",
143
- "body": "return {{\n sku = input.properties.product_id,\n}}"
144
- }
145
- }
146
- ]
147
- }
148
- ]
149
- },
150
- "product_added": {
151
- "enrichments": [
152
- {
153
- "staticString": "add_to_cart",
154
- "outputKey": "event"
155
- }
156
- ],
157
- "mappings": [
158
- {
159
- "inputKey": "properties.product_id",
160
- "outputKey": "product_id"
161
- }
162
- ]
163
- },
164
- "cart_viewed": {
165
- "expressions": [
166
- {
167
- "lang": "lua",
168
- "body": "local products = MAP(\n input.properties.products,\n function (p)\n return {\n sku = p.product_id,\n }\n end\n)\nreturn {\n event = 'checkout',\n total = SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end)),\n products = products,\n}"
169
- }
170
- ]
171
- },
172
- "order_completed": {
173
- "expressions": [
174
- {
175
- "lang": "lua",
176
- "body": "local products = MAP(\n input.properties.products,\n function (p)\n return {\n sku = p.product_id,\n price = TO_FLOAT(p.price),\n quantity = TO_FLOAT(p.quantity) or 1,\n }\n end\n)\nreturn {\n event = 'purchase',\n order_id = input.properties.order_id,\n total = SUM(MAP(input.properties.products, function (p) return p.price * (p.quantity or 1) end)),\n revenue = TO_FLOAT(input.properties.revenue),\n shipping = TO_FLOAT(input.properties.shipping),\n tax = TO_FLOAT(input.properties.tax),\n discount = TO_FLOAT(input.properties.discount),\n coupon = input.properties.coupon,\n products = products,\n}"
177
- }
178
- ]
179
- }
180
- }
2
+ "version": "v0.0.1"
181
3
  }
@@ -1 +1 @@
1
- "14e009ff28748036c7de3c157646d964"
1
+ "85ac55fc352c6aad85d30c76babe9695"
@@ -45,6 +45,24 @@
45
45
  }
46
46
  ],
47
47
  "method": "POST"
48
+ },
49
+ "screen": {
50
+ "endpoint": "https://trkapi.impact.com/PageLoad",
51
+ "basicAuth": {
52
+ "password": "$$PASSWORD$$",
53
+ "username": "$$USERNAME$$"
54
+ },
55
+ "headers": [
56
+ {
57
+ "key": "Content-Type",
58
+ "value": "application/json"
59
+ },
60
+ {
61
+ "key": "Accept",
62
+ "value": "application/json"
63
+ }
64
+ ],
65
+ "method": "POST"
48
66
  }
49
67
  }
50
68
  }
@@ -1 +1 @@
1
- "55ef00289b5527f13d9a8cac3b66769d"
1
+ "dae65cbdc3ea5fc4deb8d008ece81979"
@@ -18,6 +18,10 @@
18
18
  {
19
19
  "date": "2021-06-28T00:00:00.000Z",
20
20
  "note": "Setting isDraft to false"
21
+ },
22
+ {
23
+ "date": "2022-09-13T00:00:00.000Z",
24
+ "note": "Allowing for Screen Events"
21
25
  }
22
26
  ]
23
27
  }
@@ -1 +1 @@
1
- "3b8b07271a3ecb3af48ab12eaf9877be"
1
+ "bcdc40a0751e1f5fec3bd59cd396578f"
@@ -17,6 +17,7 @@
17
17
  "action": "allow",
18
18
  "events": [
19
19
  "page",
20
+ "screen",
20
21
  "order_completed"
21
22
  ]
22
23
  }
@@ -48,6 +49,10 @@
48
49
  "inputKey": "context.ip",
49
50
  "outputKey": "IpAddress",
50
51
  "defaultString": ""
52
+ },
53
+ {
54
+ "inputKey": "userId",
55
+ "outputKey": "CustomerId"
51
56
  }
52
57
  ]
53
58
  },
@@ -65,6 +70,38 @@
65
70
  }
66
71
  ]
67
72
  },
73
+ "screen": {
74
+ "mappings": [
75
+ {
76
+ "inputKey": "context.device.advertisingId",
77
+ "outputKey": "Appleifv"
78
+ },
79
+ {
80
+ "inputKey": "context.device.manufacturer",
81
+ "outputKey": "DeviceMfr"
82
+ },
83
+ {
84
+ "inputKey": "context.device.model",
85
+ "outputKey": "DeviceModel"
86
+ },
87
+ {
88
+ "inputKey": "properties.url",
89
+ "outputKey": "PageUrl"
90
+ },
91
+ {
92
+ "inputKey": "appId",
93
+ "outputKey": "PropertyId"
94
+ },
95
+ {
96
+ "inputKey": "properties.referrer",
97
+ "outputKey": "ReferringUrl"
98
+ },
99
+ {
100
+ "inputKey": "context.device.adTrackingEnabled",
101
+ "outputKey": "TrackingConsent"
102
+ }
103
+ ]
104
+ },
68
105
  "order_completed": {
69
106
  "enrichments": [
70
107
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {