@bigz-app/booking-widget 1.3.1 → 1.3.2

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.
@@ -1,33 +1,23 @@
1
1
  /**
2
- * Google Ads Conversion Tracking Utility
2
+ * Google Ads Tracking Utility
3
3
  *
4
- * Simplified utility that waits 1500ms, checks/initializes gtag, and sends conversion.
4
+ * Handles pageview tracking (widget load) and conversion tracking (successful booking).
5
+ * Supports both direct gtag.js and GTM dataLayer setups.
5
6
  */
6
7
  export interface GoogleAdsConfig {
7
- /**
8
- * Google Ads Tag ID (e.g., 'AW-XXXXXXX')
9
- */
10
8
  tagId: string;
11
- /**
12
- * Google Ads Conversion ID/Label (e.g., 'booking_conversion')
13
- */
14
9
  conversionId: string;
15
- /**
16
- * Optional conversion value for the booking
17
- */
18
10
  conversionValue?: number;
19
- /**
20
- * Optional conversion currency (defaults to 'EUR')
21
- */
22
11
  conversionCurrency?: string;
23
- /**
24
- * Optional transaction ID for deduplication
25
- */
26
12
  transactionId?: string;
27
13
  }
28
14
  /**
29
- * Main function to handle Google Ads conversion tracking
30
- * Waits 1500ms, checks/initializes gtag, then sends conversion
15
+ * Track widget pageview (fired once on widget mount).
16
+ */
17
+ export declare function handleGoogleAdsPageview(tagId: string, consent: boolean): void;
18
+ /**
19
+ * Handle Google Ads conversion tracking.
20
+ * Waits 1500ms for the success page to settle, then fires.
31
21
  */
32
22
  export declare function handleGoogleAdsConversion(config: GoogleAdsConfig): void;
33
23
  //# 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;;;;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"}
1
+ {"version":3,"file":"google-ads-tracking.d.ts","sourceRoot":"","sources":["../../src/utils/google-ads-tracking.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAqGD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAyB7E;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAsBvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigz-app/booking-widget",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Booking widget for bigZ Booking System @ bigz.app",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",