Examples
This page provides a central index for various code examples demonstrating how to implement and configure the Zeotap Web SDK for different use cases. Each example includes a link to the relevant code or a live demonstration page.
You can use these examples as a starting point and reference for your own implementation. Remember to replace "YOUR_WRITE_KEY" with your actual Zeotap Write Key when testing these examples locally.
| Use Case | Description | Link |
|---|---|---|
| Quick Start | Basic SDK integration and core functionalities (identify, track page/event). | View Example |
| setUserIdentities (Raw PII) | Send raw, unhashed user identifiers (like email) directly to Zeotap. | View Example |
| setUserIdentities (Hashed PII) | Send pre-hashed user identifiers (like SHA-256 email) to the SDK. | View Example |
| setUserIdentities (SDK Hashing) | Send raw identifiers and have the SDK perform the hashing client-side. | View Example |
| setEventProperties | Track specific user actions or events (e.g., 'AddToCart'). | View Example |
| setPageProperties | Send details about the current page being viewed by the user. | View Example |
| setConsent (Default) | SDK's default behavior when no specific consent mechanism is configured. | View Example |
| setConsent (Custom) | Manually manage user consent using the setConsent API call. | View Example |
| setConsent (GDPR/TCF) | How the SDK integrates with TCF 2.0 Consent Management Platforms (CMPs). | View Example |
| persistenceInCookieStorage | Control where the data is stamped | View Example |