@metodokorexmk/tracking 1.2.0 → 1.2.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/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -295,6 +295,8 @@ interface SubmitTrackingLeadResponse {
|
|
|
295
295
|
* Additional options for building the lead request body.
|
|
296
296
|
*/
|
|
297
297
|
interface BuildRequestBodyOptions {
|
|
298
|
+
/** Custom access URL (e.g., resolved from a short ref). Falls back to window.location.href. */
|
|
299
|
+
accessUrl?: string;
|
|
298
300
|
nameForm?: string;
|
|
299
301
|
msgForm?: string;
|
|
300
302
|
status?: string;
|
|
@@ -854,6 +856,11 @@ declare const startDwellTimeTracking: (config: DwellTimeConfig) => void;
|
|
|
854
856
|
* Stops tracking and sends accumulated time.
|
|
855
857
|
*/
|
|
856
858
|
declare const stopDwellTimeTracking: () => void;
|
|
859
|
+
/**
|
|
860
|
+
* Returns the current elapsed dwell time in seconds.
|
|
861
|
+
* Convenience wrapper for `dwellTimeTracker.getElapsedTime()`.
|
|
862
|
+
*/
|
|
863
|
+
declare const getDwellTime: () => number;
|
|
857
864
|
|
|
858
865
|
/**
|
|
859
866
|
* Tracking Queries — GET queries to the tracking backend.
|
|
@@ -894,4 +901,4 @@ declare const generateTrackingLink: (funnelId: number, customDomain: string) =>
|
|
|
894
901
|
link: string;
|
|
895
902
|
}>;
|
|
896
903
|
|
|
897
|
-
export { type BuildRequestBodyOptions, type ClickData, type DwellTimeConfig, DwellTimeTracker, LandingTracker, type LandingTrackerConfig, type LeadFormData, type LeadOrigin, type LeadTrackingData, type SessionSummary, type SubmitTrackingLeadResponse, type TrackingAPIConfig, type TrackingConfig, type TrackingEventData, type TrackingLead, type TrackingLeadResponse, type UTMParams, type UrlParams, type UseVideoTrackingOptions, type VideoStats, VideoTracker, type VideoTrackerHandle, type VideoTrackingState, type VideoUpdateCallback, type VisitorData, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackQuizAnswer, trackQuizComplete, trackQuizStart, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackThankYouPageVisit, trackTimeInSection, trackVoomlyByEmbedId, trackWhatsAppClick, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|
|
904
|
+
export { type BuildRequestBodyOptions, type ClickData, type DwellTimeConfig, DwellTimeTracker, LandingTracker, type LandingTrackerConfig, type LeadFormData, type LeadOrigin, type LeadTrackingData, type SessionSummary, type SubmitTrackingLeadResponse, type TrackingAPIConfig, type TrackingConfig, type TrackingEventData, type TrackingLead, type TrackingLeadResponse, type UTMParams, type UrlParams, type UseVideoTrackingOptions, type VideoStats, VideoTracker, type VideoTrackerHandle, type VideoTrackingState, type VideoUpdateCallback, type VisitorData, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getDwellTime, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackQuizAnswer, trackQuizComplete, trackQuizStart, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackThankYouPageVisit, trackTimeInSection, trackVoomlyByEmbedId, trackWhatsAppClick, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|
package/dist/index.d.ts
CHANGED
|
@@ -295,6 +295,8 @@ interface SubmitTrackingLeadResponse {
|
|
|
295
295
|
* Additional options for building the lead request body.
|
|
296
296
|
*/
|
|
297
297
|
interface BuildRequestBodyOptions {
|
|
298
|
+
/** Custom access URL (e.g., resolved from a short ref). Falls back to window.location.href. */
|
|
299
|
+
accessUrl?: string;
|
|
298
300
|
nameForm?: string;
|
|
299
301
|
msgForm?: string;
|
|
300
302
|
status?: string;
|
|
@@ -854,6 +856,11 @@ declare const startDwellTimeTracking: (config: DwellTimeConfig) => void;
|
|
|
854
856
|
* Stops tracking and sends accumulated time.
|
|
855
857
|
*/
|
|
856
858
|
declare const stopDwellTimeTracking: () => void;
|
|
859
|
+
/**
|
|
860
|
+
* Returns the current elapsed dwell time in seconds.
|
|
861
|
+
* Convenience wrapper for `dwellTimeTracker.getElapsedTime()`.
|
|
862
|
+
*/
|
|
863
|
+
declare const getDwellTime: () => number;
|
|
857
864
|
|
|
858
865
|
/**
|
|
859
866
|
* Tracking Queries — GET queries to the tracking backend.
|
|
@@ -894,4 +901,4 @@ declare const generateTrackingLink: (funnelId: number, customDomain: string) =>
|
|
|
894
901
|
link: string;
|
|
895
902
|
}>;
|
|
896
903
|
|
|
897
|
-
export { type BuildRequestBodyOptions, type ClickData, type DwellTimeConfig, DwellTimeTracker, LandingTracker, type LandingTrackerConfig, type LeadFormData, type LeadOrigin, type LeadTrackingData, type SessionSummary, type SubmitTrackingLeadResponse, type TrackingAPIConfig, type TrackingConfig, type TrackingEventData, type TrackingLead, type TrackingLeadResponse, type UTMParams, type UrlParams, type UseVideoTrackingOptions, type VideoStats, VideoTracker, type VideoTrackerHandle, type VideoTrackingState, type VideoUpdateCallback, type VisitorData, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackQuizAnswer, trackQuizComplete, trackQuizStart, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackThankYouPageVisit, trackTimeInSection, trackVoomlyByEmbedId, trackWhatsAppClick, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|
|
904
|
+
export { type BuildRequestBodyOptions, type ClickData, type DwellTimeConfig, DwellTimeTracker, LandingTracker, type LandingTrackerConfig, type LeadFormData, type LeadOrigin, type LeadTrackingData, type SessionSummary, type SubmitTrackingLeadResponse, type TrackingAPIConfig, type TrackingConfig, type TrackingEventData, type TrackingLead, type TrackingLeadResponse, type UTMParams, type UrlParams, type UseVideoTrackingOptions, type VideoStats, VideoTracker, type VideoTrackerHandle, type VideoTrackingState, type VideoUpdateCallback, type VisitorData, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getDwellTime, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackQuizAnswer, trackQuizComplete, trackQuizStart, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackThankYouPageVisit, trackTimeInSection, trackVoomlyByEmbedId, trackWhatsAppClick, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|
package/dist/index.js
CHANGED
|
@@ -1292,7 +1292,7 @@ var buildTrackingRequestBody = (params, formData, origin, options) => {
|
|
|
1292
1292
|
userName: formData.nombre.trim(),
|
|
1293
1293
|
userEmail: formData.correo.trim(),
|
|
1294
1294
|
entryDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1295
|
-
accessUrl: typeof window !== "undefined" ? window.location.href : "",
|
|
1295
|
+
accessUrl: options?.accessUrl || (typeof window !== "undefined" ? window.location.href : ""),
|
|
1296
1296
|
leadName: formData.nombre.trim(),
|
|
1297
1297
|
leadEmail: formData.correo.trim(),
|
|
1298
1298
|
leadPhone: formData.countryLada ? `${formData.countryLada}${telefonoLimpio}` : telefonoLimpio
|
|
@@ -1697,6 +1697,7 @@ var startDwellTimeTracking = (config) => {
|
|
|
1697
1697
|
var stopDwellTimeTracking = () => {
|
|
1698
1698
|
dwellTimeTracker.stop();
|
|
1699
1699
|
};
|
|
1700
|
+
var getDwellTime = () => dwellTimeTracker.getElapsedTime();
|
|
1700
1701
|
|
|
1701
1702
|
// src/persistence/tracking-queries.ts
|
|
1702
1703
|
var getTrackingById = async (trackingId) => {
|
|
@@ -1756,6 +1757,6 @@ var generateTrackingLink = async (funnelId, customDomain) => {
|
|
|
1756
1757
|
});
|
|
1757
1758
|
};
|
|
1758
1759
|
|
|
1759
|
-
export { DwellTimeTracker, LandingTracker, VideoTracker, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackQuizAnswer, trackQuizComplete, trackQuizStart, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackThankYouPageVisit, trackTimeInSection, trackVoomlyByEmbedId, trackWhatsAppClick, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|
|
1760
|
+
export { DwellTimeTracker, LandingTracker, VideoTracker, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getDwellTime, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackQuizAnswer, trackQuizComplete, trackQuizStart, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackThankYouPageVisit, trackTimeInSection, trackVoomlyByEmbedId, trackWhatsAppClick, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|
|
1760
1761
|
//# sourceMappingURL=index.js.map
|
|
1761
1762
|
//# sourceMappingURL=index.js.map
|