Skip to main content
You’ll have the Web JS SDK collecting events in under five minutes. The three steps:
1

Create a Web JS Source

In the Zeotap CDP, create a Source of category Website Events with data source Web JavaScript. From the IMPLEMENTATION DETAILS tab, copy the snippet and the write_key.Full walkthrough: Create a Web JS Source.
2

Add the snippet to your site

Paste the snippet between <head> and </head> on every page you want to track. For single-page apps, add it to the root index.html.
<script type="text/javascript">
!function(e,t){var n=t.createElement("script");
n.type="text/javascript",n.crossorigin="anonymous",n.async=!0,
n.src="https://content.zeotap.com/sdk/zeotap.min.js",
n.onload=function(){};
var s=t.getElementsByTagName("script")[0];
s.parentNode.insertBefore(n,s);
function o(e,t,n){function s(t){e[t]=function(){
e[n].push([t].concat(Array.prototype.slice.call(arguments,0)))}}
for(var o=0;o<t.length;o++)s(t[o])}
var r=e.zeotap||{_q:[],_qcmp:[]};
o(r,["init","setEventProperties","setUserProperties","setPageProperties","setMetaProperties","setUserIdentities","unsetUserIdentities","setZI"],"_q");
o(r,["setConsent","addAskForConsentActionListener"],"_qcmp");
e.zeotap=r}(window,document);
</script>
<script type="text/javascript">
window.zeotap.init("YOUR_WRITE_KEY");
</script>
Replace YOUR_WRITE_KEY with the value from the Source’s IMPLEMENTATION DETAILS tab.The snippet exposes window.zeotap globally and queues calls until the SDK has loaded — you can start calling methods immediately without waiting for onload.
3

Send your first event

Once the snippet is on the page, call any tracking method. The simplest smoke test:
zeotap.setPageProperties({ name: 'Home' });
zeotap.setEventProperties('pageView', { source: 'quickstart' });
Open your browser DevTools network tab and look for requests to spl.zeotap.com (or the regional equivalent). A 200 response means events are being accepted.To get console logs of every event as you test, initialize with debug: true:
window.zeotap.init("YOUR_WRITE_KEY", { debug: true });

Next steps

Configure init options

Set consent strategy, identity hashing, cookie storage, and other behaviors.

Capture user identities

Stitch events to profiles using email, phone, login ID, or custom identifiers.

Set up consent

Wire up TCF 2.0 or your own custom consent flow.

See examples

AMP support, GA cookie capture, common patterns.
Last modified on June 22, 2026