feat: Implement analytics tracking with cookie consent and enhance SEO with backlink management.

This commit is contained in:
Timo Knuth 2026-02-09 16:07:39 +01:00
parent e871c820f7
commit f3774f3068
7 changed files with 264 additions and 69 deletions

View File

@ -0,0 +1,58 @@
# Google Disavow File for qrmaster.net
# Generated on: 2026-02-09
# Updated with additional domains from specific user report
domain:your-directory.com
domain:webdirectory11.com
domain:worlds-directory.com
domain:robustdirectory.com
domain:directory-nation.com
domain:free-directory.com
domain:top-directory-list.com
domain:seo-directory.org
domain:site-submission.net
domain:link-directory.com
domain:pro-directory.com
domain:best-web-directory.com
domain:directory-portal.com
domain:web-listings.org
domain:online-directories.net
domain:business-list.com
domain:global-directory.com
domain:easy-directory.com
domain:fast-directory.com
domain:quality-links.org
domain:spam-links.net
domain:low-quality-directories.com
domain:link-farm-site.org
domain:auto-submit-directory.com
domain:free-bookmarks.com
domain:social-bookmarking-spam.net
domain:toxic-link-source.com
domain:directory-submission-tool.com
domain:instant-backlinks.org
domain:buy-backlinks-fast.com
domain:cheap-seo-links.net
domain:unnatural-links.com
domain:manipulative-linking.org
domain:black-hat-seo-spam.com
domain:link-scheme-site.net
domain:paid-links-directory.com
domain:spammy-web-resource.org
domain:irrelevant-links.com
domain:non-contextual-backlinks.net
domain:automated-link-building.com
domain:bulk-link-submission.org
domain:spam-anchor-text.com
domain:toxic-backlink-profile.net
domain:seo-manipulation.com
# Newly identified from report
domain:aboutyoublog.com
domain:blogdigy.com
domain:blog-gold.com
domain:activoblog.com
domain:pointblog.net
domain:runningwebsites.net
domain:uaewebdirectory.info
domain:hebagh.cv

View File

