Legal Compliance Required: LeadPulse tracking waits for explicit user consent by default. You MUST integrate this with your cookie banner to comply with GDPR (EU), NDPR (Nigeria), and other privacy regulations.
Overview
LeadPulse follows Google Consent Mode v2 standards, ensuring compliance with global privacy laws including:
- GDPR (General Data Protection Regulation - EU)
- NDPR (Nigeria Data Protection Regulation)
- CCPA (California Consumer Privacy Act - USA)
- LGPD (Lei Geral de Proteção de Dados - Brazil)
How LeadPulse Consent Works
Key Features
- Default Deny: Tracking is DISABLED until user grants consent
- Event Queueing: Events held in memory (not sent to server) until consent
- After Consent: Tracking starts immediately, queued events are sent
- Revoke Consent: Tracking stops, all stored data (cookies, localStorage) cleared
Integration Methods
Custom Cookie Banner
<!-- Your cookie banner -->
<div id="cookie-banner">
<p>We use cookies to improve your experience.</p>
<button id="accept-btn">Accept All</button>
<button id="reject-btn">Reject</button>
</div>
<script>
// When user accepts cookies
document.getElementById('accept-btn').addEventListener('click', function() {
if (window.LeadPulse) {
window.LeadPulse.grantConsent();
}
document.getElementById('cookie-banner').style.display = 'none';
});
// When user rejects cookies
document.getElementById('reject-btn').addEventListener('click', function() {
if (window.LeadPulse) {
window.LeadPulse.revokeConsent();
}
document.getElementById('cookie-banner').style.display = 'none';
});
</script>OneTrust Integration
<script>
window.addEventListener('consent.onetrust', function() {
const OnetrustActiveGroups = window.OnetrustActiveGroups || '';
const hasAnalyticsConsent = OnetrustActiveGroups.includes('C0002');
if (window.LeadPulse) {
window.LeadPulse.updateConsent(hasAnalyticsConsent);
}
});
</script>Cookiebot Integration
<script>
window.addEventListener('CookiebotOnConsentReady', function() {
if (window.Cookiebot && window.LeadPulse) {
window.LeadPulse.updateConsent(window.Cookiebot.consent.statistics);
}
});
window.addEventListener('CookiebotOnAccept', function() {
if (window.Cookiebot && window.LeadPulse) {
window.LeadPulse.updateConsent(window.Cookiebot.consent.statistics);
}
});
</script>API Reference
LeadPulse.grantConsent()
Starts tracking and sends all queued events.
if (window.LeadPulse) {
window.LeadPulse.grantConsent();
}LeadPulse.revokeConsent()
Stops tracking and clears all stored data.
if (window.LeadPulse) {
window.LeadPulse.revokeConsent();
}LeadPulse.updateConsent(granted: boolean)
Updates consent state based on boolean value.
if (window.LeadPulse) {
window.LeadPulse.updateConsent(userAcceptedCookies);
}Testing Your Integration
- Open an incognito/private window
- Open DevTools Console (F12)
- Verify you see:
[LeadPulse] Waiting for explicit consent... - Accept cookies on your banner
- Verify you see:
[LeadPulse] Consent granted, initializing tracking - Check Network tab for requests to
marketsage.africa/api/leadpulse
Legal Compliance
What Data Does LeadPulse Collect?
With Consent:
- Visitor ID (anonymous identifier)
- Browser fingerprint (user agent, screen size, timezone)
- Page views and navigation
- Click events and interactions
- UTM parameters
Without Consent:
Nothing. Zero data collection, zero network requests, zero cookies.