@aranova/tracking-next 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.mjs CHANGED
@@ -1644,10 +1644,10 @@ import Script from "next/script";
1644
1644
  import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1645
1645
  function GoogleAdsTracking(props) {
1646
1646
  const { gtagId, gtagIds } = props;
1647
- const allIds = gtagIds ? Object.values(gtagIds) : gtagId ? [gtagId] : [];
1647
+ const allIds = gtagIds ? Object.values(gtagIds).filter((id) => id != null) : gtagId ? [gtagId] : [];
1648
1648
  if (allIds.length === 0) return null;
1649
1649
  const loaderId = allIds[0];
1650
- const initScript = allIds.length === 1 ? createGtagInitScript(allIds[0]) : createGtagInitScriptMulti(allIds);
1650
+ const initScript = allIds.length === 1 ? createGtagInitScript(loaderId) : createGtagInitScriptMulti(allIds);
1651
1651
  return /* @__PURE__ */ jsxs2(Fragment2, { children: [
1652
1652
  /* @__PURE__ */ jsx2(Script, { id: "consent-default", strategy: "beforeInteractive", children: createConsentDefaultScript() }),
1653
1653
  /* @__PURE__ */ jsx2(
@@ -1666,7 +1666,7 @@ function GoogleAdsTracking(props) {
1666
1666
  import { usePathname, useSearchParams } from "next/navigation";
1667
1667
 
1668
1668
  // package.json
1669
- var version = "0.12.1";
1669
+ var version = "0.12.2";
1670
1670
 
1671
1671
  // src/factory.tsx
1672
1672
  import { createContext as createContext2, useContext as useContext2, useEffect as useEffect3, useMemo as useMemo2, useRef } from "react";