Ahrefs fehler.

This commit is contained in:
2026-03-26 10:56:50 -05:00
parent e540bf3122
commit 33b5191093
2 changed files with 45 additions and 44 deletions

View File

@@ -1,33 +1,34 @@
{ {
"permissions": { "permissions": {
"allow": [ "allow": [
"Bash(docker-compose:*)", "Bash(docker-compose:*)",
"Bash(docker container prune:*)", "Bash(docker container prune:*)",
"Bash(npx prisma migrate dev:*)", "Bash(npx prisma migrate dev:*)",
"Bash(npx prisma:*)", "Bash(npx prisma:*)",
"Bash(npm run dev)", "Bash(npm run dev)",
"Bash(timeout:*)", "Bash(timeout:*)",
"Bash(taskkill:*)", "Bash(taskkill:*)",
"Bash(npx kill-port:*)", "Bash(npx kill-port:*)",
"Bash(docker compose:*)", "Bash(docker compose:*)",
"Bash(curl -I https://fonts.googleapis.com)", "Bash(curl -I https://fonts.googleapis.com)",
"Bash(wsl:*)", "Bash(wsl:*)",
"Read(//c/Users/a931627/.ssh/**)", "Read(//c/Users/a931627/.ssh/**)",
"Bash(ssh-keygen:*)", "Bash(ssh-keygen:*)",
"Bash(cat:*)", "Bash(cat:*)",
"Bash(git remote add:*)", "Bash(git remote add:*)",
"Bash(git push:*)", "Bash(git push:*)",
"Bash(git remote set-url:*)", "Bash(git remote set-url:*)",
"Bash(npm install:*)", "Bash(npm install:*)",
"Bash(npm run build:*)", "Bash(npm run build:*)",
"Bash(ls:*)", "Bash(ls:*)",
"Bash(curl:*)", "Bash(curl:*)",
"Bash(echo \"\n\n## CSRF Debug aktiviert!\n\nBitte teste jetzt:\n1. Browser zu http://localhost:3050/create\n2. Dynamic QR Code erstellen versuchen\n3. Server-Logs zeigen jetzt [CSRF Debug] Output\n\nIch sehe dann:\n- Ob headerToken vorhanden ist\n- Ob cookieToken vorhanden ist \n- Ob sie übereinstimmen\n\n---\n\nStripe Portal 500 Error ist separates Problem:\nhttps://dashboard.stripe.com/test/settings/billing/portal\n→ Customer Portal Configuration muss erstellt werden\n\")", "Bash(echo \"\n\n## CSRF Debug aktiviert!\n\nBitte teste jetzt:\n1. Browser zu http://localhost:3050/create\n2. Dynamic QR Code erstellen versuchen\n3. Server-Logs zeigen jetzt [CSRF Debug] Output\n\nIch sehe dann:\n- Ob headerToken vorhanden ist\n- Ob cookieToken vorhanden ist \n- Ob sie übereinstimmen\n\n---\n\nStripe Portal 500 Error ist separates Problem:\nhttps://dashboard.stripe.com/test/settings/billing/portal\n→ Customer Portal Configuration muss erstellt werden\n\")",
"Bash(pkill:*)", "Bash(pkill:*)",
"Skill(shadcn-ui)", "Skill(shadcn-ui)",
"Bash(find:*)" "Bash(find:*)",
], "Bash(ls -la \"/c/Users/User/Documents/QR-master/src/app/\\(main\\)/\\(marketing\\)/\")"
"deny": [], ],
"ask": [] "deny": [],
} "ask": []
} }
}

View File

@@ -1,7 +1,7 @@
"use client"; "use client";
import Link from "next/link"; import Link from "next/link";
import { usePathname, useSearchParams } from "next/navigation"; import { usePathname } from "next/navigation";
import { useEffect } from "react"; import { useEffect } from "react";
import { trackEvent } from "@/components/PostHogProvider"; import { trackEvent } from "@/components/PostHogProvider";
@@ -14,12 +14,14 @@ type TrackingContext = {
useCase?: string; useCase?: string;
}; };
function getUtmProperties(searchParams: ReturnType<typeof useSearchParams>) { function getUtmPropertiesFromWindow() {
if (typeof window === "undefined") return {};
const params = new URLSearchParams(window.location.search);
return { return {
utm_source: searchParams?.get("utm_source") || undefined, utm_source: params.get("utm_source") || undefined,
utm_medium: searchParams?.get("utm_medium") || undefined, utm_medium: params.get("utm_medium") || undefined,
utm_campaign: searchParams?.get("utm_campaign") || undefined, utm_campaign: params.get("utm_campaign") || undefined,
utm_content: searchParams?.get("utm_content") || undefined, utm_content: params.get("utm_content") || undefined,
}; };
} }
@@ -29,7 +31,6 @@ export function MarketingPageTracker({
useCase, useCase,
}: TrackingContext) { }: TrackingContext) {
const pathname = usePathname(); const pathname = usePathname();
const searchParams = useSearchParams();
useEffect(() => { useEffect(() => {
if (!pathname) { if (!pathname) {
@@ -41,9 +42,9 @@ export function MarketingPageTracker({
page_type: pageType, page_type: pageType,
cluster, cluster,
use_case: useCase, use_case: useCase,
...getUtmProperties(searchParams), ...getUtmPropertiesFromWindow(),
}); });
}, [cluster, pageType, pathname, searchParams, useCase]); }, [cluster, pageType, pathname, useCase]);
return null; return null;
} }
@@ -69,7 +70,6 @@ export function TrackedCtaLink({
useCase, useCase,
}: TrackedCtaLinkProps) { }: TrackedCtaLinkProps) {
const pathname = usePathname(); const pathname = usePathname();
const searchParams = useSearchParams();
return ( return (
<Link <Link
@@ -84,7 +84,7 @@ export function TrackedCtaLink({
cta_label: ctaLabel, cta_label: ctaLabel,
cta_location: ctaLocation, cta_location: ctaLocation,
destination: destination || href, destination: destination || href,
...getUtmProperties(searchParams), ...getUtmPropertiesFromWindow(),
}); });
}} }}
> >