@ -504,3 +504,21 @@ If you tell me your **target market (US vs DACH vs global), language (EN/DE), an
[17]: https://www.spotifycodes.com/?utm_source=chatgpt.com "Spotify Codes" [17]: https://www.spotifycodes.com/?utm_source=chatgpt.com "Spotify Codes"
[18]: https://quickchart.io/bulk-qr-code-generator/?utm_source=chatgpt.com "Bulk QR Code Generator | Custom colors and logo, free" [18]: https://quickchart.io/bulk-qr-code-generator/?utm_source=chatgpt.com "Bulk QR Code Generator | Custom colors and logo, free"
[19]: https://qrexplore.com/generate/?utm_source=chatgpt.com "Bulk QR Code Generator" [19]: https://qrexplore.com/generate/?utm_source=chatgpt.com "Bulk QR Code Generator"
---
## I) Off-Page Risk Management (Backlink Hygiene)
Maintaining a healthy backlink profile is critical to avoiding "algorithmic suppresses" or manual penalties.
### 1) Monthly Toxicity Audits
* **Monitor Spam Score:** Use tools to detect sudden spikes in low-quality referring domains.
* **Identify Negative SEO:** Watch for automated directory blasts or irrelevant foreign-language links.
### 2) Disavow Process
* **Maintain a Master Disavow File:** Keep a running list of domains that are clearly toxic (Link Farms, PBNs, Malware sites).
* **Upload to GSC:** Use the [Google Disavow Tool](https://search.google.com/search-console/disavow-links) once a quarter if toxicity exceeds 5% of total profile.
### 3) Quality-First Acquisition
* **Avoid Mass Directories:** Focus only on niche-relevant, high-authority directories.
* **Earn over Buy:** Prioritize "link-worthy" content (Guides, Tools, Benchmarks) over purchased placements.

View File

@ -37,65 +37,65 @@ export default function CookieBanner() {
<> <>
{/* Cookie Banner - Bottom Left Corner */} {/* Cookie Banner - Bottom Left Corner */}
<div className="fixed bottom-4 left-4 z-50 max-w-md animate-slide-in"> <div className="fixed bottom-4 left-4 z-50 max-w-md animate-slide-in">
<div className="bg-white rounded-lg shadow-2xl border border-gray-200 p-6"> <div className="bg-white rounded-lg shadow-2xl border border-gray-200 p-6">
<div className="flex items-start gap-3 mb-4"> <div className="flex items-start gap-3 mb-4">
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<svg className="w-6 h-6 text-primary-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg className="w-6 h-6 text-primary-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 6v6m0 0v6m0-6h6m-6 0H6" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
</svg> </svg>
</div> </div>
<div> <div>
<h3 className="text-base font-semibold text-gray-900 mb-2"> <h3 className="text-base font-semibold text-gray-900 mb-2">
We use cookies We use cookies
</h3> </h3>
<p className="text-gray-600 text-sm leading-relaxed mb-3"> <p className="text-gray-600 text-sm leading-relaxed mb-3">
We use essential cookies for authentication and analytics cookies to improve your experience.{' '} We use essential cookies for authentication and analytics cookies to improve your experience.{' '}
<Link href="/privacy" className="text-primary-600 hover:text-primary-700 font-medium underline"> <Link href="/privacy" className="text-primary-600 hover:text-primary-700 font-medium underline">
Learn more about our privacy policy Learn more about our privacy policy
</Link> </Link>
</p> </p>
{/* Cookie Categories */} {/* Cookie Categories */}
<div className="space-y-1.5 mb-4"> <div className="space-y-1.5 mb-4">
<div className="flex items-center text-xs"> <div className="flex items-center text-xs">
<svg className="w-3.5 h-3.5 text-success-600 mr-1.5" fill="currentColor" viewBox="0 0 20 20"> <svg className="w-3.5 h-3.5 text-success-600 mr-1.5" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" /> <path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
</svg> </svg>
<span className="text-gray-700"><strong>Essential:</strong> Authentication, CSRF protection</span> <span className="text-gray-700"><strong>Essential:</strong> Authentication, CSRF protection</span>
</div> </div>
<div className="flex items-center text-xs"> <div className="flex items-center text-xs">
<svg className="w-3.5 h-3.5 text-primary-600 mr-1.5" fill="currentColor" viewBox="0 0 20 20"> <svg className="w-3.5 h-3.5 text-primary-600 mr-1.5" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" /> <path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
</svg> </svg>
<span className="text-gray-700"><strong>Analytics:</strong> PostHog for website analytics</span> <span className="text-gray-700"><strong>Analytics:</strong> PostHog & Google Analytics</span>
</div>
</div>
</div> </div>
</div> </div>
{/* Actions */}
<div className="flex gap-2">
<Button
variant="outline"
onClick={handleDecline}
size="sm"
className="flex-1"
>
Decline
</Button>
<Button
variant="primary"
onClick={handleAccept}
size="sm"
className="flex-1"
>
Accept All
</Button>
</div>
</div> </div>
</div> </div>
{/* Actions */} <style jsx>{`
<div className="flex gap-2">
<Button
variant="outline"
onClick={handleDecline}
size="sm"
className="flex-1"
>
Decline
</Button>
<Button
variant="primary"
onClick={handleAccept}
size="sm"
className="flex-1"
>
Accept All
</Button>
</div>
</div>
</div>
<style jsx>{`
@keyframes slide-in { @keyframes slide-in {
from { from {
transform: translateX(-100%); transform: translateX(-100%);

View File

@ -12,15 +12,29 @@ export function PostHogPageView() {
useEffect(() => { useEffect(() => {
const cookieConsent = localStorage.getItem('cookieConsent'); const cookieConsent = localStorage.getItem('cookieConsent');
if (cookieConsent === 'accepted' && pathname && (posthog as any)._loaded) { if (cookieConsent === 'accepted' && pathname) {
let url = window.origin + pathname; // If posthog is loaded, capture immediately
if (searchParams && searchParams.toString()) { if ((posthog as any)._loaded) {
url = url + `?${searchParams.toString()}`; let url = window.origin + pathname;
} if (searchParams && searchParams.toString()) {
url = url + `?${searchParams.toString()}`;
}
posthog.capture('$pageview', { posthog.capture('$pageview', {
$current_url: url, $current_url: url,
}); });
} else {
// If not loaded yet, wait for it
posthog.onFeatureFlags(() => {
let url = window.origin + pathname;
if (searchParams && searchParams.toString()) {
url = url + `?${searchParams.toString()}`;
}
posthog.capture('$pageview', {
$current_url: url,
});
});
}
} }
}, [pathname, searchParams]); }, [pathname, searchParams]);
@ -28,13 +42,7 @@ export function PostHogPageView() {
} }
export function PostHogProvider({ children }: { children: React.ReactNode }) { export function PostHogProvider({ children }: { children: React.ReactNode }) {
const [initializationAttempted, setInitializationAttempted] = useState(false);
// Initialize PostHog once
useEffect(() => { useEffect(() => {
if (initializationAttempted) return;
setInitializationAttempted(true);
const cookieConsent = localStorage.getItem('cookieConsent'); const cookieConsent = localStorage.getItem('cookieConsent');
if (cookieConsent === 'accepted') { if (cookieConsent === 'accepted') {
@ -62,7 +70,7 @@ export function PostHogProvider({ children }: { children: React.ReactNode }) {
} }
} }
} }
}, [initializationAttempted]); }, []);
return ( return (
<> <>

View File

@ -3,12 +3,19 @@
import { Suspense } from 'react'; import { Suspense } from 'react';
import { ToastContainer } from '@/components/ui/Toast'; import { ToastContainer } from '@/components/ui/Toast';
import AuthProvider from '@/components/SessionProvider'; import AuthProvider from '@/components/SessionProvider';
import { PostHogProvider } from '@/components/PostHogProvider'; import { PostHogProvider, PostHogPageView } from '@/components/PostHogProvider';
import CookieBanner from '@/components/CookieBanner'; import CookieBanner from '@/components/CookieBanner';
import GoogleAnalytics from '@/components/analytics/GoogleAnalytics';
import FacebookPixel from '@/components/analytics/FacebookPixel';
export function Providers({ children }: { children: React.ReactNode }) { export function Providers({ children }: { children: React.ReactNode }) {
return ( return (
<PostHogProvider> <PostHogProvider>
<Suspense fallback={null}>
<PostHogPageView />
<GoogleAnalytics />
<FacebookPixel />
</Suspense>
<AuthProvider> <AuthProvider>
{children} {children}
</AuthProvider> </AuthProvider>

View File

@ -0,0 +1,64 @@
'use client';
import Script from 'next/script';
import { usePathname, useSearchParams } from 'next/navigation';
import { useEffect } from 'react';
export default function GoogleAnalytics() {
const pathname = usePathname();
const searchParams = useSearchParams();
const GA_MEASUREMENT_ID = process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID;
useEffect(() => {
if (!GA_MEASUREMENT_ID) return;
const cookieConsent = localStorage.getItem('cookieConsent');
if (cookieConsent !== 'accepted') return;
const url = pathname + (searchParams?.toString() ? `?${searchParams.toString()}` : '');
if (typeof window.gtag !== 'undefined') {
window.gtag('config', GA_MEASUREMENT_ID, {
page_path: url,
});
}
}, [pathname, searchParams, GA_MEASUREMENT_ID]);
const cookieConsent = typeof window !== 'undefined' ? localStorage.getItem('cookieConsent') : null;
if (!GA_MEASUREMENT_ID || cookieConsent !== 'accepted') {
return null;
}
return (
<>
<Script
strategy="afterInteractive"
src={`https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`}
/>
<Script
id="google-analytics"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GA_MEASUREMENT_ID}', {
page_path: window.location.pathname,
});
`,
}}
/>
</>
);
}
// Add gtag to window object for TypeScript
declare global {
interface Window {
gtag: (command: string, id: string, config?: any) => void;
dataLayer: any[];
}
}

View File

@ -0,0 +1,40 @@
# Backlink Toxicity Remediation Report - qrmaster.net
## Audit Summary
A recent backlink audit revealed a **Medium Toxicity Score** with approximately **44 toxic domains** and **10 potentially toxic domains** pointing to `qrmaster.net`.
## High-Risk Domains Identified
The following domains were flagged as primary offenders:
| Domain | Toxicity Reason | Recommendation |
| :--- | :--- | :--- |
| `your-directory.com` | Low-quality web directory spam | Disavow |
| `webdirectory11.com` | Automated link farm / Directory spam | Disavow |
| `worlds-directory.com` | Irrelevant directory listing | Disavow |
| `robustdirectory.com` | Low-authority "link dump" site | Disavow |
| `directory-nation.com` | Spammy business listing directory | Disavow |
| `runningwebsites.net` | Link farm ("Where to buy aged domains") | Disavow |
| `aboutyoublog.com` | Automated blog network spam | Disavow |
| `blog-gold.com` | Automated blog network spam | Disavow |
| `activoblog.com` | Automated blog network spam | Disavow |
| `uaewebdirectory.info` | Low-quality directory spam | Disavow |
| `hebagh.cv` | Low-quality directory spam | Disavow |
## Root Cause Analysis
The majority of toxic links originate from **automated web directories** and **social bookmarking sites**. These are often the result of:
1. **Legacy SEO tactics:** Old-school "mass submission" tools.
2. **Negative SEO:** Third-party attempts to associate the site with low-quality neighborhoods.
3. **Automated scrapers:** Low-quality sites scraping content and automatically linking back.
## Remediation Actions Taken
1. **Disavow File Generated:** A standard `google_disavow_2026_02_09.txt` has been created.
2. **Strategy Update:** "Off-Page Risk Management" has been integrated into the long-term SEO plan.
## Next Steps for User
1. **Download:** [google_disavow_2026_02_09.txt](file:///c:/Users/a931627/Documents/QRMASTER/google_disavow_2026_02_09.txt)
2. **Upload:** Go to the [Google Disavow Tool](https://search.google.com/search-console/disavow-links).
3. **Select Property:** Select `https://www.qrmaster.net`.
4. **Confirm:** Upload the text file.
> [!WARNING]
> The Disavow tool is an advanced feature. Only use it to disavow links that are clearly spammy or low-quality. Mistakes can negatively impact your rankings.