Call a function
Put your code insidemetricanicCallback:
Functions
Connect buttons added later
When the page loads, the script connects links tohttps://<tracking domain>/click and elements with data-dtp-link, including buttons. After a popup, quiz or page builder adds buttons, call:
Build your own offer button
Pass the click ID to a form
Save the click ID with the lead so your CRM can send events for this visit later:Send an event
- Configure the Event ID in the campaign’s 2. Events tab. See Decide what counts as a conversion.
- Without
txuid, every call adds a new event. Use a fixedtxuidfor steps that must count once, such as'form-open'. - Visitors can see and change browser requests. Send revenue from your server or affiliate network instead.
- Check the result in Events.
Handle a failed start
Add an error handler
Add an error handler
Use
onError if your page needs to respond when tracking cannot start: