Cookie Test Page
๐งช Cookie System Test Page
Test cookie consent functionality
๐ Debug Information
Open your browserโs Developer Console (F12) to see debug messages.
Test Steps:
- Open Console (F12 โ Console tab)
- Refresh this page
- Look for these messages:
Initializing cookie consent system...
Cookie consent system starting up...
Loading Microsoft Clarity
- Current consent data
- Test Cookie Banner:
- If no consent given โ Banner should appear
- Click โAcceptโ โ Should see
User accepted all cookies
- Check for
Loading Google Analytics with ID: G-BH9P4LY6E7
- Check Network Tab:
- Look for requests to:
googletagmanager.com/gtag/js?id=G-BH9P4LY6E7
clarity.ms/tag/t4k6d20q9f
- Look for requests to:
๐ ๏ธ Manual Test Commands
Copy and paste these into your console:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Check if cookie consent system is loaded
console.log('Cookie consent system:', window.cookieConsent);
// Check current consent
console.log('Current consent:', window.cookieConsent?.consentData);
// Check if Google Analytics is loaded
console.log('Google Analytics loaded:', !!window.gtag);
// Check if Microsoft Clarity is loaded
console.log('Microsoft Clarity loaded:', !!window.clarity);
// Force reload analytics (if consented)
if (window.cookieConsent && window.cookieConsent.hasConsent('analytics')) {
window.cookieConsent.loadGoogleAnalytics();
}
// Clear all cookies and reload (reset test)
// CookieConsent.revokeConsent();
๐ Expected Behavior
โ Microsoft Clarity (Always Loads)
- Should load immediately on page load
- Console message:
Loading Microsoft Clarity
- Network request to
clarity.ms
โ Google Analytics (Only with Consent)
- Should load only after accepting analytics cookies
- Console message:
Loading Google Analytics with ID: G-BH9P4LY6E7
- Network request to
googletagmanager.com
โ Cookie Banner
- Shows on first visit
- Disappears after making choice
- Floating settings button appears after consent
๐จ Common Issues
- No console messages โ Script not loading
- GA ID not found โ Meta tag missing
- Scripts not loading โ Check browser console for errors
- Banner not showing โ Check if consent cookie already exists
๐ง Debugging Tips
- Clear all cookies for this domain to reset
- Use incognito/private mode for fresh testing
- Check Network tab for failed requests
- Verify console for JavaScript errors