Documentation
SDK reference
ADT globals, custom events, attribution helpers, and Stripe metadata helpers.
The browser SDK loads as adt.js and exposes a global ADT object. Modules attach under namespaces (Session, Attribution, Pixels, …).
Loader
<script>
(function(w,d,s,l,i){
w[l]=w[l]||[];
w[l].push({'adt.start':new Date().getTime()});
var f=d.getElementsByTagName(s)[0],
j=d.createElement(s);
j.async=true;
j.src='https://cdn.getintently.io/adt.js?id='+i;
f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','YOUR_API_KEY');
</script>CDN base: https://cdn.getintently.io/. The id query param is your account API key.
ADT.Attribution
Loaded from the attribution collector module. Used for server-side destination routing and Stripe linking, it does not inject third-party ad pixels.
ADT.Attribution.getContext()
Returns click IDs / cookies for the current page, with sticky paid IDs (90-day localStorage):
fbp,fbc(buildsfbcfromfbclidwhen needed)gclid,ttclid,msclkid,liFatId,pinUnauth,scClickId
ADT.Attribution.getStripeCheckoutMetadata()
Call this on the checkout page. Returns { intently_session_id } for the current visitor. There is no id to copy from the Intently dashboard.
ADT.Attribution.getStripeCheckoutMetadataAsync()
Same as above, and also returns intently_user_hash when user tracking is on.
Pass that object as metadata when your server creates the Stripe Checkout Session. Payment Links use client_reference_id instead. Full steps: Stripe revenue.
ADT.Attribution.buildEventId(sessionId, eventName)
Helper for platform deduplication ids.
Sessions
ADT.Session owns session identity used on track calls. Prefer documented product settings for hash mode rather than hand-rolling hashes.
Custom events
Custom events are names you save under Settings → Advanced → Custom Events. The snippet sends one only after that name exists.
Event names use letters, numbers, and underscores (first_template). The same name is what you will see in the event log.
Manual
Leave When on Manual only. Call fire from your app at the moment the action succeeds. If the snippet is still loading, ADT.CustomEvents is not there yet, so keep the call for when it is:
function onTemplateCreated(template) {
const templateId = template.id;
function send() {
window.ADT.CustomEvents.fire('first_template', {
template_id: templateId,
});
}
if (window.ADT && window.ADT.CustomEvents) {
send();
return;
}
window.addEventListener('adt_ready', send, { once: true });
}adt_ready fires when config has loaded. Listen for it only as a fallback. If you add the listener after that moment, it will not run.
- Parameters saved on the event are included on every call.
- Keys you pass to
fireoverride those saved values. firereturnsfalseand sends nothing when the name is not in the saved list.adtFireCustomEvent(name, params)is the same call.
ADT.trackEvent(name, params) exists as soon as adt.js starts, before config loads. It sends the event. It does not merge parameters you saved under Custom Events. Use ADT.CustomEvents.fire when those saved parameters should be on the event.
Rules
Set When to Click, Page URL, Form submit, or Another event. The snippet fires the event when that signal happens, so the page does not need its own call. fire still works for that same name.
How often can be every time, once per page, once per session, or once per browser. Once per browser is stored in that browser.
A click rule needs a CSS selector. A URL pattern can use * as a wildcard and can match the path, the query string, or the hash (#/templates/*). A form rule can name a form selector, or match every form when the selector is empty. An event rule fires when another event, such as template_saved, is already on the data layer. A rule cannot listen for its own name.
Confirm the event in the event log. Server-only actions that the page never sees go through the Track API instead.
Destinations alias
ADT.Destinations is an alias of ADT.Pixels in the pixels module, configure destinations in the product UI; do not assume undocumented private APIs.
Debugging
- Confirm
window.ADTafter load - Settings → Debug (when available on your plan)
- Network tab: requests to Intently track / config endpoints on your API host
Next
- Event reference — events the snippet sends
- Install the snippet
- Tracking
- Track API & webhooks
- Stripe revenue