@walkeros/web-destination-meta 0.1.2 → 0.2.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/README.md +2 -2
- package/dist/examples/index.d.mts +32 -10
- package/dist/examples/index.d.ts +32 -10
- package/dist/examples/index.js +5449 -34
- package/dist/examples/index.mjs +5448 -34
- package/dist/index.browser.js +1 -1
- package/dist/index.d.mts +105 -14
- package/dist/index.d.ts +105 -14
- 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/README.md
CHANGED
|
@@ -30,10 +30,10 @@ npm install @walkeros/web-destination-meta
|
|
|
30
30
|
Here's a basic example of how to use the Meta Pixel destination:
|
|
31
31
|
|
|
32
32
|
```typescript
|
|
33
|
-
import {
|
|
33
|
+
import { startFlow } from '@walkeros/collector';
|
|
34
34
|
import { destinationMeta } from '@walkeros/web-destination-meta';
|
|
35
35
|
|
|
36
|
-
const { elb } = await
|
|
36
|
+
const { elb } = await startFlow();
|
|
37
37
|
|
|
38
38
|
elb('walker destination', destinationMeta, {
|
|
39
39
|
settings: {
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { Mapping as Mapping$1 } from '@walkeros/core';
|
|
2
|
-
|
|
3
|
-
declare function Purchase$1(): unknown[];
|
|
4
|
-
declare function AddToCart$1(): unknown[];
|
|
5
|
-
declare function InitiateCheckout$1(): unknown[];
|
|
6
|
-
declare function ViewContent$1(): unknown[];
|
|
7
|
-
|
|
8
|
-
declare namespace events {
|
|
9
|
-
export { AddToCart$1 as AddToCart, InitiateCheckout$1 as InitiateCheckout, Purchase$1 as Purchase, ViewContent$1 as ViewContent };
|
|
10
|
-
}
|
|
2
|
+
import { DestinationWeb } from '@walkeros/web-core';
|
|
11
3
|
|
|
12
4
|
declare global {
|
|
13
5
|
interface Window {
|
|
@@ -19,9 +11,39 @@ interface Mapping {
|
|
|
19
11
|
track?: StandardEventNames;
|
|
20
12
|
trackCustom?: string;
|
|
21
13
|
}
|
|
14
|
+
interface Env extends DestinationWeb.Env {
|
|
15
|
+
window: {
|
|
16
|
+
fbq: facebook.Pixel.Event;
|
|
17
|
+
_fbq?: facebook.Pixel.Event;
|
|
18
|
+
};
|
|
19
|
+
document: {
|
|
20
|
+
createElement: (tagName: string) => Element;
|
|
21
|
+
head: {
|
|
22
|
+
appendChild: (node: unknown) => void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
22
26
|
type Rule = Mapping$1.Rule<Mapping>;
|
|
23
27
|
type StandardEventNames = 'PageView' | 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent' | string;
|
|
24
28
|
|
|
29
|
+
declare const init: Env | undefined;
|
|
30
|
+
declare const push: Env;
|
|
31
|
+
|
|
32
|
+
declare const env_init: typeof init;
|
|
33
|
+
declare const env_push: typeof push;
|
|
34
|
+
declare namespace env {
|
|
35
|
+
export { env_init as init, env_push as push };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare function Purchase$1(): unknown[];
|
|
39
|
+
declare function AddToCart$1(): unknown[];
|
|
40
|
+
declare function InitiateCheckout$1(): unknown[];
|
|
41
|
+
declare function ViewContent$1(): unknown[];
|
|
42
|
+
|
|
43
|
+
declare namespace events {
|
|
44
|
+
export { AddToCart$1 as AddToCart, InitiateCheckout$1 as InitiateCheckout, Purchase$1 as Purchase, ViewContent$1 as ViewContent };
|
|
45
|
+
}
|
|
46
|
+
|
|
25
47
|
declare const Purchase: Rule;
|
|
26
48
|
declare const AddToCart: Rule;
|
|
27
49
|
declare const InitiateCheckout: Rule;
|
|
@@ -48,4 +70,4 @@ declare namespace mapping {
|
|
|
48
70
|
export { mapping_AddToCart as AddToCart, mapping_InitiateCheckout as InitiateCheckout, mapping_Purchase as Purchase, mapping_ViewContent as ViewContent, mapping_config as config };
|
|
49
71
|
}
|
|
50
72
|
|
|
51
|
-
export { events, mapping };
|
|
73
|
+
export { env, events, mapping };
|
package/dist/examples/index.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { Mapping as Mapping$1 } from '@walkeros/core';
|
|
2
|
-
|
|
3
|
-
declare function Purchase$1(): unknown[];
|
|
4
|
-
declare function AddToCart$1(): unknown[];
|
|
5
|
-
declare function InitiateCheckout$1(): unknown[];
|
|
6
|
-
declare function ViewContent$1(): unknown[];
|
|
7
|
-
|
|
8
|
-
declare namespace events {
|
|
9
|
-
export { AddToCart$1 as AddToCart, InitiateCheckout$1 as InitiateCheckout, Purchase$1 as Purchase, ViewContent$1 as ViewContent };
|
|
10
|
-
}
|
|
2
|
+
import { DestinationWeb } from '@walkeros/web-core';
|
|
11
3
|
|
|
12
4
|
declare global {
|
|
13
5
|
interface Window {
|
|
@@ -19,9 +11,39 @@ interface Mapping {
|
|
|
19
11
|
track?: StandardEventNames;
|
|
20
12
|
trackCustom?: string;
|
|
21
13
|
}
|
|
14
|
+
interface Env extends DestinationWeb.Env {
|
|
15
|
+
window: {
|
|
16
|
+
fbq: facebook.Pixel.Event;
|
|
17
|
+
_fbq?: facebook.Pixel.Event;
|
|
18
|
+
};
|
|
19
|
+
document: {
|
|
20
|
+
createElement: (tagName: string) => Element;
|
|
21
|
+
head: {
|
|
22
|
+
appendChild: (node: unknown) => void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
22
26
|
type Rule = Mapping$1.Rule<Mapping>;
|
|
23
27
|
type StandardEventNames = 'PageView' | 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent' | string;
|
|
24
28
|
|
|
29
|
+
declare const init: Env | undefined;
|
|
30
|
+
declare const push: Env;
|
|
31
|
+
|
|
32
|
+
declare const env_init: typeof init;
|
|
33
|
+
declare const env_push: typeof push;
|
|
34
|
+
declare namespace env {
|
|
35
|
+
export { env_init as init, env_push as push };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare function Purchase$1(): unknown[];
|
|
39
|
+
declare function AddToCart$1(): unknown[];
|
|
40
|
+
declare function InitiateCheckout$1(): unknown[];
|
|
41
|
+
declare function ViewContent$1(): unknown[];
|
|
42
|
+
|
|
43
|
+
declare namespace events {
|
|
44
|
+
export { AddToCart$1 as AddToCart, InitiateCheckout$1 as InitiateCheckout, Purchase$1 as Purchase, ViewContent$1 as ViewContent };
|
|
45
|
+
}
|
|
46
|
+
|
|
25
47
|
declare const Purchase: Rule;
|
|
26
48
|
declare const AddToCart: Rule;
|
|
27
49
|
declare const InitiateCheckout: Rule;
|
|
@@ -48,4 +70,4 @@ declare namespace mapping {
|
|
|
48
70
|
export { mapping_AddToCart as AddToCart, mapping_InitiateCheckout as InitiateCheckout, mapping_Purchase as Purchase, mapping_ViewContent as ViewContent, mapping_config as config };
|
|
49
71
|
}
|
|
50
72
|
|
|
51
|
-
export { events, mapping };
|
|
73
|
+
export { env, events, mapping };
|