gotrip-fx-transaction-form 1.0.281-dev → 1.0.283-dev
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/index.js +9580 -9532
- package/package.json +1 -1
- package/types/embeded-main.d.ts +1 -0
- package/types/types/tracking.dto.d.ts +2 -0
- package/types/util/tracking.d.ts +15 -8
package/package.json
CHANGED
package/types/embeded-main.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export interface TrackingDto {
|
|
|
11
11
|
fbid?: string;
|
|
12
12
|
/** Campaign identifier */
|
|
13
13
|
campaign?: string;
|
|
14
|
+
/** UTM and ad network parameters (utm_source, utm_campaign, gclid, fbclid, ttclid, etc.) */
|
|
15
|
+
utm?: Record<string, string>;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Type helper to extend any DTO with tracking fields
|
package/types/util/tracking.d.ts
CHANGED
|
@@ -14,16 +14,23 @@ export declare const saveAnonymousUid: (uid: string) => void;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const getAnonymousUid: () => string;
|
|
16
16
|
/**
|
|
17
|
-
* Parse
|
|
18
|
-
* Extracts gclid,
|
|
17
|
+
* Parse UTM and ad network parameters from URL query string
|
|
18
|
+
* Extracts all UTM params (utm_source, utm_campaign, etc.) and ad network params (gclid, fbclid, ttclid, etc.)
|
|
19
19
|
*/
|
|
20
|
-
export declare const
|
|
21
|
-
gclid?: string;
|
|
22
|
-
fbid?: string;
|
|
23
|
-
campaign?: string;
|
|
24
|
-
[key: string]: string | undefined;
|
|
25
|
-
};
|
|
20
|
+
export declare const parseUTMParamsFromUrl: () => Record<string, string>;
|
|
26
21
|
/**
|
|
27
22
|
* Validate tracking data
|
|
28
23
|
*/
|
|
29
24
|
export declare const validateTrackingData: (data: any) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Capture UTM and ad network parameters into a 7-day cookie
|
|
27
|
+
* If params are explicitly provided, use them; otherwise read from URL params
|
|
28
|
+
* Always overrides existing params (last-click wins)
|
|
29
|
+
* Expires in 7 days
|
|
30
|
+
*/
|
|
31
|
+
export declare const captureUTMParams: (explicitParams?: Record<string, string> | null) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Get UTM and ad network parameters from cookie
|
|
34
|
+
* Returns empty object if not found or expired
|
|
35
|
+
*/
|
|
36
|
+
export declare const getUTMParams: () => Record<string, string>;
|