@aranova/tracking-next 0.19.2 → 0.20.0

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 CHANGED
@@ -61,7 +61,10 @@ export const { TrackingProvider, useTracking } = createTracking({
61
61
  page_view: {},
62
62
  time_on_site: { thresholdSeconds: 60 },
63
63
  specific_page_visit: {
64
- pages: [{ name: "contact_page", pathPattern: /^\/(contact|book|get-started)/ }],
64
+ pages: [
65
+ { name: "contact_page", pathPattern: /^\/(contact|book|get-started)/ },
66
+ { name: "google_ads_service_page", pathPattern: /^\/services\/google-ads\/?$/ },
67
+ ],
65
68
  },
66
69
  },
67
70
  manual: {
package/dist/index.d.mts CHANGED
@@ -503,12 +503,16 @@ declare const scrollDepthConfigSchema: z.ZodObject<{
503
503
  }>;
504
504
  type ScrollDepthConfig = z.infer<typeof scrollDepthConfigSchema>;
505
505
 
506
- /**
507
- * Canonical page intent names supported by `specific_page_visit`.
508
- */
506
+ declare const PAGE_IDENTITY_MAX_LENGTH = 64;
507
+ declare const PAGE_IDENTITY_PATTERN: RegExp;
508
+ /** Common page identities offered as presets by operator tooling. */
509
509
  declare const SPECIFIC_PAGE_NAMES: readonly ["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"];
510
- type SpecificPageName = (typeof SPECIFIC_PAGE_NAMES)[number];
511
- declare const specificPageNameSchema: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
510
+ declare const pageIdentitySchema: z.ZodString;
511
+ type PageIdentity = z.infer<typeof pageIdentitySchema>;
512
+ /** @deprecated Use PageIdentity. Kept as a compatibility alias for existing consumers. */
513
+ type SpecificPageName = PageIdentity;
514
+ /** @deprecated Use pageIdentitySchema. Kept for source compatibility. */
515
+ declare const specificPageNameSchema: z.ZodString;
512
516
  /**
513
517
  * Metadata for the automatic `specific_page_visit` event.
514
518
  *
@@ -516,7 +520,7 @@ declare const specificPageNameSchema: z.ZodEnum<["contact_page", "about_page", "
516
520
  * named page patterns.
517
521
  */
518
522
  declare const specificPageVisitMetadataSchema: z.ZodObject<{
519
- page_name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
523
+ page_name: z.ZodString;
520
524
  page: z.ZodObject<{
521
525
  path: z.ZodString;
522
526
  }, "strict", z.ZodTypeAny, {
@@ -528,39 +532,40 @@ declare const specificPageVisitMetadataSchema: z.ZodObject<{
528
532
  page: {
529
533
  path: string;
530
534
  };
531
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
535
+ page_name: string;
532
536
  }, {
533
537
  page: {
534
538
  path: string;
535
539
  };
536
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
540
+ page_name: string;
537
541
  }>;
538
542
  type SpecificPageVisitMetadata = z.infer<typeof specificPageVisitMetadataSchema>;
539
543
  /**
540
544
  * Registration config for automatic `specific_page_visit`.
541
545
  *
542
- * Each page entry pairs a semantic `name` with a `RegExp` that matches the
543
- * pathname. Use this instead of hard-coding path regexes downstream.
546
+ * Each page entry pairs a stable, validated identity with a `RegExp` that
547
+ * matches the pathname. The identity can use a preset above or a client-specific
548
+ * lowercase snake-case slug.
544
549
  */
545
550
  declare const specificPageVisitConfigSchema: z.ZodObject<{
546
551
  pages: z.ZodArray<z.ZodObject<{
547
- name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
552
+ name: z.ZodString;
548
553
  pathPattern: z.ZodType<RegExp, z.ZodTypeDef, RegExp>;
549
554
  }, "strict", z.ZodTypeAny, {
550
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
555
+ name: string;
551
556
  pathPattern: RegExp;
552
557
  }, {
553
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
558
+ name: string;
554
559
  pathPattern: RegExp;
555
560
  }>, "many">;
556
561
  }, "strict", z.ZodTypeAny, {
557
562
  pages: {
558
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
563
+ name: string;
559
564
  pathPattern: RegExp;
560
565
  }[];
561
566
  }, {
562
567
  pages: {
563
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
568
+ name: string;
564
569
  pathPattern: RegExp;
565
570
  }[];
566
571
  }>;
@@ -800,7 +805,7 @@ declare const EVENT_REGISTRY: {
800
805
  readonly clientVisibility: "detailed";
801
806
  };
802
807
  readonly metadataSchema: z.ZodObject<{
803
- page_name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
808
+ page_name: z.ZodString;
804
809
  page: z.ZodObject<{
805
810
  path: z.ZodString;
806
811
  }, "strict", z.ZodTypeAny, {
@@ -812,32 +817,32 @@ declare const EVENT_REGISTRY: {
812
817
  page: {
813
818
  path: string;
814
819
  };
815
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
820
+ page_name: string;
816
821
  }, {
817
822
  page: {
818
823
  path: string;
819
824
  };
820
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
825
+ page_name: string;
821
826
  }>;
822
827
  readonly configSchema: z.ZodObject<{
823
828
  pages: z.ZodArray<z.ZodObject<{
824
- name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
829
+ name: z.ZodString;
825
830
  pathPattern: z.ZodType<RegExp, z.ZodTypeDef, RegExp>;
826
831
  }, "strict", z.ZodTypeAny, {
827
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
832
+ name: string;
828
833
  pathPattern: RegExp;
829
834
  }, {
830
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
835
+ name: string;
831
836
  pathPattern: RegExp;
832
837
  }>, "many">;
833
838
  }, "strict", z.ZodTypeAny, {
834
839
  pages: {
835
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
840
+ name: string;
836
841
  pathPattern: RegExp;
837
842
  }[];
838
843
  }, {
839
844
  pages: {
840
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
845
+ name: string;
841
846
  pathPattern: RegExp;
842
847
  }[];
843
848
  }>;
@@ -1788,4 +1793,4 @@ interface PhoneFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "t
1788
1793
  */
1789
1794
  declare const PhoneField: react.ForwardRefExoticComponent<PhoneFieldProps & react.RefAttributes<HTMLInputElement>>;
1790
1795
 
1791
- export { ALL_AUTOMATIC_EVENT_NAMES, ALL_LEAD_EVENT_NAMES, ALL_MANUAL_EVENT_NAMES, AdPlatformTracking, type AdPlatformTrackingProps, type AutomaticEventName, ConsentBanner, type ConsentBannerProps, ConsentChoiceState, ConsentSource, ConsentState, ConversionConfig, type CreateTrackingOptions, type CreateTrackingResult, type CtaClickConfig, type CtaClickMetadata, EVENT_REGISTRY, EVENT_SEMANTICS, type EventCategory, type EventClientVisibility, type EventConfig, type EventKind, type EventMetadata, type EventName, type EventOutcomeRole, type EventSemantics, type FormStartConfig, type FormStartMetadata, FormSubmitConfig, FormSubmitMetadata, GoogleAdsTracking, type GoogleAdsTrackingProps, GtagEnvironmentMap, type ManualEventName, MetaPixelEnvironmentMap, type MultiPageSessionConfig, type MultiPageSessionMetadata, type PageExitConfig, type PageExitMetadata, type PageViewConfig, type PageViewMetadata, ParsedPhone, type PhoneClickConfig, type PhoneClickMetadata, PhoneConfig, PhoneDisplayFormat, PhoneField, type PhoneFieldApi, type PhoneFieldProps, type PhoneInputProps, type RegisteredAutomaticEvents, type RegisteredManualEvents, SPECIFIC_PAGE_NAMES, type ScrollDepthConfig, type ScrollDepthMetadata, type SdkHeartbeatConfig, type SdkHeartbeatMetadata, type SpecificPageName, type SpecificPageVisitConfig, type SpecificPageVisitMetadata, TRACKING_PARAM_KEYS, type TimeOnSiteConfig, type TimeOnSiteMetadata, type TrackableEvent, type TrackingClient, TrackingClientContext, TrackingConfigReference, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, type TrackingProviderProps, TrackingSessionUpsertPayload, type TriggerRegistryConfig, type TypedTrackEventOptions, type TypedTrackingClient, type UseConsentResult, type UseCookiePreferencesOptions, type UseCookiePreferencesResult, type UsePhoneFieldOptions, captureTrackingParamsFromLocation, createTracking, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload, ctaClickConfigSchema, ctaClickMetadataSchema, formStartConfigSchema, formStartMetadataSchema, getEventDefinition, getEventSemantics, multiPageSessionConfigSchema, multiPageSessionMetadataSchema, pageExitConfigSchema, pageExitMetadataSchema, pageViewConfigSchema, pageViewMetadataSchema, phoneClickConfigSchema, phoneClickMetadataSchema, scrollDepthConfigSchema, scrollDepthMetadataSchema, sdkHeartbeatConfigSchema, sdkHeartbeatMetadataSchema, sdkHeartbeatTriggersSchema, specificPageNameSchema, specificPageVisitConfigSchema, specificPageVisitMetadataSchema, timeOnSiteConfigSchema, timeOnSiteMetadataSchema, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams };
1796
+ export { ALL_AUTOMATIC_EVENT_NAMES, ALL_LEAD_EVENT_NAMES, ALL_MANUAL_EVENT_NAMES, AdPlatformTracking, type AdPlatformTrackingProps, type AutomaticEventName, ConsentBanner, type ConsentBannerProps, ConsentChoiceState, ConsentSource, ConsentState, ConversionConfig, type CreateTrackingOptions, type CreateTrackingResult, type CtaClickConfig, type CtaClickMetadata, EVENT_REGISTRY, EVENT_SEMANTICS, type EventCategory, type EventClientVisibility, type EventConfig, type EventKind, type EventMetadata, type EventName, type EventOutcomeRole, type EventSemantics, type FormStartConfig, type FormStartMetadata, FormSubmitConfig, FormSubmitMetadata, GoogleAdsTracking, type GoogleAdsTrackingProps, GtagEnvironmentMap, type ManualEventName, MetaPixelEnvironmentMap, type MultiPageSessionConfig, type MultiPageSessionMetadata, PAGE_IDENTITY_MAX_LENGTH, PAGE_IDENTITY_PATTERN, type PageExitConfig, type PageExitMetadata, type PageIdentity, type PageViewConfig, type PageViewMetadata, ParsedPhone, type PhoneClickConfig, type PhoneClickMetadata, PhoneConfig, PhoneDisplayFormat, PhoneField, type PhoneFieldApi, type PhoneFieldProps, type PhoneInputProps, type RegisteredAutomaticEvents, type RegisteredManualEvents, SPECIFIC_PAGE_NAMES, type ScrollDepthConfig, type ScrollDepthMetadata, type SdkHeartbeatConfig, type SdkHeartbeatMetadata, type SpecificPageName, type SpecificPageVisitConfig, type SpecificPageVisitMetadata, TRACKING_PARAM_KEYS, type TimeOnSiteConfig, type TimeOnSiteMetadata, type TrackableEvent, type TrackingClient, TrackingClientContext, TrackingConfigReference, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, type TrackingProviderProps, TrackingSessionUpsertPayload, type TriggerRegistryConfig, type TypedTrackEventOptions, type TypedTrackingClient, type UseConsentResult, type UseCookiePreferencesOptions, type UseCookiePreferencesResult, type UsePhoneFieldOptions, captureTrackingParamsFromLocation, createTracking, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload, ctaClickConfigSchema, ctaClickMetadataSchema, formStartConfigSchema, formStartMetadataSchema, getEventDefinition, getEventSemantics, multiPageSessionConfigSchema, multiPageSessionMetadataSchema, pageExitConfigSchema, pageExitMetadataSchema, pageIdentitySchema, pageViewConfigSchema, pageViewMetadataSchema, phoneClickConfigSchema, phoneClickMetadataSchema, scrollDepthConfigSchema, scrollDepthMetadataSchema, sdkHeartbeatConfigSchema, sdkHeartbeatMetadataSchema, sdkHeartbeatTriggersSchema, specificPageNameSchema, specificPageVisitConfigSchema, specificPageVisitMetadataSchema, timeOnSiteConfigSchema, timeOnSiteMetadataSchema, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams };
package/dist/index.d.ts CHANGED
@@ -503,12 +503,16 @@ declare const scrollDepthConfigSchema: z.ZodObject<{
503
503
  }>;
504
504
  type ScrollDepthConfig = z.infer<typeof scrollDepthConfigSchema>;
505
505
 
506
- /**
507
- * Canonical page intent names supported by `specific_page_visit`.
508
- */
506
+ declare const PAGE_IDENTITY_MAX_LENGTH = 64;
507
+ declare const PAGE_IDENTITY_PATTERN: RegExp;
508
+ /** Common page identities offered as presets by operator tooling. */
509
509
  declare const SPECIFIC_PAGE_NAMES: readonly ["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"];
510
- type SpecificPageName = (typeof SPECIFIC_PAGE_NAMES)[number];
511
- declare const specificPageNameSchema: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
510
+ declare const pageIdentitySchema: z.ZodString;
511
+ type PageIdentity = z.infer<typeof pageIdentitySchema>;
512
+ /** @deprecated Use PageIdentity. Kept as a compatibility alias for existing consumers. */
513
+ type SpecificPageName = PageIdentity;
514
+ /** @deprecated Use pageIdentitySchema. Kept for source compatibility. */
515
+ declare const specificPageNameSchema: z.ZodString;
512
516
  /**
513
517
  * Metadata for the automatic `specific_page_visit` event.
514
518
  *
@@ -516,7 +520,7 @@ declare const specificPageNameSchema: z.ZodEnum<["contact_page", "about_page", "
516
520
  * named page patterns.
517
521
  */
518
522
  declare const specificPageVisitMetadataSchema: z.ZodObject<{
519
- page_name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
523
+ page_name: z.ZodString;
520
524
  page: z.ZodObject<{
521
525
  path: z.ZodString;
522
526
  }, "strict", z.ZodTypeAny, {
@@ -528,39 +532,40 @@ declare const specificPageVisitMetadataSchema: z.ZodObject<{
528
532
  page: {
529
533
  path: string;
530
534
  };
531
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
535
+ page_name: string;
532
536
  }, {
533
537
  page: {
534
538
  path: string;
535
539
  };
536
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
540
+ page_name: string;
537
541
  }>;
538
542
  type SpecificPageVisitMetadata = z.infer<typeof specificPageVisitMetadataSchema>;
539
543
  /**
540
544
  * Registration config for automatic `specific_page_visit`.
541
545
  *
542
- * Each page entry pairs a semantic `name` with a `RegExp` that matches the
543
- * pathname. Use this instead of hard-coding path regexes downstream.
546
+ * Each page entry pairs a stable, validated identity with a `RegExp` that
547
+ * matches the pathname. The identity can use a preset above or a client-specific
548
+ * lowercase snake-case slug.
544
549
  */
545
550
  declare const specificPageVisitConfigSchema: z.ZodObject<{
546
551
  pages: z.ZodArray<z.ZodObject<{
547
- name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
552
+ name: z.ZodString;
548
553
  pathPattern: z.ZodType<RegExp, z.ZodTypeDef, RegExp>;
549
554
  }, "strict", z.ZodTypeAny, {
550
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
555
+ name: string;
551
556
  pathPattern: RegExp;
552
557
  }, {
553
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
558
+ name: string;
554
559
  pathPattern: RegExp;
555
560
  }>, "many">;
556
561
  }, "strict", z.ZodTypeAny, {
557
562
  pages: {
558
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
563
+ name: string;
559
564
  pathPattern: RegExp;
560
565
  }[];
561
566
  }, {
562
567
  pages: {
563
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
568
+ name: string;
564
569
  pathPattern: RegExp;
565
570
  }[];
566
571
  }>;
@@ -800,7 +805,7 @@ declare const EVENT_REGISTRY: {
800
805
  readonly clientVisibility: "detailed";
801
806
  };
802
807
  readonly metadataSchema: z.ZodObject<{
803
- page_name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
808
+ page_name: z.ZodString;
804
809
  page: z.ZodObject<{
805
810
  path: z.ZodString;
806
811
  }, "strict", z.ZodTypeAny, {
@@ -812,32 +817,32 @@ declare const EVENT_REGISTRY: {
812
817
  page: {
813
818
  path: string;
814
819
  };
815
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
820
+ page_name: string;
816
821
  }, {
817
822
  page: {
818
823
  path: string;
819
824
  };
820
- page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
825
+ page_name: string;
821
826
  }>;
822
827
  readonly configSchema: z.ZodObject<{
823
828
  pages: z.ZodArray<z.ZodObject<{
824
- name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
829
+ name: z.ZodString;
825
830
  pathPattern: z.ZodType<RegExp, z.ZodTypeDef, RegExp>;
826
831
  }, "strict", z.ZodTypeAny, {
827
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
832
+ name: string;
828
833
  pathPattern: RegExp;
829
834
  }, {
830
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
835
+ name: string;
831
836
  pathPattern: RegExp;
832
837
  }>, "many">;
833
838
  }, "strict", z.ZodTypeAny, {
834
839
  pages: {
835
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
840
+ name: string;
836
841
  pathPattern: RegExp;
837
842
  }[];
838
843
  }, {
839
844
  pages: {
840
- name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
845
+ name: string;
841
846
  pathPattern: RegExp;
842
847
  }[];
843
848
  }>;
@@ -1788,4 +1793,4 @@ interface PhoneFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "t
1788
1793
  */
1789
1794
  declare const PhoneField: react.ForwardRefExoticComponent<PhoneFieldProps & react.RefAttributes<HTMLInputElement>>;
1790
1795
 
1791
- export { ALL_AUTOMATIC_EVENT_NAMES, ALL_LEAD_EVENT_NAMES, ALL_MANUAL_EVENT_NAMES, AdPlatformTracking, type AdPlatformTrackingProps, type AutomaticEventName, ConsentBanner, type ConsentBannerProps, ConsentChoiceState, ConsentSource, ConsentState, ConversionConfig, type CreateTrackingOptions, type CreateTrackingResult, type CtaClickConfig, type CtaClickMetadata, EVENT_REGISTRY, EVENT_SEMANTICS, type EventCategory, type EventClientVisibility, type EventConfig, type EventKind, type EventMetadata, type EventName, type EventOutcomeRole, type EventSemantics, type FormStartConfig, type FormStartMetadata, FormSubmitConfig, FormSubmitMetadata, GoogleAdsTracking, type GoogleAdsTrackingProps, GtagEnvironmentMap, type ManualEventName, MetaPixelEnvironmentMap, type MultiPageSessionConfig, type MultiPageSessionMetadata, type PageExitConfig, type PageExitMetadata, type PageViewConfig, type PageViewMetadata, ParsedPhone, type PhoneClickConfig, type PhoneClickMetadata, PhoneConfig, PhoneDisplayFormat, PhoneField, type PhoneFieldApi, type PhoneFieldProps, type PhoneInputProps, type RegisteredAutomaticEvents, type RegisteredManualEvents, SPECIFIC_PAGE_NAMES, type ScrollDepthConfig, type ScrollDepthMetadata, type SdkHeartbeatConfig, type SdkHeartbeatMetadata, type SpecificPageName, type SpecificPageVisitConfig, type SpecificPageVisitMetadata, TRACKING_PARAM_KEYS, type TimeOnSiteConfig, type TimeOnSiteMetadata, type TrackableEvent, type TrackingClient, TrackingClientContext, TrackingConfigReference, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, type TrackingProviderProps, TrackingSessionUpsertPayload, type TriggerRegistryConfig, type TypedTrackEventOptions, type TypedTrackingClient, type UseConsentResult, type UseCookiePreferencesOptions, type UseCookiePreferencesResult, type UsePhoneFieldOptions, captureTrackingParamsFromLocation, createTracking, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload, ctaClickConfigSchema, ctaClickMetadataSchema, formStartConfigSchema, formStartMetadataSchema, getEventDefinition, getEventSemantics, multiPageSessionConfigSchema, multiPageSessionMetadataSchema, pageExitConfigSchema, pageExitMetadataSchema, pageViewConfigSchema, pageViewMetadataSchema, phoneClickConfigSchema, phoneClickMetadataSchema, scrollDepthConfigSchema, scrollDepthMetadataSchema, sdkHeartbeatConfigSchema, sdkHeartbeatMetadataSchema, sdkHeartbeatTriggersSchema, specificPageNameSchema, specificPageVisitConfigSchema, specificPageVisitMetadataSchema, timeOnSiteConfigSchema, timeOnSiteMetadataSchema, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams };
1796
+ export { ALL_AUTOMATIC_EVENT_NAMES, ALL_LEAD_EVENT_NAMES, ALL_MANUAL_EVENT_NAMES, AdPlatformTracking, type AdPlatformTrackingProps, type AutomaticEventName, ConsentBanner, type ConsentBannerProps, ConsentChoiceState, ConsentSource, ConsentState, ConversionConfig, type CreateTrackingOptions, type CreateTrackingResult, type CtaClickConfig, type CtaClickMetadata, EVENT_REGISTRY, EVENT_SEMANTICS, type EventCategory, type EventClientVisibility, type EventConfig, type EventKind, type EventMetadata, type EventName, type EventOutcomeRole, type EventSemantics, type FormStartConfig, type FormStartMetadata, FormSubmitConfig, FormSubmitMetadata, GoogleAdsTracking, type GoogleAdsTrackingProps, GtagEnvironmentMap, type ManualEventName, MetaPixelEnvironmentMap, type MultiPageSessionConfig, type MultiPageSessionMetadata, PAGE_IDENTITY_MAX_LENGTH, PAGE_IDENTITY_PATTERN, type PageExitConfig, type PageExitMetadata, type PageIdentity, type PageViewConfig, type PageViewMetadata, ParsedPhone, type PhoneClickConfig, type PhoneClickMetadata, PhoneConfig, PhoneDisplayFormat, PhoneField, type PhoneFieldApi, type PhoneFieldProps, type PhoneInputProps, type RegisteredAutomaticEvents, type RegisteredManualEvents, SPECIFIC_PAGE_NAMES, type ScrollDepthConfig, type ScrollDepthMetadata, type SdkHeartbeatConfig, type SdkHeartbeatMetadata, type SpecificPageName, type SpecificPageVisitConfig, type SpecificPageVisitMetadata, TRACKING_PARAM_KEYS, type TimeOnSiteConfig, type TimeOnSiteMetadata, type TrackableEvent, type TrackingClient, TrackingClientContext, TrackingConfigReference, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, type TrackingProviderProps, TrackingSessionUpsertPayload, type TriggerRegistryConfig, type TypedTrackEventOptions, type TypedTrackingClient, type UseConsentResult, type UseCookiePreferencesOptions, type UseCookiePreferencesResult, type UsePhoneFieldOptions, captureTrackingParamsFromLocation, createTracking, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload, ctaClickConfigSchema, ctaClickMetadataSchema, formStartConfigSchema, formStartMetadataSchema, getEventDefinition, getEventSemantics, multiPageSessionConfigSchema, multiPageSessionMetadataSchema, pageExitConfigSchema, pageExitMetadataSchema, pageIdentitySchema, pageViewConfigSchema, pageViewMetadataSchema, phoneClickConfigSchema, phoneClickMetadataSchema, scrollDepthConfigSchema, scrollDepthMetadataSchema, sdkHeartbeatConfigSchema, sdkHeartbeatMetadataSchema, sdkHeartbeatTriggersSchema, specificPageNameSchema, specificPageVisitConfigSchema, specificPageVisitMetadataSchema, timeOnSiteConfigSchema, timeOnSiteMetadataSchema, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams };
package/dist/index.js CHANGED
@@ -2086,17 +2086,12 @@ var scrollDepthConfigSchema = import_zod9.z.object({
2086
2086
 
2087
2087
  // ../tracking-core/src/events/specific-page-visit.ts
2088
2088
  var import_zod10 = require("zod");
2089
- var SPECIFIC_PAGE_NAMES = [
2090
- "contact_page",
2091
- "about_page",
2092
- "services_page",
2093
- "booking_page",
2094
- "location_page",
2095
- "pricing_page",
2096
- "faq_page",
2097
- "testimonials_page"
2098
- ];
2099
- var specificPageNameSchema = import_zod10.z.enum(SPECIFIC_PAGE_NAMES);
2089
+ var PAGE_IDENTITY_MAX_LENGTH = 64;
2090
+ var PAGE_IDENTITY_PATTERN = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
2091
+ var pageIdentitySchema = import_zod10.z.string().max(PAGE_IDENTITY_MAX_LENGTH).regex(PAGE_IDENTITY_PATTERN, {
2092
+ message: "page identity must be lowercase snake_case, start with a letter, and contain at most 64 characters"
2093
+ });
2094
+ var specificPageNameSchema = pageIdentitySchema;
2100
2095
  var specificPageVisitMetadataSchema = import_zod10.z.object({
2101
2096
  page_name: specificPageNameSchema,
2102
2097
  page: import_zod10.z.object({
@@ -3470,7 +3465,7 @@ function GoogleAdsTracking(props) {
3470
3465
  var import_navigation3 = require("next/navigation");
3471
3466
 
3472
3467
  // package.json
3473
- var version = "0.19.2";
3468
+ var version = "0.20.0";
3474
3469
 
3475
3470
  // src/factory.tsx
3476
3471
  var import_react5 = require("react");