@aranova/tracking-react 0.23.1 → 0.24.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/README.md +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-BhWfNuPS.d.mts → phone-utils-B6TYgiYT.d.mts} +12 -3
- package/dist/{phone-utils-BhWfNuPS.d.ts → phone-utils-B6TYgiYT.d.ts} +12 -3
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/phone.js.map +1 -1
- package/dist/phone.mjs.map +1 -1
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ export function LeadForm() {
|
|
|
115
115
|
}
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
`fields[].value` can be any JSON value: string, number, boolean, null, array, or object. Values must be JSON-serializable because events are stored as first-party JSONB. Intentionally submitted lead fields may include raw names, emails, phone numbers, addresses, selections, free-text messages, and submitted file data for first-party analytics and lead operations. Build the array explicitly from the submitted form; the SDK never scrapes arbitrary DOM fields. `File`/`Blob` objects must be converted to a JSON representation
|
|
118
|
+
`fields[].value` can be any JSON value: string, number, boolean, null, array, or object. Values must be JSON-serializable because events are stored as first-party JSONB. Intentionally submitted lead fields may include raw names, emails, phone numbers, addresses, selections, free-text messages, and submitted file data for first-party analytics and lead operations. Build the array explicitly from the submitted form; the SDK never scrapes arbitrary DOM fields. `File`/`Blob` objects must be converted to a JSON representation; upload larger files separately and send their storage reference. No byte limit is enforced on event metadata — but a submit fired just before navigation flushes over `keepalive`, which browsers cap near 64 KB and drop silently, so keep inlined payloads small. Never send passwords, authentication tokens, payment-card/bank credentials, or private keys. Apply the client's privacy notice, consent, retention, and regulated-data requirements. Google offline matching uses normalized, server-side SHA-256-hashed identifiers — not raw free-text/file metadata.
|
|
119
119
|
|
|
120
120
|
### Phone clicks (`tel:` taps) — manual or auto-capture
|
|
121
121
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent } from 'react';
|
|
3
|
-
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, C as ConsentState, g as ConsentChoiceState, h as ConsentSource, P as PhoneConfig, i as ParsedPhone, j as PhoneDisplayFormat } from './phone-utils-
|
|
4
|
-
export { k as ConsentChoice, D as DEFAULT_DECLINE_TTL_DAYS, l as DEFAULT_PHONE_COUNTRY, J as JsonValue, S as SetConsentOptions, m as TrackedField, n as TrackingInitConfig, o as formSubmitConfigSchema, p as formSubmitMetadataSchema, q as formatPhone, r as formatPhoneAsTyped, s as getConsentChoice, t as getConsentState, u as jsonValueSchema, v as onConsentChange, w as optIn, x as optOut, y as parsePhone, z as phoneField, A as resetConsent, B as setConsentState, E as toE164 } from './phone-utils-
|
|
3
|
+
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, C as ConsentState, g as ConsentChoiceState, h as ConsentSource, P as PhoneConfig, i as ParsedPhone, j as PhoneDisplayFormat } from './phone-utils-B6TYgiYT.mjs';
|
|
4
|
+
export { k as ConsentChoice, D as DEFAULT_DECLINE_TTL_DAYS, l as DEFAULT_PHONE_COUNTRY, J as JsonValue, S as SetConsentOptions, m as TrackedField, n as TrackingInitConfig, o as formSubmitConfigSchema, p as formSubmitMetadataSchema, q as formatPhone, r as formatPhoneAsTyped, s as getConsentChoice, t as getConsentState, u as jsonValueSchema, v as onConsentChange, w as optIn, x as optOut, y as parsePhone, z as phoneField, A as resetConsent, B as setConsentState, E as toE164 } from './phone-utils-B6TYgiYT.mjs';
|
|
5
5
|
import { T as TrackingConfigReference, C as ConversionConfig } from './sales-BwWnvl8L.mjs';
|
|
6
6
|
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, d as ConversionConfigStore, e as ConversionUserData, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ab as clearStashedUserData, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, ah as getTrackingConfigRuntime, ai as resolveConversionConfig, aj as resolveTrackingConfigUrl, ak as saleCreateSchema, al as saleItemSchema, am as saleServiceSchema, an as saleUpdateSchema, ao as salesRequest, ap as stashUserData, aq as toMinor } from './sales-BwWnvl8L.mjs';
|
|
7
7
|
import * as src from 'src';
|
|
@@ -60,7 +60,7 @@ declare function ConsentBanner({ message, title, acceptLabel, declineLabel, poli
|
|
|
60
60
|
/**
|
|
61
61
|
* Attribution query/cookie keys captured by the SDK.
|
|
62
62
|
*/
|
|
63
|
-
declare const TRACKING_PARAM_KEYS: readonly ["gclid", "wbraid", "gbraid", "fbclid", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
|
|
63
|
+
declare const TRACKING_PARAM_KEYS: readonly ["gclid", "wbraid", "gbraid", "ylpcid", "fbclid", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
|
|
64
64
|
type TrackingParamKey = (typeof TRACKING_PARAM_KEYS)[number];
|
|
65
65
|
/**
|
|
66
66
|
* Capture tracking params from a URL, persist them to first-party cookies, and
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent } from 'react';
|
|
3
|
-
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, C as ConsentState, g as ConsentChoiceState, h as ConsentSource, P as PhoneConfig, i as ParsedPhone, j as PhoneDisplayFormat } from './phone-utils-
|
|
4
|
-
export { k as ConsentChoice, D as DEFAULT_DECLINE_TTL_DAYS, l as DEFAULT_PHONE_COUNTRY, J as JsonValue, S as SetConsentOptions, m as TrackedField, n as TrackingInitConfig, o as formSubmitConfigSchema, p as formSubmitMetadataSchema, q as formatPhone, r as formatPhoneAsTyped, s as getConsentChoice, t as getConsentState, u as jsonValueSchema, v as onConsentChange, w as optIn, x as optOut, y as parsePhone, z as phoneField, A as resetConsent, B as setConsentState, E as toE164 } from './phone-utils-
|
|
3
|
+
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, C as ConsentState, g as ConsentChoiceState, h as ConsentSource, P as PhoneConfig, i as ParsedPhone, j as PhoneDisplayFormat } from './phone-utils-B6TYgiYT.js';
|
|
4
|
+
export { k as ConsentChoice, D as DEFAULT_DECLINE_TTL_DAYS, l as DEFAULT_PHONE_COUNTRY, J as JsonValue, S as SetConsentOptions, m as TrackedField, n as TrackingInitConfig, o as formSubmitConfigSchema, p as formSubmitMetadataSchema, q as formatPhone, r as formatPhoneAsTyped, s as getConsentChoice, t as getConsentState, u as jsonValueSchema, v as onConsentChange, w as optIn, x as optOut, y as parsePhone, z as phoneField, A as resetConsent, B as setConsentState, E as toE164 } from './phone-utils-B6TYgiYT.js';
|
|
5
5
|
import { T as TrackingConfigReference, C as ConversionConfig } from './sales-BwWnvl8L.js';
|
|
6
6
|
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, d as ConversionConfigStore, e as ConversionUserData, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ab as clearStashedUserData, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, ah as getTrackingConfigRuntime, ai as resolveConversionConfig, aj as resolveTrackingConfigUrl, ak as saleCreateSchema, al as saleItemSchema, am as saleServiceSchema, an as saleUpdateSchema, ao as salesRequest, ap as stashUserData, aq as toMinor } from './sales-BwWnvl8L.js';
|
|
7
7
|
import * as src from 'src';
|
|
@@ -60,7 +60,7 @@ declare function ConsentBanner({ message, title, acceptLabel, declineLabel, poli
|
|
|
60
60
|
/**
|
|
61
61
|
* Attribution query/cookie keys captured by the SDK.
|
|
62
62
|
*/
|
|
63
|
-
declare const TRACKING_PARAM_KEYS: readonly ["gclid", "wbraid", "gbraid", "fbclid", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
|
|
63
|
+
declare const TRACKING_PARAM_KEYS: readonly ["gclid", "wbraid", "gbraid", "ylpcid", "fbclid", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
|
|
64
64
|
type TrackingParamKey = (typeof TRACKING_PARAM_KEYS)[number];
|
|
65
65
|
/**
|
|
66
66
|
* Capture tracking params from a URL, persist them to first-party cookies, and
|
package/dist/index.js
CHANGED
|
@@ -374,6 +374,8 @@ var TRACKING_PARAM_KEYS = [
|
|
|
374
374
|
// citizens: captured, persisted, and attributed exactly like gclid.
|
|
375
375
|
"wbraid",
|
|
376
376
|
"gbraid",
|
|
377
|
+
// Yelp Ads click id (40 hex chars), appended to ad-click URLs.
|
|
378
|
+
"ylpcid",
|
|
377
379
|
"fbclid",
|
|
378
380
|
"utm_source",
|
|
379
381
|
"utm_medium",
|
|
@@ -386,6 +388,7 @@ function createEmptyTrackingParams() {
|
|
|
386
388
|
gclid: null,
|
|
387
389
|
wbraid: null,
|
|
388
390
|
gbraid: null,
|
|
391
|
+
ylpcid: null,
|
|
389
392
|
fbclid: null,
|
|
390
393
|
utm_source: null,
|
|
391
394
|
utm_medium: null,
|
|
@@ -719,6 +722,7 @@ function buildLandingPayloadFields(sessionId, override) {
|
|
|
719
722
|
landing_gclid: params.gclid ?? null,
|
|
720
723
|
landing_wbraid: params.wbraid ?? null,
|
|
721
724
|
landing_gbraid: params.gbraid ?? null,
|
|
725
|
+
landing_ylpcid: params.ylpcid ?? null,
|
|
722
726
|
landing_fbclid: params.fbclid ?? null,
|
|
723
727
|
landing_utm_source: params.utm_source ?? null,
|
|
724
728
|
landing_utm_medium: params.utm_medium ?? null,
|
|
@@ -749,6 +753,7 @@ function createTrackingSessionUpsertPayload(trackingParams, input, context) {
|
|
|
749
753
|
gclid: trackingParams.gclid,
|
|
750
754
|
wbraid: trackingParams.wbraid,
|
|
751
755
|
gbraid: trackingParams.gbraid,
|
|
756
|
+
ylpcid: trackingParams.ylpcid,
|
|
752
757
|
fbclid: trackingParams.fbclid,
|
|
753
758
|
fbc: getFbcCookie(),
|
|
754
759
|
fbp: getFbpCookie(),
|
|
@@ -772,6 +777,7 @@ function createTrackingEventCreatePayload(trackingParams, input, context) {
|
|
|
772
777
|
gclid: trackingParams.gclid,
|
|
773
778
|
wbraid: trackingParams.wbraid,
|
|
774
779
|
gbraid: trackingParams.gbraid,
|
|
780
|
+
ylpcid: trackingParams.ylpcid,
|
|
775
781
|
fbclid: trackingParams.fbclid,
|
|
776
782
|
fbc: getFbcCookie(),
|
|
777
783
|
fbp: getFbpCookie(),
|
|
@@ -2028,6 +2034,7 @@ function createTrackingClient(config) {
|
|
|
2028
2034
|
gclid: params.gclid,
|
|
2029
2035
|
wbraid: params.wbraid,
|
|
2030
2036
|
gbraid: params.gbraid,
|
|
2037
|
+
ylpcid: params.ylpcid,
|
|
2031
2038
|
fbclid: params.fbclid,
|
|
2032
2039
|
fbc: getFbcCookie(),
|
|
2033
2040
|
fbp: getFbpCookie(),
|
|
@@ -3826,7 +3833,7 @@ function GoogleAdsTracking(props) {
|
|
|
3826
3833
|
var import_react6 = require("react");
|
|
3827
3834
|
|
|
3828
3835
|
// package.json
|
|
3829
|
-
var version = "0.
|
|
3836
|
+
var version = "0.24.1";
|
|
3830
3837
|
|
|
3831
3838
|
// ../tracking-core/src/phone-react.tsx
|
|
3832
3839
|
var import_react5 = require("react");
|