@bigz-app/booking-widget 0.3.2 → 0.3.4
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 -1
- package/dist/booking-widget.js +78 -278
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/BookingSuccessModal.d.ts.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts +1 -15
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/components/shared/DialogPortal.d.ts.map +1 -1
- package/dist/index.cjs +78 -278
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +78 -278
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/google-ads-tracking.d.ts +5 -37
- package/dist/utils/google-ads-tracking.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Google Ads Conversion Tracking Utility
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* It includes consent checking, gtag initialization, and conversion tracking.
|
|
4
|
+
* Simplified utility that waits 1500ms, checks/initializes gtag, and sends conversion.
|
|
6
5
|
*/
|
|
7
6
|
export interface GoogleAdsConfig {
|
|
8
7
|
/**
|
|
9
8
|
* Google Ads Tag ID (e.g., 'AW-XXXXXXX')
|
|
10
9
|
*/
|
|
11
|
-
tagId
|
|
10
|
+
tagId: string;
|
|
12
11
|
/**
|
|
13
12
|
* Google Ads Conversion ID/Label (e.g., 'booking_conversion')
|
|
14
13
|
*/
|
|
15
|
-
conversionId
|
|
14
|
+
conversionId: string;
|
|
16
15
|
/**
|
|
17
16
|
* Optional conversion value for the booking
|
|
18
17
|
*/
|
|
@@ -26,40 +25,9 @@ export interface GoogleAdsConfig {
|
|
|
26
25
|
*/
|
|
27
26
|
transactionId?: string;
|
|
28
27
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Interface for Google Consent Mode state
|
|
31
|
-
*/
|
|
32
|
-
export interface ConsentData {
|
|
33
|
-
ad_storage?: "granted" | "denied";
|
|
34
|
-
analytics_storage?: "granted" | "denied";
|
|
35
|
-
functionality_storage?: "granted" | "denied";
|
|
36
|
-
personalization_storage?: "granted" | "denied";
|
|
37
|
-
security_storage?: "granted" | "denied";
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Check if Google Consent Mode has granted the necessary permissions for ads tracking
|
|
41
|
-
* This checks multiple sources of consent state in order of preference
|
|
42
|
-
*/
|
|
43
|
-
export declare function checkGoogleConsent(): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Check if gtag is already initialized on the host page
|
|
46
|
-
*/
|
|
47
|
-
export declare function isGtagInitialized(): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Initialize Google Tag (gtag) if not already present
|
|
50
|
-
*/
|
|
51
|
-
export declare function initializeGtag(tagId: string): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Track a Google Ads conversion
|
|
54
|
-
*/
|
|
55
|
-
export declare function trackConversion(config: GoogleAdsConfig): void;
|
|
56
28
|
/**
|
|
57
29
|
* Main function to handle Google Ads conversion tracking
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
export declare function handleGoogleAdsConversion(config: GoogleAdsConfig): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* Utility function to get conversion value from booking data
|
|
30
|
+
* Waits 1500ms, checks/initializes gtag, then sends conversion
|
|
63
31
|
*/
|
|
64
|
-
export declare function
|
|
32
|
+
export declare function handleGoogleAdsConversion(config: GoogleAdsConfig): void;
|
|
65
33
|
//# sourceMappingURL=google-ads-tracking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-ads-tracking.d.ts","sourceRoot":"","sources":["../../src/utils/google-ads-tracking.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"google-ads-tracking.d.ts","sourceRoot":"","sources":["../../src/utils/google-ads-tracking.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AA4GD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAevE"}
|