Each API contains the exact script to paste into your header as well as any config instructions. The two most important are below.
1. Dynamic Content (in case you want labelling)
Users interact with your webpage using input elements, and anything they enter into these elements can be used for labelling. By default our scripts pick up the first element that is of type="email". Here's the first email element on this page:
F12 will confirm; you'll see an input type="email".
So anything you type here gets automatically captured in our data packet.
If you would rather use a different input element on your webpage you can over-ride the default by giving the identity of that element by including the following language:
2. Buttons (in case you want to force the timing of data send)
As soon as the user leaves the page the data packet sends, but any button of type="submit" also triggers that send. Here's one:
F12 will again confirm.
Click it, fire off a data packet and you'll see the top of this page populate.
You might want to over-ride the default button trigger. To do this you specify the text of new trigger-button in the script by naming a locator.selector. For this page and button the additional language would look like this: