Skip to content

JavaScript API

The snippet exposes window.pingado once it has loaded, and fires a pingado:ready event on window.

window.addEventListener('pingado:ready', () => {
console.log(window.pingado.vid())
})
Function What it does
pingado.vid() The visitor ID, or null without analytics consent. Pass it to your server when you create checkouts.
pingado.lead(email, { fire, firstName, lastName }) Records a lead. fire: true also sends it to the browser pixels. The email and name are masked and hashed in the browser. Returns the lead’s event ID.
pingado.identify(email, { firstName, lastName }) Tells Pingado who the visitor is without recording a lead, for example after sign-in.
pingado.confirm(provider, orderId) Confirms an order outside a confirmation URL.
pingado.checkoutUrl(url) Returns a checkout URL with the visitor ID added, for checkout links built in JavaScript.
pingado.linkUrl(url) Returns a link to your other domain with the visitor added. See Cross-domain tracking.