@walkeros/web-destination-meta 0.5.1-next.0 → 0.6.1
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.
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.js +19 -19
- package/dist/examples/index.mjs +19 -19
- package/dist/index.browser.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/examples/index.js
CHANGED
|
@@ -97,43 +97,43 @@ __export(events_exports, {
|
|
|
97
97
|
|
|
98
98
|
// ../../../core/dist/index.mjs
|
|
99
99
|
var e = Object.defineProperty;
|
|
100
|
-
var
|
|
100
|
+
var a = {};
|
|
101
101
|
((t, n) => {
|
|
102
102
|
for (var r in n) e(t, r, { get: n[r], enumerable: true });
|
|
103
|
-
})(
|
|
104
|
-
var
|
|
105
|
-
var
|
|
106
|
-
function
|
|
107
|
-
n = {
|
|
103
|
+
})(a, { Level: () => u });
|
|
104
|
+
var u = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.INFO = 1] = "INFO", e2[e2.DEBUG = 2] = "DEBUG", e2))(u || {});
|
|
105
|
+
var $ = { merge: true, shallow: true, extend: true };
|
|
106
|
+
function A(e2, t = {}, n = {}) {
|
|
107
|
+
n = { ...$, ...n };
|
|
108
108
|
const r = Object.entries(t).reduce((t2, [r2, o]) => {
|
|
109
109
|
const i = e2[r2];
|
|
110
110
|
return n.merge && Array.isArray(i) && Array.isArray(o) ? t2[r2] = o.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || r2 in e2) && (t2[r2] = o), t2;
|
|
111
111
|
}, {});
|
|
112
112
|
return n.shallow ? { ...e2, ...r } : (Object.assign(e2, r), e2);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function N(e2) {
|
|
115
115
|
return Array.isArray(e2);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
return "object" == typeof e2 && null !== e2 && !
|
|
117
|
+
function D(e2) {
|
|
118
|
+
return "object" == typeof e2 && null !== e2 && !N(e2) && "[object Object]" === Object.prototype.toString.call(e2);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function H(e2 = {}) {
|
|
121
121
|
var _a;
|
|
122
|
-
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", r = e2.count || 1, o =
|
|
122
|
+
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", r = e2.count || 1, o = A({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${r}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: r, version: { source: "0.6.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
|
|
123
123
|
if (e2.name) {
|
|
124
124
|
const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
|
|
125
125
|
t2 && n2 && (o.entity = t2, o.action = n2);
|
|
126
126
|
}
|
|
127
127
|
return o;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function q(e2 = "entity action", t = {}) {
|
|
130
130
|
const n = t.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), r = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, o = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } };
|
|
131
|
-
return
|
|
131
|
+
return H({ ...{ "cart view": { data: { currency: "EUR", value: 2 * r.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...r.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: r.data.price + o.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.walkeros.io/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...r, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...r, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...r.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: n, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e2], ...t, name: e2 });
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
// src/examples/events.ts
|
|
135
135
|
function Purchase() {
|
|
136
|
-
const event =
|
|
136
|
+
const event = q("order complete");
|
|
137
137
|
return [
|
|
138
138
|
"track",
|
|
139
139
|
"Purchase",
|
|
@@ -148,7 +148,7 @@ function Purchase() {
|
|
|
148
148
|
];
|
|
149
149
|
}
|
|
150
150
|
function AddToCart() {
|
|
151
|
-
const event =
|
|
151
|
+
const event = q("product add");
|
|
152
152
|
return [
|
|
153
153
|
"track",
|
|
154
154
|
"AddToCart",
|
|
@@ -162,7 +162,7 @@ function AddToCart() {
|
|
|
162
162
|
];
|
|
163
163
|
}
|
|
164
164
|
function InitiateCheckout() {
|
|
165
|
-
const event =
|
|
165
|
+
const event = q("cart view");
|
|
166
166
|
return [
|
|
167
167
|
"track",
|
|
168
168
|
"InitiateCheckout",
|
|
@@ -179,7 +179,7 @@ function InitiateCheckout() {
|
|
|
179
179
|
];
|
|
180
180
|
}
|
|
181
181
|
function ViewContent() {
|
|
182
|
-
const event =
|
|
182
|
+
const event = q("product view");
|
|
183
183
|
return [
|
|
184
184
|
"track",
|
|
185
185
|
"ViewContent",
|
|
@@ -212,7 +212,7 @@ var Purchase2 = {
|
|
|
212
212
|
loop: [
|
|
213
213
|
"nested",
|
|
214
214
|
{
|
|
215
|
-
condition: (entity) =>
|
|
215
|
+
condition: (entity) => D(entity) && entity.entity === "product",
|
|
216
216
|
map: {
|
|
217
217
|
id: "data.id",
|
|
218
218
|
quantity: { key: "data.quantity", value: 1 }
|
|
@@ -259,7 +259,7 @@ var InitiateCheckout2 = {
|
|
|
259
259
|
loop: [
|
|
260
260
|
"nested",
|
|
261
261
|
{
|
|
262
|
-
condition: (entity) =>
|
|
262
|
+
condition: (entity) => D(entity) && entity.entity === "product",
|
|
263
263
|
map: {
|
|
264
264
|
id: "data.id",
|
|
265
265
|
quantity: { key: "data.quantity", value: 1 }
|
package/dist/examples/index.mjs
CHANGED
|
@@ -75,43 +75,43 @@ __export(events_exports, {
|
|
|
75
75
|
|
|
76
76
|
// ../../../core/dist/index.mjs
|
|
77
77
|
var e = Object.defineProperty;
|
|
78
|
-
var
|
|
78
|
+
var a = {};
|
|
79
79
|
((t, n) => {
|
|
80
80
|
for (var r in n) e(t, r, { get: n[r], enumerable: true });
|
|
81
|
-
})(
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
function
|
|
85
|
-
n = {
|
|
81
|
+
})(a, { Level: () => u });
|
|
82
|
+
var u = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.INFO = 1] = "INFO", e2[e2.DEBUG = 2] = "DEBUG", e2))(u || {});
|
|
83
|
+
var $ = { merge: true, shallow: true, extend: true };
|
|
84
|
+
function A(e2, t = {}, n = {}) {
|
|
85
|
+
n = { ...$, ...n };
|
|
86
86
|
const r = Object.entries(t).reduce((t2, [r2, o]) => {
|
|
87
87
|
const i = e2[r2];
|
|
88
88
|
return n.merge && Array.isArray(i) && Array.isArray(o) ? t2[r2] = o.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || r2 in e2) && (t2[r2] = o), t2;
|
|
89
89
|
}, {});
|
|
90
90
|
return n.shallow ? { ...e2, ...r } : (Object.assign(e2, r), e2);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function N(e2) {
|
|
93
93
|
return Array.isArray(e2);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return "object" == typeof e2 && null !== e2 && !
|
|
95
|
+
function D(e2) {
|
|
96
|
+
return "object" == typeof e2 && null !== e2 && !N(e2) && "[object Object]" === Object.prototype.toString.call(e2);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function H(e2 = {}) {
|
|
99
99
|
var _a;
|
|
100
|
-
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", r = e2.count || 1, o =
|
|
100
|
+
const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", r = e2.count || 1, o = A({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${r}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: r, version: { source: "0.6.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
|
|
101
101
|
if (e2.name) {
|
|
102
102
|
const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
|
|
103
103
|
t2 && n2 && (o.entity = t2, o.action = n2);
|
|
104
104
|
}
|
|
105
105
|
return o;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function q(e2 = "entity action", t = {}) {
|
|
108
108
|
const n = t.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), r = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, o = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } };
|
|
109
|
-
return
|
|
109
|
+
return H({ ...{ "cart view": { data: { currency: "EUR", value: 2 * r.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...r.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: r.data.price + o.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...r, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.walkeros.io/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...r, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...r, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...r.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: n, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e2], ...t, name: e2 });
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
// src/examples/events.ts
|
|
113
113
|
function Purchase() {
|
|
114
|
-
const event =
|
|
114
|
+
const event = q("order complete");
|
|
115
115
|
return [
|
|
116
116
|
"track",
|
|
117
117
|
"Purchase",
|
|
@@ -126,7 +126,7 @@ function Purchase() {
|
|
|
126
126
|
];
|
|
127
127
|
}
|
|
128
128
|
function AddToCart() {
|
|
129
|
-
const event =
|
|
129
|
+
const event = q("product add");
|
|
130
130
|
return [
|
|
131
131
|
"track",
|
|
132
132
|
"AddToCart",
|
|
@@ -140,7 +140,7 @@ function AddToCart() {
|
|
|
140
140
|
];
|
|
141
141
|
}
|
|
142
142
|
function InitiateCheckout() {
|
|
143
|
-
const event =
|
|
143
|
+
const event = q("cart view");
|
|
144
144
|
return [
|
|
145
145
|
"track",
|
|
146
146
|
"InitiateCheckout",
|
|
@@ -157,7 +157,7 @@ function InitiateCheckout() {
|
|
|
157
157
|
];
|
|
158
158
|
}
|
|
159
159
|
function ViewContent() {
|
|
160
|
-
const event =
|
|
160
|
+
const event = q("product view");
|
|
161
161
|
return [
|
|
162
162
|
"track",
|
|
163
163
|
"ViewContent",
|
|
@@ -190,7 +190,7 @@ var Purchase2 = {
|
|
|
190
190
|
loop: [
|
|
191
191
|
"nested",
|
|
192
192
|
{
|
|
193
|
-
condition: (entity) =>
|
|
193
|
+
condition: (entity) => D(entity) && entity.entity === "product",
|
|
194
194
|
map: {
|
|
195
195
|
id: "data.id",
|
|
196
196
|
quantity: { key: "data.quantity", value: 1 }
|
|
@@ -237,7 +237,7 @@ var InitiateCheckout2 = {
|
|
|
237
237
|
loop: [
|
|
238
238
|
"nested",
|
|
239
239
|
{
|
|
240
|
-
condition: (entity) =>
|
|
240
|
+
condition: (entity) => D(entity) && entity.entity === "product",
|
|
241
241
|
map: {
|
|
242
242
|
id: "data.id",
|
|
243
243
|
quantity: { key: "data.quantity", value: 1 }
|
package/dist/index.browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Destination=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i={};((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})(i,{DestinationMeta:()=>d,default:()=>p,destinationMeta:()=>l});var r=Object.defineProperty;((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})({},{Level:()=>a});var c,a=((c=a||{})[c.ERROR=0]="ERROR",c[c.INFO=1]="INFO",c[c.DEBUG=2]="DEBUG",c);function s(e){return"object"==typeof e&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return{window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document,...e}}var f,d={},l={type:"meta-pixel",config:{},init({config:e,env:t,logger:n}){const{settings:o,loadScript:i}=e,{pixelId:r}=o||{};i&&function(e,t="https://connect.facebook.net/en_US/fbevents.js"){const{document:n}=u(e),o=n.createElement("script");o.src=t,o.async=!0,n.head.appendChild(o)}(t),r||n.throw("Config settings pixelId missing"),function(e){const{window:t}=u(e),n=t;if(n.fbq)return;const o=function(...e){o.callMethod?o.callMethod.apply(o,e):o.queue.push(e)};n.fbq=o,n._fbq||(n._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[]}(t);const{window:c}=u(t);(0,c.fbq)("init",r)},push(e,{config:t,
|
|
1
|
+
"use strict";var Destination=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i={};((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})(i,{DestinationMeta:()=>d,default:()=>p,destinationMeta:()=>l});var r=Object.defineProperty;((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})({},{Level:()=>a});var c,a=((c=a||{})[c.ERROR=0]="ERROR",c[c.INFO=1]="INFO",c[c.DEBUG=2]="DEBUG",c);function s(e){return"object"==typeof e&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return{window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document,...e}}var f,d={},l={type:"meta-pixel",config:{},init({config:e,env:t,logger:n}){const{settings:o,loadScript:i}=e,{pixelId:r}=o||{};i&&function(e,t="https://connect.facebook.net/en_US/fbevents.js"){const{document:n}=u(e),o=n.createElement("script");o.src=t,o.async=!0,n.head.appendChild(o)}(t),r||n.throw("Config settings pixelId missing"),function(e){const{window:t}=u(e),n=t;if(n.fbq)return;const o=function(...e){o.callMethod?o.callMethod.apply(o,e):o.queue.push(e)};n.fbq=o,n._fbq||(n._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[]}(t);const{window:c}=u(t);(0,c.fbq)("init",r)},push(e,{config:t,rule:n={},data:o,env:i}){const{track:r,trackCustom:c}=n.settings||{},{window:a}=u(i),f=a.fbq;"page view"!==e.name||n.settings||(e.name="PageView");const d=r||c||e.name;f(c?"trackCustom":"track",String(d),s(o)?o:{},{eventID:e.id})}},p=l;return f=i,((i,r,c,a)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of n(r))o.call(i,s)||s===c||e(i,s,{get:()=>r[s],enumerable:!(a=t(r,s))||a.enumerable});return i})(e({},"__esModule",{value:!0}),f)})();
|
package/dist/index.es5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var Destination=function(){var e=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)},t=function(e){return _object_spread({window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document},e)},n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,
|
|
1
|
+
"use strict";function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var Destination=function(){var e=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)},t=function(e){return _object_spread({window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document},e)},n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,u={};!function(e,t){for(var r in t)n(e,r,{get:t[r],enumerable:!0})}(u,{DestinationMeta:function(){return d},default:function(){return s},destinationMeta:function(){return p}});var c=Object.defineProperty;!function(e,t){for(var n in t)c(e,n,{get:t[n],enumerable:!0})}({},{Level:function(){return l}});var a,f,l=((a=l||{})[a.ERROR=0]="ERROR",a[a.INFO=1]="INFO",a[a.DEBUG=2]="DEBUG",a),d={},p={type:"meta-pixel",config:{},init:function(e){var n=e.config,r=e.env,o=e.logger,i=n.settings,u=n.loadScript,c=(i||{}).pixelId;u&&function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://connect.facebook.net/en_US/fbevents.js",r=t(e).document,o=r.createElement("script");o.src=n,o.async=!0,r.head.appendChild(o)}(r),c||o.throw("Config settings pixelId missing"),function(e){var n=t(e).window;if(!n.fbq){var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.callMethod?r.callMethod.apply(r,t):r.queue.push(t)};n.fbq=r,n._fbq||(n._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[]}}(r),(0,t(r).window.fbq)("init",c)},push:function(n,r){r.config;var o=r.rule,i=void 0===o?{}:o,u=r.data,c=r.env,a=i.settings||{},f=a.track,l=a.trackCustom,d=t(c).window.fbq;"page view"!==n.name||i.settings||(n.name="PageView");var p=f||l||n.name;d(l?"trackCustom":"track",String(p),e(u)?u:{},{eventID:n.id})}},s=p;return f=u,function(e,t,u,c){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var a=!0,f=!1,l=void 0;try{for(var d,p=function(){var o=d.value;i.call(e,o)||o===u||n(e,o,{get:function(){return t[o]},enumerable:!(c=r(t,o))||c.enumerable})},s=o(t)[Symbol.iterator]();!(a=(d=s.next()).done);a=!0)p()}catch(e){f=!0,l=e}finally{try{a||null==s.return||s.return()}finally{if(f)throw l}}}return e}(n({},"__esModule",{value:!0}),f)}();
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,
|
|
1
|
+
"use strict";var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(i,{DestinationMeta:()=>p,default:()=>g,destinationMeta:()=>b}),module.exports=(e=i,((e,i,a,c)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let s of r(i))o.call(e,s)||s===a||t(e,s,{get:()=>i[s],enumerable:!(c=n(i,s))||c.enumerable});return e})(t({},"__esModule",{value:!0}),e));var a=require("@walkeros/web-core");var c=Object.defineProperty;((e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})})({},{Level:()=>u});var s,u=((s=u||{})[s.ERROR=0]="ERROR",s[s.INFO=1]="INFO",s[s.DEBUG=2]="DEBUG",s);function l(e){return"object"==typeof e&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)}var f=require("@walkeros/web-core"),p={},b={type:"meta-pixel",config:{},init({config:e,env:t,logger:n}){const{settings:r,loadScript:o}=e,{pixelId:i}=r||{};o&&function(e,t="https://connect.facebook.net/en_US/fbevents.js"){const{document:n}=(0,a.getEnv)(e),r=n.createElement("script");r.src=t,r.async=!0,n.head.appendChild(r)}(t),i||n.throw("Config settings pixelId missing"),function(e){const{window:t}=(0,a.getEnv)(e),n=t;if(n.fbq)return;const r=function(...e){r.callMethod?r.callMethod.apply(r,e):r.queue.push(e)};n.fbq=r,n._fbq||(n._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[]}(t);const{window:c}=(0,f.getEnv)(t);(0,c.fbq)("init",i)},push(e,{config:t,rule:n={},data:r,env:o}){const{track:i,trackCustom:a}=n.settings||{},{window:c}=(0,f.getEnv)(o),s=c.fbq;"page view"!==e.name||n.settings||(e.name="PageView");const u=i||a||e.name;s(a?"trackCustom":"track",String(u),l(r)?r:{},{eventID:e.id})}},g=b;//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/setup.ts","../src/types/index.ts"],"sourcesContent":["import type { Settings, Destination } from './types';\nimport { addScript, setup } from './setup';\nimport { isObject } from '@walkeros/core';\nimport { getEnv } from '@walkeros/web-core';\n\n// Types\nexport * as DestinationMeta from './types';\n\nexport const destinationMeta: Destination = {\n type: 'meta-pixel',\n\n config: {},\n\n init({ config, env, logger }) {\n const { settings, loadScript } = config;\n const { pixelId } = settings || {};\n\n // Load Meta Pixel script if required (fbevents.js)\n if (loadScript) addScript(env);\n\n // Required pixel id\n if (!pixelId) logger.throw('Config settings pixelId missing');\n\n // fbq function setup\n setup(env);\n\n const { window } = getEnv(env);\n const fbq = window.fbq as facebook.Pixel.Event;\n fbq('init', pixelId!);\n },\n\n push(event, { config,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/setup.ts","../src/types/index.ts"],"sourcesContent":["import type { Settings, Destination } from './types';\nimport { addScript, setup } from './setup';\nimport { isObject } from '@walkeros/core';\nimport { getEnv } from '@walkeros/web-core';\n\n// Types\nexport * as DestinationMeta from './types';\n\nexport const destinationMeta: Destination = {\n type: 'meta-pixel',\n\n config: {},\n\n init({ config, env, logger }) {\n const { settings, loadScript } = config;\n const { pixelId } = settings || {};\n\n // Load Meta Pixel script if required (fbevents.js)\n if (loadScript) addScript(env);\n\n // Required pixel id\n if (!pixelId) logger.throw('Config settings pixelId missing');\n\n // fbq function setup\n setup(env);\n\n const { window } = getEnv(env);\n const fbq = window.fbq as facebook.Pixel.Event;\n fbq('init', pixelId!);\n },\n\n push(event, { config, rule = {}, data, env }) {\n const { track, trackCustom } = rule.settings || {};\n const { window } = getEnv(env);\n const fbq = window.fbq as facebook.Pixel.Event;\n\n // page view\n if (event.name === 'page view' && !rule.settings) {\n // Define a custom mapping\n event.name = 'PageView';\n }\n\n const eventName = track || trackCustom || event.name;\n\n fbq(\n trackCustom ? 'trackCustom' : 'track',\n String(eventName),\n isObject(data) ? data : {},\n { eventID: event.id },\n );\n },\n};\n\nexport default destinationMeta;\n","import type { DestinationWeb } from '@walkeros/web-core';\nimport { getEnv } from '@walkeros/web-core';\n\nexport function addScript(\n env?: DestinationWeb.Env,\n src = 'https://connect.facebook.net/en_US/fbevents.js',\n) {\n const { document } = getEnv(env);\n const script = (document as Document).createElement('script');\n script.src = src;\n script.async = true;\n (document as Document).head.appendChild(script);\n}\n\ninterface FBQFunction {\n (...args: unknown[]): void;\n callMethod?: (this: FBQFunction, ...args: unknown[]) => void;\n queue: unknown[];\n push: FBQFunction;\n loaded: boolean;\n version: string;\n}\n\nexport function setup(env?: DestinationWeb.Env) {\n const { window } = getEnv(env);\n const w = window as unknown as {\n fbq?: FBQFunction;\n _fbq?: FBQFunction;\n };\n if (w.fbq as unknown) return;\n\n const n = function (...args: unknown[]): void {\n n.callMethod ? n.callMethod.apply(n, args) : n.queue.push(args);\n } as FBQFunction;\n\n w.fbq = n;\n if (!w._fbq) w._fbq = n;\n n.push = n;\n n.loaded = true;\n n.version = '2.0';\n n.queue = [];\n}\n","import type {\n Mapping as WalkerOSMapping,\n Destination as CoreDestination,\n} from '@walkeros/core';\nimport type { DestinationWeb } from '@walkeros/web-core';\n\ndeclare global {\n interface Window {\n _fbq?: facebook.Pixel.Event;\n fbq?: facebook.Pixel.Event;\n }\n}\n\nexport interface Settings {\n pixelId: string;\n}\n\nexport type InitSettings = Partial<Settings>;\n\nexport interface Mapping {\n track?: StandardEventNames;\n trackCustom?: string;\n}\n\nexport interface Env extends DestinationWeb.Env {\n window: {\n fbq: facebook.Pixel.Event;\n _fbq?: facebook.Pixel.Event;\n };\n document: {\n createElement: (tagName: string) => Element;\n head: { appendChild: (node: unknown) => void };\n };\n}\n\nexport type Types = CoreDestination.Types<Settings, Mapping, Env, InitSettings>;\n\nexport type Destination = DestinationWeb.Destination<Types>;\nexport type Config = DestinationWeb.Config<Types>;\n\nexport type Rule = WalkerOSMapping.Rule<Mapping>;\nexport type Rules = WalkerOSMapping.Rules<Rule>;\n\nexport type StandardEventNames =\n | 'PageView'\n | 'AddPaymentInfo'\n | 'AddToCart'\n | 'AddToWishlist'\n | 'CompleteRegistration'\n | 'Contact'\n | 'CustomizeProduct'\n | 'Donate'\n | 'FindLocation'\n | 'InitiateCheckout'\n | 'Lead'\n | 'Purchase'\n | 'Schedule'\n | 'Search'\n | 'StartTrial'\n | 'SubmitApplication'\n | 'Subscribe'\n | 'ViewContent'\n | string;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,sBAAuB;AAEhB,SAAS,UACd,KACA,MAAM,kDACN;AACA,QAAM,EAAE,UAAAA,UAAS,QAAI,wBAAO,GAAG;AAC/B,QAAM,SAAUA,UAAsB,cAAc,QAAQ;AAC5D,SAAO,MAAM;AACb,SAAO,QAAQ;AACf,EAACA,UAAsB,KAAK,YAAY,MAAM;AAChD;AAWO,SAAS,MAAM,KAA0B;AAC9C,QAAM,EAAE,OAAO,QAAI,wBAAO,GAAG;AAC7B,QAAM,IAAI;AAIV,MAAI,EAAE,IAAgB;AAEtB,QAAM,IAAI,YAAa,MAAuB;AAC5C,MAAE,aAAa,EAAE,WAAW,MAAM,GAAG,IAAI,IAAI,EAAE,MAAM,KAAK,IAAI;AAAA,EAChE;AAEA,IAAE,MAAM;AACR,MAAI,CAAC,EAAE,KAAM,GAAE,OAAO;AACtB,IAAE,OAAO;AACT,IAAE,SAAS;AACX,IAAE,UAAU;AACZ,IAAE,QAAQ,CAAC;AACb;A;;;;;;;;;;;;;;;;ADtCA,IAAAC,mBAAuB;;;AEHvB;;;AFQO,IAAM,kBAA+B;AAAA,EAC1C,MAAM;AAAA,EAEN,QAAQ,CAAC;AAAA,EAET,KAAK,EAAE,QAAQ,KAAK,OAAO,GAAG;AAC5B,UAAM,EAAE,UAAU,WAAW,IAAI;AACjC,UAAM,EAAE,QAAQ,IAAI,YAAY,CAAC;AAGjC,QAAI,WAAY,WAAU,GAAG;AAG7B,QAAI,CAAC,QAAS,QAAO,MAAM,iCAAiC;AAG5D,UAAM,GAAG;AAET,UAAM,EAAE,OAAO,QAAI,yBAAO,GAAG;AAC7B,UAAM,MAAM,OAAO;AACnB,QAAI,QAAQ,OAAQ;AAAA,EACtB;AAAA,EAEA,KAAK,OAAO,EAAE,QAAQ,OAAO,CAAC,GAAG,MAAM,IAAI,GAAG;AAC5C,UAAM,EAAE,OAAO,YAAY,IAAI,KAAK,YAAY,CAAC;AACjD,UAAM,EAAE,OAAO,QAAI,yBAAO,GAAG;AAC7B,UAAM,MAAM,OAAO;AAGnB,QAAI,MAAM,SAAS,eAAe,CAAC,KAAK,UAAU;AAEhD,YAAM,OAAO;AAAA,IACf;AAEA,UAAM,YAAY,SAAS,eAAe,MAAM;AAEhD;AAAA,MACE,cAAc,gBAAgB;AAAA,MAC9B,OAAO,SAAS;AAAA,MAChB,EAAS,IAAI,IAAI,OAAO,CAAC;AAAA,MACzB,EAAE,SAAS,MAAM,GAAG;AAAA,IACtB;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":["document","import_web_core"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getEnv as e}from"@walkeros/web-core";var t=Object.defineProperty;((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{Level:()=>o});var n,o=((n=o||{})[n.ERROR=0]="ERROR",n[n.INFO=1]="INFO",n[n.DEBUG=2]="DEBUG",n);function i(e){return"object"==typeof e&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)}import{getEnv as r}from"@walkeros/web-core";var a={},c={type:"meta-pixel",config:{},init({config:t,env:n,logger:o}){const{settings:i,loadScript:a}=t,{pixelId:c}=i||{};a&&function(t,n="https://connect.facebook.net/en_US/fbevents.js"){const{document:o}=e(t),i=o.createElement("script");i.src=n,i.async=!0,o.head.appendChild(i)}(n),c||o.throw("Config settings pixelId missing"),function(t){const{window:n}=e(t),o=n;if(o.fbq)return;const i=function(...e){i.callMethod?i.callMethod.apply(i,e):i.queue.push(e)};o.fbq=i,o._fbq||(o._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[]}(n);const{window:s}=r(n);(0,s.fbq)("init",c)},push(e,{config:t,
|
|
1
|
+
import{getEnv as e}from"@walkeros/web-core";var t=Object.defineProperty;((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{Level:()=>o});var n,o=((n=o||{})[n.ERROR=0]="ERROR",n[n.INFO=1]="INFO",n[n.DEBUG=2]="DEBUG",n);function i(e){return"object"==typeof e&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)}import{getEnv as r}from"@walkeros/web-core";var a={},c={type:"meta-pixel",config:{},init({config:t,env:n,logger:o}){const{settings:i,loadScript:a}=t,{pixelId:c}=i||{};a&&function(t,n="https://connect.facebook.net/en_US/fbevents.js"){const{document:o}=e(t),i=o.createElement("script");i.src=n,i.async=!0,o.head.appendChild(i)}(n),c||o.throw("Config settings pixelId missing"),function(t){const{window:n}=e(t),o=n;if(o.fbq)return;const i=function(...e){i.callMethod?i.callMethod.apply(i,e):i.queue.push(e)};o.fbq=i,o._fbq||(o._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[]}(n);const{window:s}=r(n);(0,s.fbq)("init",c)},push(e,{config:t,rule:n={},data:o,env:a}){const{track:c,trackCustom:s}=n.settings||{},{window:f}=r(a),l=f.fbq;"page view"!==e.name||n.settings||(e.name="PageView");const p=c||s||e.name;l(s?"trackCustom":"track",String(p),i(o)?o:{},{eventID:e.id})}},s=c;export{a as DestinationMeta,s as default,c as destinationMeta};//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/setup.ts","../src/index.ts","../src/types/index.ts"],"sourcesContent":["import type { DestinationWeb } from '@walkeros/web-core';\nimport { getEnv } from '@walkeros/web-core';\n\nexport function addScript(\n env?: DestinationWeb.Env,\n src = 'https://connect.facebook.net/en_US/fbevents.js',\n) {\n const { document } = getEnv(env);\n const script = (document as Document).createElement('script');\n script.src = src;\n script.async = true;\n (document as Document).head.appendChild(script);\n}\n\ninterface FBQFunction {\n (...args: unknown[]): void;\n callMethod?: (this: FBQFunction, ...args: unknown[]) => void;\n queue: unknown[];\n push: FBQFunction;\n loaded: boolean;\n version: string;\n}\n\nexport function setup(env?: DestinationWeb.Env) {\n const { window } = getEnv(env);\n const w = window as unknown as {\n fbq?: FBQFunction;\n _fbq?: FBQFunction;\n };\n if (w.fbq as unknown) return;\n\n const n = function (...args: unknown[]): void {\n n.callMethod ? n.callMethod.apply(n, args) : n.queue.push(args);\n } as FBQFunction;\n\n w.fbq = n;\n if (!w._fbq) w._fbq = n;\n n.push = n;\n n.loaded = true;\n n.version = '2.0';\n n.queue = [];\n}\n","import type { Settings, Destination } from './types';\nimport { addScript, setup } from './setup';\nimport { isObject } from '@walkeros/core';\nimport { getEnv } from '@walkeros/web-core';\n\n// Types\nexport * as DestinationMeta from './types';\n\nexport const destinationMeta: Destination = {\n type: 'meta-pixel',\n\n config: {},\n\n init({ config, env, logger }) {\n const { settings, loadScript } = config;\n const { pixelId } = settings || {};\n\n // Load Meta Pixel script if required (fbevents.js)\n if (loadScript) addScript(env);\n\n // Required pixel id\n if (!pixelId) logger.throw('Config settings pixelId missing');\n\n // fbq function setup\n setup(env);\n\n const { window } = getEnv(env);\n const fbq = window.fbq as facebook.Pixel.Event;\n fbq('init', pixelId!);\n },\n\n push(event, { config,
|
|
1
|
+
{"version":3,"sources":["../src/setup.ts","../src/index.ts","../src/types/index.ts"],"sourcesContent":["import type { DestinationWeb } from '@walkeros/web-core';\nimport { getEnv } from '@walkeros/web-core';\n\nexport function addScript(\n env?: DestinationWeb.Env,\n src = 'https://connect.facebook.net/en_US/fbevents.js',\n) {\n const { document } = getEnv(env);\n const script = (document as Document).createElement('script');\n script.src = src;\n script.async = true;\n (document as Document).head.appendChild(script);\n}\n\ninterface FBQFunction {\n (...args: unknown[]): void;\n callMethod?: (this: FBQFunction, ...args: unknown[]) => void;\n queue: unknown[];\n push: FBQFunction;\n loaded: boolean;\n version: string;\n}\n\nexport function setup(env?: DestinationWeb.Env) {\n const { window } = getEnv(env);\n const w = window as unknown as {\n fbq?: FBQFunction;\n _fbq?: FBQFunction;\n };\n if (w.fbq as unknown) return;\n\n const n = function (...args: unknown[]): void {\n n.callMethod ? n.callMethod.apply(n, args) : n.queue.push(args);\n } as FBQFunction;\n\n w.fbq = n;\n if (!w._fbq) w._fbq = n;\n n.push = n;\n n.loaded = true;\n n.version = '2.0';\n n.queue = [];\n}\n","import type { Settings, Destination } from './types';\nimport { addScript, setup } from './setup';\nimport { isObject } from '@walkeros/core';\nimport { getEnv } from '@walkeros/web-core';\n\n// Types\nexport * as DestinationMeta from './types';\n\nexport const destinationMeta: Destination = {\n type: 'meta-pixel',\n\n config: {},\n\n init({ config, env, logger }) {\n const { settings, loadScript } = config;\n const { pixelId } = settings || {};\n\n // Load Meta Pixel script if required (fbevents.js)\n if (loadScript) addScript(env);\n\n // Required pixel id\n if (!pixelId) logger.throw('Config settings pixelId missing');\n\n // fbq function setup\n setup(env);\n\n const { window } = getEnv(env);\n const fbq = window.fbq as facebook.Pixel.Event;\n fbq('init', pixelId!);\n },\n\n push(event, { config, rule = {}, data, env }) {\n const { track, trackCustom } = rule.settings || {};\n const { window } = getEnv(env);\n const fbq = window.fbq as facebook.Pixel.Event;\n\n // page view\n if (event.name === 'page view' && !rule.settings) {\n // Define a custom mapping\n event.name = 'PageView';\n }\n\n const eventName = track || trackCustom || event.name;\n\n fbq(\n trackCustom ? 'trackCustom' : 'track',\n String(eventName),\n isObject(data) ? data : {},\n { eventID: event.id },\n );\n },\n};\n\nexport default destinationMeta;\n","import type {\n Mapping as WalkerOSMapping,\n Destination as CoreDestination,\n} from '@walkeros/core';\nimport type { DestinationWeb } from '@walkeros/web-core';\n\ndeclare global {\n interface Window {\n _fbq?: facebook.Pixel.Event;\n fbq?: facebook.Pixel.Event;\n }\n}\n\nexport interface Settings {\n pixelId: string;\n}\n\nexport type InitSettings = Partial<Settings>;\n\nexport interface Mapping {\n track?: StandardEventNames;\n trackCustom?: string;\n}\n\nexport interface Env extends DestinationWeb.Env {\n window: {\n fbq: facebook.Pixel.Event;\n _fbq?: facebook.Pixel.Event;\n };\n document: {\n createElement: (tagName: string) => Element;\n head: { appendChild: (node: unknown) => void };\n };\n}\n\nexport type Types = CoreDestination.Types<Settings, Mapping, Env, InitSettings>;\n\nexport type Destination = DestinationWeb.Destination<Types>;\nexport type Config = DestinationWeb.Config<Types>;\n\nexport type Rule = WalkerOSMapping.Rule<Mapping>;\nexport type Rules = WalkerOSMapping.Rules<Rule>;\n\nexport type StandardEventNames =\n | 'PageView'\n | 'AddPaymentInfo'\n | 'AddToCart'\n | 'AddToWishlist'\n | 'CompleteRegistration'\n | 'Contact'\n | 'CustomizeProduct'\n | 'Donate'\n | 'FindLocation'\n | 'InitiateCheckout'\n | 'Lead'\n | 'Purchase'\n | 'Schedule'\n | 'Search'\n | 'StartTrial'\n | 'SubmitApplication'\n | 'Subscribe'\n | 'ViewContent'\n | string;\n"],"mappings":";AACA,SAAS,cAAc;AAEhB,SAAS,UACd,KACA,MAAM,kDACN;AACA,QAAM,EAAE,UAAAA,UAAS,IAAI,OAAO,GAAG;AAC/B,QAAM,SAAUA,UAAsB,cAAc,QAAQ;AAC5D,SAAO,MAAM;AACb,SAAO,QAAQ;AACf,EAACA,UAAsB,KAAK,YAAY,MAAM;AAChD;AAWO,SAAS,MAAM,KAA0B;AAC9C,QAAM,EAAE,OAAO,IAAI,OAAO,GAAG;AAC7B,QAAM,IAAI;AAIV,MAAI,EAAE,IAAgB;AAEtB,QAAM,IAAI,YAAa,MAAuB;AAC5C,MAAE,aAAa,EAAE,WAAW,MAAM,GAAG,IAAI,IAAI,EAAE,MAAM,KAAK,IAAI;AAAA,EAChE;AAEA,IAAE,MAAM;AACR,MAAI,CAAC,EAAE,KAAM,GAAE,OAAO;AACtB,IAAE,OAAO;AACT,IAAE,SAAS;AACX,IAAE,UAAU;AACZ,IAAE,QAAQ,CAAC;AACb;A;;;;;;;;;;;;;;;;ACtCA,SAAS,UAAAC,eAAc;;;ACHvB;;;ADQO,IAAM,kBAA+B;AAAA,EAC1C,MAAM;AAAA,EAEN,QAAQ,CAAC;AAAA,EAET,KAAK,EAAE,QAAQ,KAAK,OAAO,GAAG;AAC5B,UAAM,EAAE,UAAU,WAAW,IAAI;AACjC,UAAM,EAAE,QAAQ,IAAI,YAAY,CAAC;AAGjC,QAAI,WAAY,WAAU,GAAG;AAG7B,QAAI,CAAC,QAAS,QAAO,MAAM,iCAAiC;AAG5D,UAAM,GAAG;AAET,UAAM,EAAE,OAAO,IAAIC,QAAO,GAAG;AAC7B,UAAM,MAAM,OAAO;AACnB,QAAI,QAAQ,OAAQ;AAAA,EACtB;AAAA,EAEA,KAAK,OAAO,EAAE,QAAQ,OAAO,CAAC,GAAG,MAAM,IAAI,GAAG;AAC5C,UAAM,EAAE,OAAO,YAAY,IAAI,KAAK,YAAY,CAAC;AACjD,UAAM,EAAE,OAAO,IAAIA,QAAO,GAAG;AAC7B,UAAM,MAAM,OAAO;AAGnB,QAAI,MAAM,SAAS,eAAe,CAAC,KAAK,UAAU;AAEhD,YAAM,OAAO;AAAA,IACf;AAEA,UAAM,YAAY,SAAS,eAAe,MAAM;AAEhD;AAAA,MACE,cAAc,gBAAgB;AAAA,MAC9B,OAAO,SAAS;AAAA,MAChB,EAAS,IAAI,IAAI,OAAO,CAAC;AAAA,MACzB,EAAE,SAAS,MAAM,GAAG;AAAA,IACtB;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":["document","getEnv","getEnv"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/web-destination-meta",
|
|
3
3
|
"description": "Meta pixel web destination for walkerOS",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"update": "npx npm-check-updates -u && npm update"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@walkeros/web-core": "0.
|
|
38
|
+
"@walkeros/web-core": "0.6.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/facebook-pixel": "^0.0.31"
|