Page text and typed form values
Browser SDK v0.1.0
Install traffic-quality tracking with privacy as the default.
The asynchronous ClickGuardIQ loader waits for consent, minimizes URLs, excludes page and form content, and provides delivery diagnostics without exposing visitor payloads.
Step 01
Add the versioned asynchronous loader.
Place the snippet in the site head. Replace the public project token and policy version with values issued for this website. A browser token identifies a project; it is never an administrative secret.
<script
async
src="https://cdn.clickguardiq.com/sdk/v1/loader.js"
data-project-token="YOUR_PUBLIC_PROJECT_TOKEN"
data-endpoint="https://events.clickguardiq.com/v1/events"
data-privacy-policy-version="YOUR_POLICY_VERSION"
></script>Content Security Policy: allow the versioned CDN in script-src and the event host in connect-src.
Step 02
Connect the website's consent decision.
Collection begins only after analytics or fraud-prevention consent is granted. If both remain unknown or denied, the SDK makes no event, storage, or network request.
window.addEventListener("clickguardiq:ready", function () {
window.ClickGuardIQ.setConsent({
analytics: "granted",
fraud_prevention: "granted",
recording: "denied"
});
window.ClickGuardIQ.page({ reason: "consent_granted" });
});Revoking both collection purposes clears the in-memory queue and SDK-owned identifiers. Do Not Track is respected by default. Recording is a reserved, separately governed purpose and this SDK does not capture session replay.
Step 03
Verify the client state and delivery attempt.
window.ClickGuardIQ.getDiagnostics();
await window.ClickGuardIQ.flush();Diagnostics show only SDK version, running and consent state, queue size, sent and dropped counts, and the latest transport error. Browser delivery and durable server acceptance are separate health states; successful queuing is never presented as proof that data reached analytics.
Data boundary
What this SDK deliberately excludes.
Input names and CSS selectors
Cookies and storage contents
Authentication, card, email, and phone fields
URL fragments and non-allowlisted query parameters
Session-replay images or interaction frames
Next check
Review tracking health before relying on new data.
Validate the configured origin, consent coverage, latest accepted event, and downstream freshness as separate checkpoints.
Understand tracking health