We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b61d7f7 commit ba4e9b9Copy full SHA for ba4e9b9
src/features/common/components/shell/gtm/safe-gtm.component.tsx
@@ -3,14 +3,15 @@
3
import { GoogleTagManager } from "@next/third-parties/google"
4
import { useEffect, useState } from "react";
5
6
-const MAX_URL_LENGTH = 8000;
+const MAX_URL_LENGTH = 6000;
7
8
export function SafeGTM({ gtmId}: { gtmId: string}) {
9
const [canLoad, setCanLoad] = useState(false)
10
11
useEffect(() => {
12
const urlLength = window.location.href.length
13
const hasLargeToken = urlLength > MAX_URL_LENGTH
14
+ console.log("url length", urlLength)
15
if(hasLargeToken) {
16
console.warn("GTM disabled: URL too long", urlLength)
17
}
0 commit comments