@shware/analytics 8.12.0 → 8.13.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/attribution/classify.cjs +35 -26
- package/dist/attribution/classify.cjs.map +1 -1
- package/dist/attribution/classify.d.cts +15 -9
- package/dist/attribution/classify.d.cts.map +1 -1
- package/dist/attribution/classify.d.mts +15 -9
- package/dist/attribution/classify.d.mts.map +1 -1
- package/dist/attribution/classify.mjs +36 -27
- package/dist/attribution/classify.mjs.map +1 -1
- package/dist/attribution/index.cjs +2 -0
- package/dist/attribution/index.d.cts +2 -2
- package/dist/attribution/index.d.mts +2 -2
- package/dist/attribution/index.mjs +2 -2
- package/dist/attribution/vocabulary.cjs +207 -34
- package/dist/attribution/vocabulary.cjs.map +1 -1
- package/dist/attribution/vocabulary.d.cts +75 -31
- package/dist/attribution/vocabulary.d.cts.map +1 -1
- package/dist/attribution/vocabulary.d.mts +75 -31
- package/dist/attribution/vocabulary.d.mts.map +1 -1
- package/dist/attribution/vocabulary.mjs +206 -35
- package/dist/attribution/vocabulary.mjs.map +1 -1
- package/dist/click-id/index.d.cts +18 -19
- package/dist/click-id/index.d.cts.map +1 -1
- package/dist/click-id/index.d.mts +18 -19
- package/dist/click-id/index.d.mts.map +1 -1
- package/dist/constants/storage.d.cts +1 -2
- package/dist/constants/storage.d.cts.map +1 -1
- package/dist/constants/storage.d.mts +1 -2
- package/dist/constants/storage.d.mts.map +1 -1
- package/dist/feedback/index.d.cts +1 -2
- package/dist/feedback/index.d.cts.map +1 -1
- package/dist/feedback/index.d.mts +1 -2
- package/dist/feedback/index.d.mts.map +1 -1
- package/dist/hooks/use-app-analytics.d.cts +1 -2
- package/dist/hooks/use-app-analytics.d.cts.map +1 -1
- package/dist/hooks/use-app-analytics.d.mts +1 -2
- package/dist/hooks/use-app-analytics.d.mts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.cts +1 -2
- package/dist/hooks/use-outbound-click-analytics.d.cts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.mts +1 -2
- package/dist/hooks/use-outbound-click-analytics.d.mts.map +1 -1
- package/dist/hooks/use-previous.d.cts +1 -2
- package/dist/hooks/use-previous.d.cts.map +1 -1
- package/dist/hooks/use-previous.d.mts +1 -2
- package/dist/hooks/use-previous.d.mts.map +1 -1
- package/dist/hooks/use-report-web-vitals.d.cts +1 -2
- package/dist/hooks/use-report-web-vitals.d.cts.map +1 -1
- package/dist/hooks/use-report-web-vitals.d.mts +1 -2
- package/dist/hooks/use-report-web-vitals.d.mts.map +1 -1
- package/dist/hooks/use-track-impression.d.cts +1 -2
- package/dist/hooks/use-track-impression.d.cts.map +1 -1
- package/dist/hooks/use-track-impression.d.mts +1 -2
- package/dist/hooks/use-track-impression.d.mts.map +1 -1
- package/dist/hooks/use-uet-id-sync.d.cts +1 -2
- package/dist/hooks/use-uet-id-sync.d.cts.map +1 -1
- package/dist/hooks/use-uet-id-sync.d.mts +1 -2
- package/dist/hooks/use-uet-id-sync.d.mts.map +1 -1
- package/dist/hooks/use-web-analytics.d.cts +1 -2
- package/dist/hooks/use-web-analytics.d.cts.map +1 -1
- package/dist/hooks/use-web-analytics.d.mts +1 -2
- package/dist/hooks/use-web-analytics.d.mts.map +1 -1
- package/dist/link/index.d.cts +3 -4
- package/dist/link/index.d.cts.map +1 -1
- package/dist/link/index.d.mts +3 -4
- package/dist/link/index.d.mts.map +1 -1
- package/dist/native/fbsdk.d.cts +1 -2
- package/dist/native/fbsdk.d.cts.map +1 -1
- package/dist/native/fbsdk.d.mts +1 -2
- package/dist/native/fbsdk.d.mts.map +1 -1
- package/dist/native/fingerprint.d.cts +4 -5
- package/dist/native/fingerprint.d.cts.map +1 -1
- package/dist/native/fingerprint.d.mts +4 -5
- package/dist/native/fingerprint.d.mts.map +1 -1
- package/dist/native/firebase.d.cts +1 -2
- package/dist/native/firebase.d.cts.map +1 -1
- package/dist/native/firebase.d.mts +1 -2
- package/dist/native/firebase.d.mts.map +1 -1
- package/dist/native/posthog.d.cts +1 -2
- package/dist/native/posthog.d.cts.map +1 -1
- package/dist/native/posthog.d.mts +1 -2
- package/dist/native/posthog.d.mts.map +1 -1
- package/dist/native/setup.d.cts +4 -5
- package/dist/native/setup.d.cts.map +1 -1
- package/dist/native/setup.d.mts +4 -5
- package/dist/native/setup.d.mts.map +1 -1
- package/dist/next/index.cjs +14 -14
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +1 -2
- package/dist/next/index.d.cts.map +1 -1
- package/dist/next/index.d.mts +1 -2
- package/dist/next/index.d.mts.map +1 -1
- package/dist/next/index.mjs +3 -3
- package/dist/react-router/index.d.cts +1 -2
- package/dist/react-router/index.d.cts.map +1 -1
- package/dist/react-router/index.d.mts +1 -2
- package/dist/react-router/index.d.mts.map +1 -1
- package/dist/schema/index.d.cts +16 -17
- package/dist/schema/index.d.cts.map +1 -1
- package/dist/schema/index.d.mts +16 -17
- package/dist/schema/index.d.mts.map +1 -1
- package/dist/server/action-source.d.cts +3 -4
- package/dist/server/action-source.d.cts.map +1 -1
- package/dist/server/action-source.d.mts +3 -4
- package/dist/server/action-source.d.mts.map +1 -1
- package/dist/server/google-data-manager.d.cts +9 -10
- package/dist/server/google-data-manager.d.cts.map +1 -1
- package/dist/server/google-data-manager.d.mts +9 -10
- package/dist/server/google-data-manager.d.mts.map +1 -1
- package/dist/server/linkedin-conversions-api.d.cts +4 -5
- package/dist/server/linkedin-conversions-api.d.cts.map +1 -1
- package/dist/server/linkedin-conversions-api.d.mts +4 -5
- package/dist/server/linkedin-conversions-api.d.mts.map +1 -1
- package/dist/server/meta-capi.d.cts +5 -6
- package/dist/server/meta-capi.d.cts.map +1 -1
- package/dist/server/meta-capi.d.mts +5 -6
- package/dist/server/meta-capi.d.mts.map +1 -1
- package/dist/server/meta-conversions-api.d.cts +4 -5
- package/dist/server/meta-conversions-api.d.cts.map +1 -1
- package/dist/server/meta-conversions-api.d.mts +4 -5
- package/dist/server/meta-conversions-api.d.mts.map +1 -1
- package/dist/server/microsoft-conversions-api.d.cts +11 -12
- package/dist/server/microsoft-conversions-api.d.cts.map +1 -1
- package/dist/server/microsoft-conversions-api.d.mts +11 -12
- package/dist/server/microsoft-conversions-api.d.mts.map +1 -1
- package/dist/server/openai-conversions-api.d.cts +5 -6
- package/dist/server/openai-conversions-api.d.cts.map +1 -1
- package/dist/server/openai-conversions-api.d.mts +5 -6
- package/dist/server/openai-conversions-api.d.mts.map +1 -1
- package/dist/server/page-location.d.cts +1 -2
- package/dist/server/page-location.d.cts.map +1 -1
- package/dist/server/page-location.d.mts +1 -2
- package/dist/server/page-location.d.mts.map +1 -1
- package/dist/server/reddit-conversions-api.d.cts +4 -5
- package/dist/server/reddit-conversions-api.d.cts.map +1 -1
- package/dist/server/reddit-conversions-api.d.mts +4 -5
- package/dist/server/reddit-conversions-api.d.mts.map +1 -1
- package/dist/setup/index.d.cts +5 -6
- package/dist/setup/index.d.cts.map +1 -1
- package/dist/setup/index.d.mts +5 -6
- package/dist/setup/index.d.mts.map +1 -1
- package/dist/setup/session.d.cts +2 -3
- package/dist/setup/session.d.cts.map +1 -1
- package/dist/setup/session.d.mts +2 -3
- package/dist/setup/session.d.mts.map +1 -1
- package/dist/tanstack/analytics.d.cts +1 -2
- package/dist/tanstack/analytics.d.cts.map +1 -1
- package/dist/tanstack/analytics.d.mts +1 -2
- package/dist/tanstack/analytics.d.mts.map +1 -1
- package/dist/tanstack/middleware.d.cts +3 -4
- package/dist/tanstack/middleware.d.cts.map +1 -1
- package/dist/tanstack/middleware.d.mts +3 -4
- package/dist/tanstack/middleware.d.mts.map +1 -1
- package/dist/test/setup.d.cts +3 -4
- package/dist/test/setup.d.cts.map +1 -1
- package/dist/test/setup.d.mts +3 -4
- package/dist/test/setup.d.mts.map +1 -1
- package/dist/third-parties/google-analytics.d.cts +2 -3
- package/dist/third-parties/google-analytics.d.cts.map +1 -1
- package/dist/third-parties/google-analytics.d.mts +2 -3
- package/dist/third-parties/google-analytics.d.mts.map +1 -1
- package/dist/third-parties/ignored-events.d.cts +1 -2
- package/dist/third-parties/ignored-events.d.cts.map +1 -1
- package/dist/third-parties/ignored-events.d.mts +1 -2
- package/dist/third-parties/ignored-events.d.mts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.cts +3 -4
- package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.mts +3 -4
- package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -1
- package/dist/third-parties/meta-pixel.d.cts +2 -3
- package/dist/third-parties/meta-pixel.d.cts.map +1 -1
- package/dist/third-parties/meta-pixel.d.mts +2 -3
- package/dist/third-parties/meta-pixel.d.mts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.cts +6 -7
- package/dist/third-parties/microsoft-uet.d.cts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.mts +6 -7
- package/dist/third-parties/microsoft-uet.d.mts.map +1 -1
- package/dist/third-parties/openai-pixel.d.cts +2 -3
- package/dist/third-parties/openai-pixel.d.cts.map +1 -1
- package/dist/third-parties/openai-pixel.d.mts +2 -3
- package/dist/third-parties/openai-pixel.d.mts.map +1 -1
- package/dist/third-parties/posthog.d.cts +2 -3
- package/dist/third-parties/posthog.d.cts.map +1 -1
- package/dist/third-parties/posthog.d.mts +2 -3
- package/dist/third-parties/posthog.d.mts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.cts +2 -3
- package/dist/third-parties/reddit-pixel.d.cts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.mts +2 -3
- package/dist/third-parties/reddit-pixel.d.mts.map +1 -1
- package/dist/track/fbq.d.cts +10 -11
- package/dist/track/fbq.d.cts.map +1 -1
- package/dist/track/fbq.d.mts +10 -11
- package/dist/track/fbq.d.mts.map +1 -1
- package/dist/track/gtag.d.cts +26 -27
- package/dist/track/gtag.d.cts.map +1 -1
- package/dist/track/gtag.d.mts +26 -27
- package/dist/track/gtag.d.mts.map +1 -1
- package/dist/track/index.d.cts +4 -5
- package/dist/track/index.d.cts.map +1 -1
- package/dist/track/index.d.mts +4 -5
- package/dist/track/index.d.mts.map +1 -1
- package/dist/track/lintrk.d.cts +1 -2
- package/dist/track/lintrk.d.cts.map +1 -1
- package/dist/track/lintrk.d.mts +1 -2
- package/dist/track/lintrk.d.mts.map +1 -1
- package/dist/track/oaiq.d.cts +17 -18
- package/dist/track/oaiq.d.cts.map +1 -1
- package/dist/track/oaiq.d.mts +17 -18
- package/dist/track/oaiq.d.mts.map +1 -1
- package/dist/track/rdt.d.cts +10 -11
- package/dist/track/rdt.d.cts.map +1 -1
- package/dist/track/rdt.d.mts +10 -11
- package/dist/track/rdt.d.mts.map +1 -1
- package/dist/track/types.d.cts +20 -21
- package/dist/track/types.d.cts.map +1 -1
- package/dist/track/types.d.mts +20 -21
- package/dist/track/types.d.mts.map +1 -1
- package/dist/track/uetq.d.cts +8 -9
- package/dist/track/uetq.d.cts.map +1 -1
- package/dist/track/uetq.d.mts +8 -9
- package/dist/track/uetq.d.mts.map +1 -1
- package/dist/utils/field.d.cts +1 -2
- package/dist/utils/field.d.cts.map +1 -1
- package/dist/utils/field.d.mts +1 -2
- package/dist/utils/field.d.mts.map +1 -1
- package/dist/utils/sha256.d.cts +1 -2
- package/dist/utils/sha256.d.cts.map +1 -1
- package/dist/utils/sha256.d.mts +1 -2
- package/dist/utils/sha256.d.mts.map +1 -1
- package/dist/utils/stripe.d.cts +2 -3
- package/dist/utils/stripe.d.cts.map +1 -1
- package/dist/utils/stripe.d.mts +2 -3
- package/dist/utils/stripe.d.mts.map +1 -1
- package/dist/visitor/index.d.cts +2 -3
- package/dist/visitor/index.d.cts.map +1 -1
- package/dist/visitor/index.d.mts +2 -3
- package/dist/visitor/index.d.mts.map +1 -1
- package/dist/visitor/types.d.cts +4 -5
- package/dist/visitor/types.d.cts.map +1 -1
- package/dist/visitor/types.d.mts +4 -5
- package/dist/visitor/types.d.mts.map +1 -1
- package/dist/web/index.d.cts +3 -4
- package/dist/web/index.d.cts.map +1 -1
- package/dist/web/index.d.mts +3 -4
- package/dist/web/index.d.mts.map +1 -1
- package/dist/web/page-key.d.cts +1 -2
- package/dist/web/page-key.d.cts.map +1 -1
- package/dist/web/page-key.d.mts +1 -2
- package/dist/web/page-key.d.mts.map +1 -1
- package/package.json +27 -27
|
@@ -8,8 +8,7 @@ declare global {
|
|
|
8
8
|
rdt?: RDT['rdt'];
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
declare function sendRedditEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, eventId?: string): void;
|
|
12
|
-
declare function setRedditUser(pixelId: PixelId): ({ user_id, user_data }: UpdateVisitorDTO) => void;
|
|
11
|
+
export declare function sendRedditEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, eventId?: string): void;
|
|
12
|
+
export declare function setRedditUser(pixelId: PixelId): ({ user_id, user_data }: UpdateVisitorDTO) => void;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { sendRedditEvent, setRedditUser };
|
|
15
14
|
//# sourceMappingURL=reddit-pixel.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reddit-pixel.d.mts","names":[],"sources":["../../src/third-parties/reddit-pixel.ts"],"mappings":";;;;QAKQ;YACI;;IAER,MAAM;;;
|
|
1
|
+
{"version":3,"file":"reddit-pixel.d.mts","names":[],"sources":["../../src/third-parties/reddit-pixel.ts"],"mappings":";;;;QAKQ;YACI;;IAER,MAAM;;;wBAMM,gBAAgB,UAAU,WACxC,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B;wBAqBc,cAAc,SAAS,aAAO,SAAA,aACZ"}
|
package/dist/track/fbq.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Item } from "./gtag.cjs";
|
|
2
2
|
import { EventName, TrackName, TrackProperties } from "./types.cjs";
|
|
3
3
|
//#region src/track/fbq.d.ts
|
|
4
|
-
type Content = {
|
|
4
|
+
export type Content = {
|
|
5
5
|
id: string;
|
|
6
6
|
quantity: number;
|
|
7
7
|
item_price?: number;
|
|
@@ -15,7 +15,7 @@ type Content = {
|
|
|
15
15
|
* reference: https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching
|
|
16
16
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
|
|
17
17
|
*/
|
|
18
|
-
type MatchingParameters = {
|
|
18
|
+
export type MatchingParameters = {
|
|
19
19
|
/** Email: Unhashed lowercase or hashed SHA-256 */
|
|
20
20
|
em?: string;
|
|
21
21
|
/** First Name: Lowercase letters */
|
|
@@ -124,7 +124,7 @@ type MatchingParameters = {
|
|
|
124
124
|
* standard events that support them. Format your parameter object data using JSON. Learn more about
|
|
125
125
|
* event parameters with Blueprint.
|
|
126
126
|
*/
|
|
127
|
-
type ObjectProperties = {
|
|
127
|
+
export type ObjectProperties = {
|
|
128
128
|
content_category?: string;
|
|
129
129
|
content_ids?: string[];
|
|
130
130
|
content_name?: string;
|
|
@@ -150,7 +150,7 @@ type ObjectProperties = {
|
|
|
150
150
|
/**
|
|
151
151
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/payload-helper
|
|
152
152
|
*/
|
|
153
|
-
type StandardEvents = {
|
|
153
|
+
export type StandardEvents = {
|
|
154
154
|
AddPaymentInfo: {
|
|
155
155
|
content_ids?: string[];
|
|
156
156
|
contents?: Content[];
|
|
@@ -229,8 +229,8 @@ type StandardEvents = {
|
|
|
229
229
|
type JSONValue = null | string | number | boolean | Array<JSONValue> | {
|
|
230
230
|
[value: string]: JSONValue;
|
|
231
231
|
};
|
|
232
|
-
type PixelId = `${number}`;
|
|
233
|
-
type Options = {
|
|
232
|
+
export type PixelId = `${number}`;
|
|
233
|
+
export type Options = {
|
|
234
234
|
eventID?: string;
|
|
235
235
|
};
|
|
236
236
|
/**
|
|
@@ -242,7 +242,7 @@ type Options = {
|
|
|
242
242
|
*
|
|
243
243
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
|
|
244
244
|
*/
|
|
245
|
-
interface FBQ {
|
|
245
|
+
export interface FBQ {
|
|
246
246
|
/**
|
|
247
247
|
* reference: https://stackoverflow.com/questions/62304291/sending-user-data-parameters-via-pixel
|
|
248
248
|
*
|
|
@@ -270,11 +270,10 @@ interface FBQ {
|
|
|
270
270
|
* Please download this CSV filefor examples of properly normalized and hashed data for the
|
|
271
271
|
* parameters below.
|
|
272
272
|
*/
|
|
273
|
-
declare function normalize(parameters: MatchingParameters): MatchingParameters;
|
|
274
|
-
declare function mapItems(items?: Item[]): ObjectProperties;
|
|
273
|
+
export declare function normalize(parameters: MatchingParameters): MatchingParameters;
|
|
274
|
+
export declare function mapItems(items?: Item[]): ObjectProperties;
|
|
275
275
|
type Mapped<F extends keyof StandardEvents> = ['track', F, StandardEvents[F] & ObjectProperties];
|
|
276
276
|
type Missed<F extends string> = ['trackCustom', F, Record<string, JSONValue> & ObjectProperties];
|
|
277
|
-
declare function mapFBEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>): Mapped<keyof StandardEvents> | Missed<TrackName<T>>;
|
|
277
|
+
export declare function mapFBEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>): Mapped<keyof StandardEvents> | Missed<TrackName<T>>;
|
|
278
278
|
//#endregion
|
|
279
|
-
export { Content, FBQ, MatchingParameters, ObjectProperties, Options, PixelId, StandardEvents, mapFBEvent, mapItems, normalize };
|
|
280
279
|
//# sourceMappingURL=fbq.d.cts.map
|
package/dist/track/fbq.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fbq.d.cts","names":[],"sources":["../../src/track/fbq.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"fbq.d.cts","names":[],"sources":["../../src/track/fbq.ts"],"mappings":";;;YAIY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;YAOU;;EAEV;;EAGA;;EAGA;;EAGA;;;;;EAMA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;;;;;;;;EAUA;;;;;;;;EASA;;;;;;EAOA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;;;;;EAOA;;;;;;;YAQU;EACV;EACA;EACA;;;;;;;;;EAUA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;;EAGA;EACA;;;;;YAMU;EACV;IACE;IACA,WAAW;IACX;IACA;;EAEF;IACE;IACA;IACA,WAAW;IACX;IACA;;EAEF;IACE;IACA,WAAW;IACX;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;EACA;EACA;EACA;IACE;IACA,WAAW;IACX;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA,WAAW;IACX;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA,WAAW;IACX;IACA;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA,WAAW;IACX;IACA;;;KAIC,+CAKD,MAAM;GACH,gBAAgB;;YAEX;YACA;EAAY;;;;;;;;;;;iBAWP;;;;;;;;;;;;;;EAcf,IAAI,cAAc,SAAS,SAAS,aAAa;;EAGjD,IAAI,aAAa,mBAAmB,gBAAgB,SAAS;EAE7D,IAAI,gBAAgB,gBAClB,eACA,OAAO,GACP,aAAa,eAAe,KAAK,kBACjC,UAAU;EAGZ,IACE,qBACA,eACA,aAAa,eAAe,aAAa,kBACzC,UAAU;;EAIZ,IAAI,gBAAgB,gBAClB,qBACA,SAAS,SACT,OAAO,GACP,aAAa,eAAe,KAAK,kBACjC,UAAU;;EAIZ,IACE,2BACA,SAAS,SACT,eACA,aAAa,eAAe,aAAa,kBACzC,UAAU;;;;;;wBAQE,UAAU,YAAY,qBAAqB;wBAc3C,SAAS,QAAQ,SAAS;KAsBrC,OAAO,gBAAgB,4BAA4B,GAAG,eAAe,KAAK;KAC1E,OAAO,oCAAoC,GAAG,eAAe,aAAa;wBAE/D,WAAW,UAAU,WACnC,MAAM,UAAU,IAChB,aAAa,gBAAgB,KAC5B,aAAa,kBAAkB,OAAO,UAAU"}
|
package/dist/track/fbq.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Item } from "./gtag.mjs";
|
|
2
2
|
import { EventName, TrackName, TrackProperties } from "./types.mjs";
|
|
3
3
|
//#region src/track/fbq.d.ts
|
|
4
|
-
type Content = {
|
|
4
|
+
export type Content = {
|
|
5
5
|
id: string;
|
|
6
6
|
quantity: number;
|
|
7
7
|
item_price?: number;
|
|
@@ -15,7 +15,7 @@ type Content = {
|
|
|
15
15
|
* reference: https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching
|
|
16
16
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
|
|
17
17
|
*/
|
|
18
|
-
type MatchingParameters = {
|
|
18
|
+
export type MatchingParameters = {
|
|
19
19
|
/** Email: Unhashed lowercase or hashed SHA-256 */
|
|
20
20
|
em?: string;
|
|
21
21
|
/** First Name: Lowercase letters */
|
|
@@ -124,7 +124,7 @@ type MatchingParameters = {
|
|
|
124
124
|
* standard events that support them. Format your parameter object data using JSON. Learn more about
|
|
125
125
|
* event parameters with Blueprint.
|
|
126
126
|
*/
|
|
127
|
-
type ObjectProperties = {
|
|
127
|
+
export type ObjectProperties = {
|
|
128
128
|
content_category?: string;
|
|
129
129
|
content_ids?: string[];
|
|
130
130
|
content_name?: string;
|
|
@@ -150,7 +150,7 @@ type ObjectProperties = {
|
|
|
150
150
|
/**
|
|
151
151
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/payload-helper
|
|
152
152
|
*/
|
|
153
|
-
type StandardEvents = {
|
|
153
|
+
export type StandardEvents = {
|
|
154
154
|
AddPaymentInfo: {
|
|
155
155
|
content_ids?: string[];
|
|
156
156
|
contents?: Content[];
|
|
@@ -229,8 +229,8 @@ type StandardEvents = {
|
|
|
229
229
|
type JSONValue = null | string | number | boolean | Array<JSONValue> | {
|
|
230
230
|
[value: string]: JSONValue;
|
|
231
231
|
};
|
|
232
|
-
type PixelId = `${number}`;
|
|
233
|
-
type Options = {
|
|
232
|
+
export type PixelId = `${number}`;
|
|
233
|
+
export type Options = {
|
|
234
234
|
eventID?: string;
|
|
235
235
|
};
|
|
236
236
|
/**
|
|
@@ -242,7 +242,7 @@ type Options = {
|
|
|
242
242
|
*
|
|
243
243
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
|
|
244
244
|
*/
|
|
245
|
-
interface FBQ {
|
|
245
|
+
export interface FBQ {
|
|
246
246
|
/**
|
|
247
247
|
* reference: https://stackoverflow.com/questions/62304291/sending-user-data-parameters-via-pixel
|
|
248
248
|
*
|
|
@@ -270,11 +270,10 @@ interface FBQ {
|
|
|
270
270
|
* Please download this CSV filefor examples of properly normalized and hashed data for the
|
|
271
271
|
* parameters below.
|
|
272
272
|
*/
|
|
273
|
-
declare function normalize(parameters: MatchingParameters): MatchingParameters;
|
|
274
|
-
declare function mapItems(items?: Item[]): ObjectProperties;
|
|
273
|
+
export declare function normalize(parameters: MatchingParameters): MatchingParameters;
|
|
274
|
+
export declare function mapItems(items?: Item[]): ObjectProperties;
|
|
275
275
|
type Mapped<F extends keyof StandardEvents> = ['track', F, StandardEvents[F] & ObjectProperties];
|
|
276
276
|
type Missed<F extends string> = ['trackCustom', F, Record<string, JSONValue> & ObjectProperties];
|
|
277
|
-
declare function mapFBEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>): Mapped<keyof StandardEvents> | Missed<TrackName<T>>;
|
|
277
|
+
export declare function mapFBEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>): Mapped<keyof StandardEvents> | Missed<TrackName<T>>;
|
|
278
278
|
//#endregion
|
|
279
|
-
export { Content, FBQ, MatchingParameters, ObjectProperties, Options, PixelId, StandardEvents, mapFBEvent, mapItems, normalize };
|
|
280
279
|
//# sourceMappingURL=fbq.d.mts.map
|
package/dist/track/fbq.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fbq.d.mts","names":[],"sources":["../../src/track/fbq.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"fbq.d.mts","names":[],"sources":["../../src/track/fbq.ts"],"mappings":";;;YAIY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;YAOU;;EAEV;;EAGA;;EAGA;;EAGA;;;;;EAMA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;;;;;;;;EAUA;;;;;;;;EASA;;;;;;EAOA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;;;;;EAOA;;;;;;;YAQU;EACV;EACA;EACA;;;;;;;;;EAUA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;;EAGA;EACA;;;;;YAMU;EACV;IACE;IACA,WAAW;IACX;IACA;;EAEF;IACE;IACA;IACA,WAAW;IACX;IACA;;EAEF;IACE;IACA,WAAW;IACX;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;EACA;EACA;EACA;IACE;IACA,WAAW;IACX;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA,WAAW;IACX;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA,WAAW;IACX;IACA;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA,WAAW;IACX;IACA;;;KAIC,+CAKD,MAAM;GACH,gBAAgB;;YAEX;YACA;EAAY;;;;;;;;;;;iBAWP;;;;;;;;;;;;;;EAcf,IAAI,cAAc,SAAS,SAAS,aAAa;;EAGjD,IAAI,aAAa,mBAAmB,gBAAgB,SAAS;EAE7D,IAAI,gBAAgB,gBAClB,eACA,OAAO,GACP,aAAa,eAAe,KAAK,kBACjC,UAAU;EAGZ,IACE,qBACA,eACA,aAAa,eAAe,aAAa,kBACzC,UAAU;;EAIZ,IAAI,gBAAgB,gBAClB,qBACA,SAAS,SACT,OAAO,GACP,aAAa,eAAe,KAAK,kBACjC,UAAU;;EAIZ,IACE,2BACA,SAAS,SACT,eACA,aAAa,eAAe,aAAa,kBACzC,UAAU;;;;;;wBAQE,UAAU,YAAY,qBAAqB;wBAc3C,SAAS,QAAQ,SAAS;KAsBrC,OAAO,gBAAgB,4BAA4B,GAAG,eAAe,KAAK;KAC1E,OAAO,oCAAoC,GAAG,eAAe,aAAa;wBAE/D,WAAW,UAAU,WACnC,MAAM,UAAU,IAChB,aAAa,gBAAgB,KAC5B,aAAa,kBAAkB,OAAO,UAAU"}
|
package/dist/track/gtag.d.cts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/** reference: https://support.google.com/analytics/answer/13316687 */
|
|
3
3
|
declare const reservedWebEventNames: readonly ['app_remove', 'app_store_refund', 'app_store_subscription_cancel', 'app_store_subscription_renew', 'click', 'error', 'file_download', 'first_open', 'first_visit', 'form_start', 'form_submit', 'in_app_purchase', 'page_view', 'scroll', 'session_start', 'user_engagement', 'view_complete', 'video_progress', 'video_start', 'view_search_results'];
|
|
4
4
|
declare const reservedAppEventNames: readonly ['ad_activeview', 'ad_click', 'ad_exposure', 'ad_impression', 'ad_query', 'ad_reward', 'adunit_exposure', 'app_clear_data', 'app_exception', 'app_install', 'app_remove', 'app_store_refund', 'app_update', 'app_upgrade', 'dynamic_link_app_open', 'dynamic_link_app_update', 'dynamic_link_first_open', 'error', 'firebase_campaign', 'firebase_in_app_message_action', 'firebase_in_app_message_dismiss', 'firebase_in_app_message_impression', 'first_open', 'first_visit', 'in_app_purchase', 'notification_dismiss', 'notification_foreground', 'notification_open', 'notification_receive', 'notification_send', 'os_update', 'screen_view', 'session_start', 'user_engagement'];
|
|
5
|
-
declare const reservedEventNames: readonly ["app_remove", "app_store_refund", "app_store_subscription_cancel", "app_store_subscription_renew", "click", "error", "file_download", "first_open", "first_visit", "form_start", "form_submit", "in_app_purchase", "page_view", "scroll", "session_start", "user_engagement", "view_complete", "video_progress", "video_start", "view_search_results", "ad_activeview", "ad_click", "ad_exposure", "ad_impression", "ad_query", "ad_reward", "adunit_exposure", "app_clear_data", "app_exception", "app_install", "app_remove", "app_store_refund", "app_update", "app_upgrade", "dynamic_link_app_open", "dynamic_link_app_update", "dynamic_link_first_open", "error", "firebase_campaign", "firebase_in_app_message_action", "firebase_in_app_message_dismiss", "firebase_in_app_message_impression", "first_open", "first_visit", "in_app_purchase", "notification_dismiss", "notification_foreground", "notification_open", "notification_receive", "notification_send", "os_update", "screen_view", "session_start", "user_engagement"];
|
|
5
|
+
export declare const reservedEventNames: readonly ["app_remove", "app_store_refund", "app_store_subscription_cancel", "app_store_subscription_renew", "click", "error", "file_download", "first_open", "first_visit", "form_start", "form_submit", "in_app_purchase", "page_view", "scroll", "session_start", "user_engagement", "view_complete", "video_progress", "video_start", "view_search_results", "ad_activeview", "ad_click", "ad_exposure", "ad_impression", "ad_query", "ad_reward", "adunit_exposure", "app_clear_data", "app_exception", "app_install", "app_remove", "app_store_refund", "app_update", "app_upgrade", "dynamic_link_app_open", "dynamic_link_app_update", "dynamic_link_first_open", "error", "firebase_campaign", "firebase_in_app_message_action", "firebase_in_app_message_dismiss", "firebase_in_app_message_impression", "first_open", "first_visit", "in_app_purchase", "notification_dismiss", "notification_foreground", "notification_open", "notification_receive", "notification_send", "os_update", "screen_view", "session_start", "user_engagement"];
|
|
6
6
|
type ReservedWebEventNames = (typeof reservedWebEventNames)[number];
|
|
7
7
|
type ReservedAppEventNames = (typeof reservedAppEventNames)[number];
|
|
8
|
-
type ReservedEventNames = ReservedWebEventNames | ReservedAppEventNames;
|
|
9
|
-
type ReservedEventValues = 'cid' | 'currency' | 'customer_id' | 'customerid' | 'dclid' | 'gclid' | 'session_id' | 'sessionid' | 'sfmc_id' | 'sid' | 'srsltid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}` | `gtag.${string}`;
|
|
10
|
-
type ReservedUserPropertiesNames = 'cid' | 'customer_id' | 'customerid' | 'first_open_after_install' | 'first_open_time' | 'first_visit_time' | 'google_allow_ad_personalization_signals' | 'last_advertising_id_reset' | 'last_deep_link_referrer' | 'last_gclid' | 'lifetime_user_engagement' | 'non_personalized_ads' | 'session_id' | 'session_number' | 'sessionid' | 'sfmc_id' | 'sid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}`;
|
|
11
|
-
type UserPropertiesValue = string | boolean | number | null | undefined;
|
|
12
|
-
type UserProperties = {
|
|
8
|
+
export type ReservedEventNames = ReservedWebEventNames | ReservedAppEventNames;
|
|
9
|
+
export type ReservedEventValues = 'cid' | 'currency' | 'customer_id' | 'customerid' | 'dclid' | 'gclid' | 'session_id' | 'sessionid' | 'sfmc_id' | 'sid' | 'srsltid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}` | `gtag.${string}`;
|
|
10
|
+
export type ReservedUserPropertiesNames = 'cid' | 'customer_id' | 'customerid' | 'first_open_after_install' | 'first_open_time' | 'first_visit_time' | 'google_allow_ad_personalization_signals' | 'last_advertising_id_reset' | 'last_deep_link_referrer' | 'last_gclid' | 'lifetime_user_engagement' | 'non_personalized_ads' | 'session_id' | 'session_number' | 'sessionid' | 'sfmc_id' | 'sid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}`;
|
|
11
|
+
export type UserPropertiesValue = string | boolean | number | null | undefined;
|
|
12
|
+
export type UserProperties = {
|
|
13
13
|
[key: string]: UserPropertiesValue;
|
|
14
14
|
} & { [key in ReservedUserPropertiesNames]?: never; };
|
|
15
15
|
/**
|
|
@@ -49,7 +49,7 @@ type UserProvidedDataAddress = {
|
|
|
49
49
|
* - Format phone numbers according to the E164 standard.
|
|
50
50
|
* - Remove all periods (.) that precede the domain name in gmail.com and googlemail.com email addresses.
|
|
51
51
|
*/
|
|
52
|
-
type UserProvidedData = {
|
|
52
|
+
export type UserProvidedData = {
|
|
53
53
|
email?: string | string[];
|
|
54
54
|
/**
|
|
55
55
|
* User phone number. Must be in E.164 format, which means it must be 11 to 15 digits including a
|
|
@@ -60,11 +60,11 @@ type UserProvidedData = {
|
|
|
60
60
|
phone_number?: string | string[];
|
|
61
61
|
address?: UserProvidedDataAddress | UserProvidedDataAddress[];
|
|
62
62
|
};
|
|
63
|
-
type GaId = `G-${Uppercase<string>}`;
|
|
64
|
-
type GtmId = `GTM-${Uppercase<string>}`;
|
|
65
|
-
type CampaignMedium = 'email' | 'organic' | 'cpc' | 'banner' | 'social' | 'referral' | 'affiliate' | 'video' | 'display' | 'sms' | 'push' | 'qr' | 'audio' | (string & {});
|
|
66
|
-
type CampaignSource = 'google' | 'googleads' | 'bing' | 'bingads' | 'metaads' | 'facebook' | 'twitter' | 'linkedin' | 'instagram' | 'tiktok' | 'youtube' | 'newsletter' | `website_${string}` | `affiliate_${string}` | (string & {});
|
|
67
|
-
type Campaign = {
|
|
63
|
+
export type GaId = `G-${Uppercase<string>}`;
|
|
64
|
+
export type GtmId = `GTM-${Uppercase<string>}`;
|
|
65
|
+
export type CampaignMedium = 'email' | 'organic' | 'cpc' | 'banner' | 'social' | 'referral' | 'affiliate' | 'video' | 'display' | 'sms' | 'push' | 'qr' | 'audio' | (string & {});
|
|
66
|
+
export type CampaignSource = 'google' | 'googleads' | 'bing' | 'bingads' | 'metaads' | 'facebook' | 'twitter' | 'linkedin' | 'instagram' | 'tiktok' | 'youtube' | 'newsletter' | `website_${string}` | `affiliate_${string}` | (string & {});
|
|
67
|
+
export type Campaign = {
|
|
68
68
|
id?: string;
|
|
69
69
|
name?: string;
|
|
70
70
|
term?: string;
|
|
@@ -72,7 +72,7 @@ type Campaign = {
|
|
|
72
72
|
medium?: CampaignMedium;
|
|
73
73
|
source?: CampaignSource;
|
|
74
74
|
};
|
|
75
|
-
type Config = {
|
|
75
|
+
export type Config = {
|
|
76
76
|
allow_google_signals?: boolean;
|
|
77
77
|
allow_ad_personalization_signals?: boolean;
|
|
78
78
|
campaign_content?: string;
|
|
@@ -104,7 +104,7 @@ type Config = {
|
|
|
104
104
|
user_id?: string;
|
|
105
105
|
user_properties?: UserProperties;
|
|
106
106
|
};
|
|
107
|
-
type Item = {
|
|
107
|
+
export type Item = {
|
|
108
108
|
item_id: string;
|
|
109
109
|
item_name: string;
|
|
110
110
|
affiliation?: 'Google Store' | (string & {});
|
|
@@ -124,18 +124,18 @@ type Item = {
|
|
|
124
124
|
price?: number;
|
|
125
125
|
quantity?: number;
|
|
126
126
|
};
|
|
127
|
-
type PromotionItem = {
|
|
127
|
+
export type PromotionItem = {
|
|
128
128
|
creative_name?: string;
|
|
129
129
|
creative_slot?: string;
|
|
130
130
|
promotion_id?: string;
|
|
131
131
|
promotion_name?: string;
|
|
132
132
|
};
|
|
133
|
-
type SurveyProperties = {
|
|
133
|
+
export type SurveyProperties = {
|
|
134
134
|
id?: string;
|
|
135
135
|
feature?: Lowercase<string>;
|
|
136
136
|
trigger?: Lowercase<string>;
|
|
137
137
|
};
|
|
138
|
-
type SurveyQA = {
|
|
138
|
+
export type SurveyQA = {
|
|
139
139
|
q1: string;
|
|
140
140
|
a1: string;
|
|
141
141
|
q2?: string;
|
|
@@ -150,11 +150,11 @@ type SurveyQA = {
|
|
|
150
150
|
a6?: string;
|
|
151
151
|
completed?: boolean;
|
|
152
152
|
};
|
|
153
|
-
type NPSScore = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | (number & {});
|
|
154
|
-
type CASTScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
155
|
-
type CESScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
153
|
+
export type NPSScore = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | (number & {});
|
|
154
|
+
export type CASTScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
155
|
+
export type CESScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
156
156
|
/** ref: https://support.google.com/analytics/answer/9216061 */
|
|
157
|
-
type EnhancedMeasurementEvents = {
|
|
157
|
+
export type EnhancedMeasurementEvents = {
|
|
158
158
|
page_view: {
|
|
159
159
|
page_path: string;
|
|
160
160
|
page_title: string;
|
|
@@ -225,7 +225,7 @@ type EnhancedMeasurementEvents = {
|
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
227
|
/** ref: https://support.google.com/analytics/answer/9234069 */
|
|
228
|
-
type AutomaticallyCollectedEvents = EnhancedMeasurementEvents & {
|
|
228
|
+
export type AutomaticallyCollectedEvents = EnhancedMeasurementEvents & {
|
|
229
229
|
first_visit: {
|
|
230
230
|
page_path: string;
|
|
231
231
|
page_title: string;
|
|
@@ -294,7 +294,7 @@ type AutomaticallyCollectedEvents = EnhancedMeasurementEvents & {
|
|
|
294
294
|
* ref: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
|
|
295
295
|
* ref: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event
|
|
296
296
|
* */
|
|
297
|
-
type RecommendedEvents = {
|
|
297
|
+
export type RecommendedEvents = {
|
|
298
298
|
add_payment_info: {
|
|
299
299
|
currency: string;
|
|
300
300
|
value: number;
|
|
@@ -498,7 +498,7 @@ type RecommendedEvents = {
|
|
|
498
498
|
* Extra commonly used events that are NOT part of the GA standard event set.
|
|
499
499
|
* Added to satisfy additional analytics needs.
|
|
500
500
|
*/
|
|
501
|
-
type AddedRecommendedEvents = {
|
|
501
|
+
export type AddedRecommendedEvents = {
|
|
502
502
|
logout: undefined;
|
|
503
503
|
trial_begin: {
|
|
504
504
|
currency: string;
|
|
@@ -546,12 +546,12 @@ type AddedRecommendedEvents = {
|
|
|
546
546
|
};
|
|
547
547
|
ces_dismissed: SurveyProperties;
|
|
548
548
|
};
|
|
549
|
-
type StandardEvents = AutomaticallyCollectedEvents & RecommendedEvents & AddedRecommendedEvents;
|
|
549
|
+
export type StandardEvents = AutomaticallyCollectedEvents & RecommendedEvents & AddedRecommendedEvents;
|
|
550
550
|
/**
|
|
551
551
|
* reference: https://developers.google.com/analytics/devguides/collection/ga4/reference/config
|
|
552
552
|
* reference: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
|
|
553
553
|
*/
|
|
554
|
-
interface Gtag {
|
|
554
|
+
export interface Gtag {
|
|
555
555
|
/**
|
|
556
556
|
* To disable advertising features based on third-party advertising identifiers, set
|
|
557
557
|
* allow_google_signals to false.
|
|
@@ -758,5 +758,4 @@ interface Gtag {
|
|
|
758
758
|
gtag<T extends string>(event: 'event', eventName: T extends keyof StandardEvents ? T : string, eventParams?: T extends keyof StandardEvents ? StandardEvents[T] : Record<string, string | number | boolean | null | undefined>): void;
|
|
759
759
|
}
|
|
760
760
|
//#endregion
|
|
761
|
-
export { AddedRecommendedEvents, AutomaticallyCollectedEvents, CASTScore, CESScore, Campaign, CampaignMedium, CampaignSource, Config, EnhancedMeasurementEvents, GaId, Gtag, GtmId, Item, NPSScore, PromotionItem, RecommendedEvents, ReservedEventNames, ReservedEventValues, ReservedUserPropertiesNames, StandardEvents, SurveyProperties, SurveyQA, UserProperties, UserPropertiesValue, UserProvidedData, reservedEventNames };
|
|
762
761
|
//# sourceMappingURL=gtag.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtag.d.cts","names":[],"sources":["../../src/track/gtag.ts"],"mappings":";;cACM;cAuBA;
|
|
1
|
+
{"version":3,"file":"gtag.d.cts","names":[],"sources":["../../src/track/gtag.ts"],"mappings":";;cACM;cAuBA;qBAqCO;KAER,gCAAgC;KAChC,gCAAgC;YACzB,qBAAqB,wBAAwB;YAE7C;YAqBA;YA0BA;YACA;GACT,cAAc;OAEd,OAAO;;;;;;;;;;;;;;;;KAkBL;EACH;EACA;EACA;EACA;;EAEA;EACA;;;;;EAKA;;;;;;;;;;YAWU;EACV;;;;;;;EAOA;EACA,UAAU,0BAA0B;;YAG1B,YAAY;YACZ,eAAe;YAEf;YAgBA;YAiBA;EACV;EACA;EACA;EACA;EACA,SAAS;EACT,SAAS;;YAGC;EACV;EACA;EAEA;EACA;EACA,kBAAkB;EAClB;EACA,kBAAkB;EAClB;;;;;EAMA,WAAW;EAEX;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EACA,kBAAkB;;YAGR;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU;EACV;EACA;EACA;EACA;;YAGU;EACV;EACA,UAAU;EACV,UAAU;;YAGA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU;YACA;YACA;;YAGA;EACV;IACE;IACA;IACA;IACA;IACA;IACA;;EAIF;IACE;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;;YAKQ,+BAA+B;EACzC;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAIF;EACA;IACE;IACA;;;;;;;YAQQ;EAEV;IACE;IACA;IACA;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA,OAAO;IACP;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;;EAEF;IACE;IACA;;EAEF;IACE;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IAaA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;;EAEV;IACE;IACA;IACA,OAAO;;EAET;IACE;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA;IACA,SAAS,OAAO;;EAElB;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;EACA;IACE;;EAEF;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA;IACA,QAAQ,OAAO;;EAEjB;IACE;IACA;IACA;;EAIF;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;;;;;YAQQ;EACV;EACA;IACE;IACA;IACA;IACA,QAAQ;;EAEV;IACE;IACA;IACA;IACA,QAAQ;;EAGV,cAAc;EACd,aAAa,mBAAmB;EAChC,kBAAkB;;;;;EAKlB,WAAW;EACX,UAAU;IAAqB,OAAO;IAAU;;EAChD,eAAe;;;;;EAKf,YAAY;EACZ,WAAW;IAAqB,OAAO;IAAW;;EAClD,gBAAgB;;;;;EAKhB,WAAW;EACX,UAAU;IAAqB,OAAO;IAAU;;EAChD,eAAe;;YAGL,iBAAiB,+BAC3B,oBACA;;;;;iBAMe;;;;;;;;;;EAUf,KAAK,cAAc,gCAAgC;;;;;;;;;EAUnD,KAAK,cAAc,4CAA4C;;;;;EAM/D,KAAK,cAAc,4BAA4B;;;;;EAM/C,KAAK,cAAc,uBAAuB;;EAG1C,KAAK,cAAc,2BAA2B,QAAQ;;;;;EAMtD,KAAK,cAAc,yBAAyB;;EAG5C,KAAK,cAAc,2BAA2B,QAAQ;;EAGtD,KAAK,cAAc,yBAAyB;;;;;EAM5C,KAAK,cAAc,oBAAoB,QAAQ;;;;;EAM/C,KAAK,cAAc,qBAAqB;;EAGxC,KAAK,cAAc,yBAAyB;;;;;;;;;;;;;;EAe5C,KAAK,cAAc,yBAAyB;;;;;;;;;;;;;;;;;;EAmB5C,KAAK,cAAc,0BAA0B;;;;;EAM7C,KAAK,cAAc,wBAAwB;;EAG3C,KAAK,cAAc,uBAAuB;;EAG1C,KAAK,cAAc,yBAAyB;;;;;;;;;;;;;;;;EAiB5C,KAAK,cAAc,yBAAyB;;;;;;;;;;EAW5C,KAAK,cAAc,2BAA2B;;;;;;;;;EAU9C,KAAK,cAAc,oBAAoB;;;;;;;;;EAUvC,KAAK,cAAc,yBAAyB;;;;;;;;;;;EAY5C,KAAK,cAAc,yBAAyB;;;;;;;;;EAU5C,KAAK,cAAc,sBAAsB;;;;;;;;;EAUzC,KAAK,cAAc,0BAA0B;;;;;;;;;;;EAY7C,KAAK,cAAc,6BAA6B;;;;;;;;;;EAWhD,KAAK,cAAc,mBAAmB;;;;;;;;;;EAWtC,KAAK,cAAc,2BAA2B,YAAY;EAE1D,KAAK,cAAc,qBAAqB,MAAM;;;;;EAM9C,KAAK,iBAAiB,MAAM,MAAM,SAAS;EAE3C,KAAK,kBACH,gBACA,WAAW,gBAAgB,iBAAiB,YAC5C,cAAc,gBAAgB,iBAC1B,eAAe,KACf"}
|
package/dist/track/gtag.d.mts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/** reference: https://support.google.com/analytics/answer/13316687 */
|
|
3
3
|
declare const reservedWebEventNames: readonly ['app_remove', 'app_store_refund', 'app_store_subscription_cancel', 'app_store_subscription_renew', 'click', 'error', 'file_download', 'first_open', 'first_visit', 'form_start', 'form_submit', 'in_app_purchase', 'page_view', 'scroll', 'session_start', 'user_engagement', 'view_complete', 'video_progress', 'video_start', 'view_search_results'];
|
|
4
4
|
declare const reservedAppEventNames: readonly ['ad_activeview', 'ad_click', 'ad_exposure', 'ad_impression', 'ad_query', 'ad_reward', 'adunit_exposure', 'app_clear_data', 'app_exception', 'app_install', 'app_remove', 'app_store_refund', 'app_update', 'app_upgrade', 'dynamic_link_app_open', 'dynamic_link_app_update', 'dynamic_link_first_open', 'error', 'firebase_campaign', 'firebase_in_app_message_action', 'firebase_in_app_message_dismiss', 'firebase_in_app_message_impression', 'first_open', 'first_visit', 'in_app_purchase', 'notification_dismiss', 'notification_foreground', 'notification_open', 'notification_receive', 'notification_send', 'os_update', 'screen_view', 'session_start', 'user_engagement'];
|
|
5
|
-
declare const reservedEventNames: readonly ["app_remove", "app_store_refund", "app_store_subscription_cancel", "app_store_subscription_renew", "click", "error", "file_download", "first_open", "first_visit", "form_start", "form_submit", "in_app_purchase", "page_view", "scroll", "session_start", "user_engagement", "view_complete", "video_progress", "video_start", "view_search_results", "ad_activeview", "ad_click", "ad_exposure", "ad_impression", "ad_query", "ad_reward", "adunit_exposure", "app_clear_data", "app_exception", "app_install", "app_remove", "app_store_refund", "app_update", "app_upgrade", "dynamic_link_app_open", "dynamic_link_app_update", "dynamic_link_first_open", "error", "firebase_campaign", "firebase_in_app_message_action", "firebase_in_app_message_dismiss", "firebase_in_app_message_impression", "first_open", "first_visit", "in_app_purchase", "notification_dismiss", "notification_foreground", "notification_open", "notification_receive", "notification_send", "os_update", "screen_view", "session_start", "user_engagement"];
|
|
5
|
+
export declare const reservedEventNames: readonly ["app_remove", "app_store_refund", "app_store_subscription_cancel", "app_store_subscription_renew", "click", "error", "file_download", "first_open", "first_visit", "form_start", "form_submit", "in_app_purchase", "page_view", "scroll", "session_start", "user_engagement", "view_complete", "video_progress", "video_start", "view_search_results", "ad_activeview", "ad_click", "ad_exposure", "ad_impression", "ad_query", "ad_reward", "adunit_exposure", "app_clear_data", "app_exception", "app_install", "app_remove", "app_store_refund", "app_update", "app_upgrade", "dynamic_link_app_open", "dynamic_link_app_update", "dynamic_link_first_open", "error", "firebase_campaign", "firebase_in_app_message_action", "firebase_in_app_message_dismiss", "firebase_in_app_message_impression", "first_open", "first_visit", "in_app_purchase", "notification_dismiss", "notification_foreground", "notification_open", "notification_receive", "notification_send", "os_update", "screen_view", "session_start", "user_engagement"];
|
|
6
6
|
type ReservedWebEventNames = (typeof reservedWebEventNames)[number];
|
|
7
7
|
type ReservedAppEventNames = (typeof reservedAppEventNames)[number];
|
|
8
|
-
type ReservedEventNames = ReservedWebEventNames | ReservedAppEventNames;
|
|
9
|
-
type ReservedEventValues = 'cid' | 'currency' | 'customer_id' | 'customerid' | 'dclid' | 'gclid' | 'session_id' | 'sessionid' | 'sfmc_id' | 'sid' | 'srsltid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}` | `gtag.${string}`;
|
|
10
|
-
type ReservedUserPropertiesNames = 'cid' | 'customer_id' | 'customerid' | 'first_open_after_install' | 'first_open_time' | 'first_visit_time' | 'google_allow_ad_personalization_signals' | 'last_advertising_id_reset' | 'last_deep_link_referrer' | 'last_gclid' | 'lifetime_user_engagement' | 'non_personalized_ads' | 'session_id' | 'session_number' | 'sessionid' | 'sfmc_id' | 'sid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}`;
|
|
11
|
-
type UserPropertiesValue = string | boolean | number | null | undefined;
|
|
12
|
-
type UserProperties = {
|
|
8
|
+
export type ReservedEventNames = ReservedWebEventNames | ReservedAppEventNames;
|
|
9
|
+
export type ReservedEventValues = 'cid' | 'currency' | 'customer_id' | 'customerid' | 'dclid' | 'gclid' | 'session_id' | 'sessionid' | 'sfmc_id' | 'sid' | 'srsltid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}` | `gtag.${string}`;
|
|
10
|
+
export type ReservedUserPropertiesNames = 'cid' | 'customer_id' | 'customerid' | 'first_open_after_install' | 'first_open_time' | 'first_visit_time' | 'google_allow_ad_personalization_signals' | 'last_advertising_id_reset' | 'last_deep_link_referrer' | 'last_gclid' | 'lifetime_user_engagement' | 'non_personalized_ads' | 'session_id' | 'session_number' | 'sessionid' | 'sfmc_id' | 'sid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}`;
|
|
11
|
+
export type UserPropertiesValue = string | boolean | number | null | undefined;
|
|
12
|
+
export type UserProperties = {
|
|
13
13
|
[key: string]: UserPropertiesValue;
|
|
14
14
|
} & { [key in ReservedUserPropertiesNames]?: never; };
|
|
15
15
|
/**
|
|
@@ -49,7 +49,7 @@ type UserProvidedDataAddress = {
|
|
|
49
49
|
* - Format phone numbers according to the E164 standard.
|
|
50
50
|
* - Remove all periods (.) that precede the domain name in gmail.com and googlemail.com email addresses.
|
|
51
51
|
*/
|
|
52
|
-
type UserProvidedData = {
|
|
52
|
+
export type UserProvidedData = {
|
|
53
53
|
email?: string | string[];
|
|
54
54
|
/**
|
|
55
55
|
* User phone number. Must be in E.164 format, which means it must be 11 to 15 digits including a
|
|
@@ -60,11 +60,11 @@ type UserProvidedData = {
|
|
|
60
60
|
phone_number?: string | string[];
|
|
61
61
|
address?: UserProvidedDataAddress | UserProvidedDataAddress[];
|
|
62
62
|
};
|
|
63
|
-
type GaId = `G-${Uppercase<string>}`;
|
|
64
|
-
type GtmId = `GTM-${Uppercase<string>}`;
|
|
65
|
-
type CampaignMedium = 'email' | 'organic' | 'cpc' | 'banner' | 'social' | 'referral' | 'affiliate' | 'video' | 'display' | 'sms' | 'push' | 'qr' | 'audio' | (string & {});
|
|
66
|
-
type CampaignSource = 'google' | 'googleads' | 'bing' | 'bingads' | 'metaads' | 'facebook' | 'twitter' | 'linkedin' | 'instagram' | 'tiktok' | 'youtube' | 'newsletter' | `website_${string}` | `affiliate_${string}` | (string & {});
|
|
67
|
-
type Campaign = {
|
|
63
|
+
export type GaId = `G-${Uppercase<string>}`;
|
|
64
|
+
export type GtmId = `GTM-${Uppercase<string>}`;
|
|
65
|
+
export type CampaignMedium = 'email' | 'organic' | 'cpc' | 'banner' | 'social' | 'referral' | 'affiliate' | 'video' | 'display' | 'sms' | 'push' | 'qr' | 'audio' | (string & {});
|
|
66
|
+
export type CampaignSource = 'google' | 'googleads' | 'bing' | 'bingads' | 'metaads' | 'facebook' | 'twitter' | 'linkedin' | 'instagram' | 'tiktok' | 'youtube' | 'newsletter' | `website_${string}` | `affiliate_${string}` | (string & {});
|
|
67
|
+
export type Campaign = {
|
|
68
68
|
id?: string;
|
|
69
69
|
name?: string;
|
|
70
70
|
term?: string;
|
|
@@ -72,7 +72,7 @@ type Campaign = {
|
|
|
72
72
|
medium?: CampaignMedium;
|
|
73
73
|
source?: CampaignSource;
|
|
74
74
|
};
|
|
75
|
-
type Config = {
|
|
75
|
+
export type Config = {
|
|
76
76
|
allow_google_signals?: boolean;
|
|
77
77
|
allow_ad_personalization_signals?: boolean;
|
|
78
78
|
campaign_content?: string;
|
|
@@ -104,7 +104,7 @@ type Config = {
|
|
|
104
104
|
user_id?: string;
|
|
105
105
|
user_properties?: UserProperties;
|
|
106
106
|
};
|
|
107
|
-
type Item = {
|
|
107
|
+
export type Item = {
|
|
108
108
|
item_id: string;
|
|
109
109
|
item_name: string;
|
|
110
110
|
affiliation?: 'Google Store' | (string & {});
|
|
@@ -124,18 +124,18 @@ type Item = {
|
|
|
124
124
|
price?: number;
|
|
125
125
|
quantity?: number;
|
|
126
126
|
};
|
|
127
|
-
type PromotionItem = {
|
|
127
|
+
export type PromotionItem = {
|
|
128
128
|
creative_name?: string;
|
|
129
129
|
creative_slot?: string;
|
|
130
130
|
promotion_id?: string;
|
|
131
131
|
promotion_name?: string;
|
|
132
132
|
};
|
|
133
|
-
type SurveyProperties = {
|
|
133
|
+
export type SurveyProperties = {
|
|
134
134
|
id?: string;
|
|
135
135
|
feature?: Lowercase<string>;
|
|
136
136
|
trigger?: Lowercase<string>;
|
|
137
137
|
};
|
|
138
|
-
type SurveyQA = {
|
|
138
|
+
export type SurveyQA = {
|
|
139
139
|
q1: string;
|
|
140
140
|
a1: string;
|
|
141
141
|
q2?: string;
|
|
@@ -150,11 +150,11 @@ type SurveyQA = {
|
|
|
150
150
|
a6?: string;
|
|
151
151
|
completed?: boolean;
|
|
152
152
|
};
|
|
153
|
-
type NPSScore = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | (number & {});
|
|
154
|
-
type CASTScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
155
|
-
type CESScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
153
|
+
export type NPSScore = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | (number & {});
|
|
154
|
+
export type CASTScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
155
|
+
export type CESScore = 1 | 2 | 3 | 4 | 5 | (number & {});
|
|
156
156
|
/** ref: https://support.google.com/analytics/answer/9216061 */
|
|
157
|
-
type EnhancedMeasurementEvents = {
|
|
157
|
+
export type EnhancedMeasurementEvents = {
|
|
158
158
|
page_view: {
|
|
159
159
|
page_path: string;
|
|
160
160
|
page_title: string;
|
|
@@ -225,7 +225,7 @@ type EnhancedMeasurementEvents = {
|
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
227
|
/** ref: https://support.google.com/analytics/answer/9234069 */
|
|
228
|
-
type AutomaticallyCollectedEvents = EnhancedMeasurementEvents & {
|
|
228
|
+
export type AutomaticallyCollectedEvents = EnhancedMeasurementEvents & {
|
|
229
229
|
first_visit: {
|
|
230
230
|
page_path: string;
|
|
231
231
|
page_title: string;
|
|
@@ -294,7 +294,7 @@ type AutomaticallyCollectedEvents = EnhancedMeasurementEvents & {
|
|
|
294
294
|
* ref: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
|
|
295
295
|
* ref: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event
|
|
296
296
|
* */
|
|
297
|
-
type RecommendedEvents = {
|
|
297
|
+
export type RecommendedEvents = {
|
|
298
298
|
add_payment_info: {
|
|
299
299
|
currency: string;
|
|
300
300
|
value: number;
|
|
@@ -498,7 +498,7 @@ type RecommendedEvents = {
|
|
|
498
498
|
* Extra commonly used events that are NOT part of the GA standard event set.
|
|
499
499
|
* Added to satisfy additional analytics needs.
|
|
500
500
|
*/
|
|
501
|
-
type AddedRecommendedEvents = {
|
|
501
|
+
export type AddedRecommendedEvents = {
|
|
502
502
|
logout: undefined;
|
|
503
503
|
trial_begin: {
|
|
504
504
|
currency: string;
|
|
@@ -546,12 +546,12 @@ type AddedRecommendedEvents = {
|
|
|
546
546
|
};
|
|
547
547
|
ces_dismissed: SurveyProperties;
|
|
548
548
|
};
|
|
549
|
-
type StandardEvents = AutomaticallyCollectedEvents & RecommendedEvents & AddedRecommendedEvents;
|
|
549
|
+
export type StandardEvents = AutomaticallyCollectedEvents & RecommendedEvents & AddedRecommendedEvents;
|
|
550
550
|
/**
|
|
551
551
|
* reference: https://developers.google.com/analytics/devguides/collection/ga4/reference/config
|
|
552
552
|
* reference: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
|
|
553
553
|
*/
|
|
554
|
-
interface Gtag {
|
|
554
|
+
export interface Gtag {
|
|
555
555
|
/**
|
|
556
556
|
* To disable advertising features based on third-party advertising identifiers, set
|
|
557
557
|
* allow_google_signals to false.
|
|
@@ -758,5 +758,4 @@ interface Gtag {
|
|
|
758
758
|
gtag<T extends string>(event: 'event', eventName: T extends keyof StandardEvents ? T : string, eventParams?: T extends keyof StandardEvents ? StandardEvents[T] : Record<string, string | number | boolean | null | undefined>): void;
|
|
759
759
|
}
|
|
760
760
|
//#endregion
|
|
761
|
-
export { AddedRecommendedEvents, AutomaticallyCollectedEvents, CASTScore, CESScore, Campaign, CampaignMedium, CampaignSource, Config, EnhancedMeasurementEvents, GaId, Gtag, GtmId, Item, NPSScore, PromotionItem, RecommendedEvents, ReservedEventNames, ReservedEventValues, ReservedUserPropertiesNames, StandardEvents, SurveyProperties, SurveyQA, UserProperties, UserPropertiesValue, UserProvidedData, reservedEventNames };
|
|
762
761
|
//# sourceMappingURL=gtag.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtag.d.mts","names":[],"sources":["../../src/track/gtag.ts"],"mappings":";;cACM;cAuBA;
|
|
1
|
+
{"version":3,"file":"gtag.d.mts","names":[],"sources":["../../src/track/gtag.ts"],"mappings":";;cACM;cAuBA;qBAqCO;KAER,gCAAgC;KAChC,gCAAgC;YACzB,qBAAqB,wBAAwB;YAE7C;YAqBA;YA0BA;YACA;GACT,cAAc;OAEd,OAAO;;;;;;;;;;;;;;;;KAkBL;EACH;EACA;EACA;EACA;;EAEA;EACA;;;;;EAKA;;;;;;;;;;YAWU;EACV;;;;;;;EAOA;EACA,UAAU,0BAA0B;;YAG1B,YAAY;YACZ,eAAe;YAEf;YAgBA;YAiBA;EACV;EACA;EACA;EACA;EACA,SAAS;EACT,SAAS;;YAGC;EACV;EACA;EAEA;EACA;EACA,kBAAkB;EAClB;EACA,kBAAkB;EAClB;;;;;EAMA,WAAW;EAEX;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EACA,kBAAkB;;YAGR;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU;EACV;EACA;EACA;EACA;;YAGU;EACV;EACA,UAAU;EACV,UAAU;;YAGA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU;YACA;YACA;;YAGA;EACV;IACE;IACA;IACA;IACA;IACA;IACA;;EAIF;IACE;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;;YAKQ,+BAA+B;EACzC;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAIF;EACA;IACE;IACA;;;;;;;YAQQ;EAEV;IACE;IACA;IACA;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA,OAAO;IACP;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;;EAEF;IACE;IACA;;EAEF;IACE;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IAaA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;;EAEV;IACE;IACA;IACA,OAAO;;EAET;IACE;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA;IACA,SAAS,OAAO;;EAElB;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;EACA;IACE;;EAEF;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA,OAAO;;EAET;IACE;IACA;IACA;IACA;IACA,QAAQ,OAAO;;EAEjB;IACE;IACA;IACA;;EAIF;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;;;;;YAQQ;EACV;EACA;IACE;IACA;IACA;IACA,QAAQ;;EAEV;IACE;IACA;IACA;IACA,QAAQ;;EAGV,cAAc;EACd,aAAa,mBAAmB;EAChC,kBAAkB;;;;;EAKlB,WAAW;EACX,UAAU;IAAqB,OAAO;IAAU;;EAChD,eAAe;;;;;EAKf,YAAY;EACZ,WAAW;IAAqB,OAAO;IAAW;;EAClD,gBAAgB;;;;;EAKhB,WAAW;EACX,UAAU;IAAqB,OAAO;IAAU;;EAChD,eAAe;;YAGL,iBAAiB,+BAC3B,oBACA;;;;;iBAMe;;;;;;;;;;EAUf,KAAK,cAAc,gCAAgC;;;;;;;;;EAUnD,KAAK,cAAc,4CAA4C;;;;;EAM/D,KAAK,cAAc,4BAA4B;;;;;EAM/C,KAAK,cAAc,uBAAuB;;EAG1C,KAAK,cAAc,2BAA2B,QAAQ;;;;;EAMtD,KAAK,cAAc,yBAAyB;;EAG5C,KAAK,cAAc,2BAA2B,QAAQ;;EAGtD,KAAK,cAAc,yBAAyB;;;;;EAM5C,KAAK,cAAc,oBAAoB,QAAQ;;;;;EAM/C,KAAK,cAAc,qBAAqB;;EAGxC,KAAK,cAAc,yBAAyB;;;;;;;;;;;;;;EAe5C,KAAK,cAAc,yBAAyB;;;;;;;;;;;;;;;;;;EAmB5C,KAAK,cAAc,0BAA0B;;;;;EAM7C,KAAK,cAAc,wBAAwB;;EAG3C,KAAK,cAAc,uBAAuB;;EAG1C,KAAK,cAAc,yBAAyB;;;;;;;;;;;;;;;;EAiB5C,KAAK,cAAc,yBAAyB;;;;;;;;;;EAW5C,KAAK,cAAc,2BAA2B;;;;;;;;;EAU9C,KAAK,cAAc,oBAAoB;;;;;;;;;EAUvC,KAAK,cAAc,yBAAyB;;;;;;;;;;;EAY5C,KAAK,cAAc,yBAAyB;;;;;;;;;EAU5C,KAAK,cAAc,sBAAsB;;;;;;;;;EAUzC,KAAK,cAAc,0BAA0B;;;;;;;;;;;EAY7C,KAAK,cAAc,6BAA6B;;;;;;;;;;EAWhD,KAAK,cAAc,mBAAmB;;;;;;;;;;EAWtC,KAAK,cAAc,2BAA2B,YAAY;EAE1D,KAAK,cAAc,qBAAqB,MAAM;;;;;EAM9C,KAAK,iBAAiB,MAAM,MAAM,SAAS;EAE3C,KAAK,kBACH,gBACA,WAAW,gBAAgB,iBAAiB,YAC5C,cAAc,gBAAgB,iBAC1B,eAAe,KACf"}
|
package/dist/track/index.d.cts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { EventName, TrackEventResponse, TrackName, TrackProperties } from "./types.cjs";
|
|
2
2
|
//#region src/track/index.d.ts
|
|
3
|
-
interface TrackOptions {
|
|
3
|
+
export interface TrackOptions {
|
|
4
4
|
enableThirdPartyTracking?: boolean;
|
|
5
5
|
onSucceed?: (response?: TrackEventResponse[number]) => void;
|
|
6
6
|
onError?: (error: unknown) => void;
|
|
7
7
|
}
|
|
8
|
-
declare function track<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): void;
|
|
9
|
-
declare function trackAsync<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): Promise<void>;
|
|
10
|
-
declare function sendBeacon<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>): void;
|
|
8
|
+
export declare function track<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): void;
|
|
9
|
+
export declare function trackAsync<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): Promise<void>;
|
|
10
|
+
export declare function sendBeacon<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>): void;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { TrackOptions, sendBeacon, track, trackAsync };
|
|
13
12
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/track/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/track/index.ts"],"mappings":";;iBASiB;EACf;EACA,aAAa,WAAW;EACxB,WAAW;;wBAyLG,MAAM,UAAU,YAAY,WAC1C,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B,UAAS;wBAiBW,WAAW,UAAU,YAAY,WACrD,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B,UAAS,eAA6B;wBAOxB,WAAW,UAAU,YAAY,WAC/C,MAAM,UAAU,IAChB,aAAa,gBAAgB"}
|
package/dist/track/index.d.mts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { EventName, TrackEventResponse, TrackName, TrackProperties } from "./types.mjs";
|
|
2
2
|
//#region src/track/index.d.ts
|
|
3
|
-
interface TrackOptions {
|
|
3
|
+
export interface TrackOptions {
|
|
4
4
|
enableThirdPartyTracking?: boolean;
|
|
5
5
|
onSucceed?: (response?: TrackEventResponse[number]) => void;
|
|
6
6
|
onError?: (error: unknown) => void;
|
|
7
7
|
}
|
|
8
|
-
declare function track<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): void;
|
|
9
|
-
declare function trackAsync<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): Promise<void>;
|
|
10
|
-
declare function sendBeacon<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>): void;
|
|
8
|
+
export declare function track<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): void;
|
|
9
|
+
export declare function trackAsync<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>, options?: TrackOptions): Promise<void>;
|
|
10
|
+
export declare function sendBeacon<T extends EventName = EventName>(name: TrackName<T>, properties?: TrackProperties<T>): void;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { TrackOptions, sendBeacon, track, trackAsync };
|
|
13
12
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/track/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/track/index.ts"],"mappings":";;iBASiB;EACf;EACA,aAAa,WAAW;EACxB,WAAW;;wBAyLG,MAAM,UAAU,YAAY,WAC1C,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B,UAAS;wBAiBW,WAAW,UAAU,YAAY,WACrD,MAAM,UAAU,IAChB,aAAa,gBAAgB,IAC7B,UAAS,eAA6B;wBAOxB,WAAW,UAAU,YAAY,WAC/C,MAAM,UAAU,IAChB,aAAa,gBAAgB"}
|
package/dist/track/lintrk.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/track/lintrk.d.ts
|
|
2
|
-
interface Lintrk {
|
|
2
|
+
export interface Lintrk {
|
|
3
3
|
lintrk(event: 'track', params: {
|
|
4
4
|
conversion_id: number;
|
|
5
5
|
event_id?: string;
|
|
@@ -10,5 +10,4 @@ interface Lintrk {
|
|
|
10
10
|
}): void;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export { Lintrk };
|
|
14
13
|
//# sourceMappingURL=lintrk.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lintrk.d.cts","names":[],"sources":["../../src/track/lintrk.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"lintrk.d.cts","names":[],"sources":["../../src/track/lintrk.ts"],"mappings":";iBAAiB;EACf,OAAO,gBAAgB;IAAU;IAAuB;;;EAGxD,OAAO,sBAAsB;IAAU"}
|
package/dist/track/lintrk.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/track/lintrk.d.ts
|
|
2
|
-
interface Lintrk {
|
|
2
|
+
export interface Lintrk {
|
|
3
3
|
lintrk(event: 'track', params: {
|
|
4
4
|
conversion_id: number;
|
|
5
5
|
event_id?: string;
|
|
@@ -10,5 +10,4 @@ interface Lintrk {
|
|
|
10
10
|
}): void;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export { Lintrk };
|
|
14
13
|
//# sourceMappingURL=lintrk.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lintrk.d.mts","names":[],"sources":["../../src/track/lintrk.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"lintrk.d.mts","names":[],"sources":["../../src/track/lintrk.ts"],"mappings":";iBAAiB;EACf,OAAO,gBAAgB;IAAU;IAAuB;;;EAGxD,OAAO,sBAAsB;IAAU"}
|