@aranova/tracking-react 0.12.1 → 0.12.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.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-DXAki8pO.d.mts → phone-utils-Du-alwyM.d.mts} +7 -3
- package/dist/{phone-utils-DXAki8pO.d.ts → phone-utils-Du-alwyM.d.ts} +7 -3
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -136,7 +136,9 @@ function bootstrapGoogleAdsTracking(gtagId) {
|
|
|
136
136
|
}
|
|
137
137
|
function bootstrapMultipleGtags(gtagIds) {
|
|
138
138
|
if (typeof window === "undefined" || typeof document === "undefined") return;
|
|
139
|
-
const ids = Object.values(gtagIds).filter(
|
|
139
|
+
const ids = Object.values(gtagIds).filter(
|
|
140
|
+
(id) => typeof id === "string" && isValidGtagId(id)
|
|
141
|
+
);
|
|
140
142
|
if (ids.length === 0) return;
|
|
141
143
|
applyDefaultConsentState();
|
|
142
144
|
loadGtagScript(ids[0]);
|
|
@@ -1852,7 +1854,7 @@ function GoogleAdsTracking(props) {
|
|
|
1852
1854
|
import { createContext as createContext2, useContext as useContext2, useEffect as useEffect4, useMemo as useMemo3 } from "react";
|
|
1853
1855
|
|
|
1854
1856
|
// package.json
|
|
1855
|
-
var version = "0.12.
|
|
1857
|
+
var version = "0.12.2";
|
|
1856
1858
|
|
|
1857
1859
|
// ../tracking-core/src/phone-react.tsx
|
|
1858
1860
|
import {
|
|
@@ -1975,7 +1977,9 @@ function createTracking(options) {
|
|
|
1975
1977
|
}
|
|
1976
1978
|
const TrackingContext = createContext2(null);
|
|
1977
1979
|
function TrackingProvider({ gtagId, gtagIds, children }) {
|
|
1978
|
-
const resolvedGtagIds = gtagIds
|
|
1980
|
+
const resolvedGtagIds = gtagIds ? Object.fromEntries(
|
|
1981
|
+
Object.entries(gtagIds).filter((e) => e[1] != null)
|
|
1982
|
+
) : gtagId ? { default: gtagId } : void 0;
|
|
1979
1983
|
const client = useMemo3(
|
|
1980
1984
|
() => createTypedClient(
|
|
1981
1985
|
getOrCreateTrackingClient({
|