Install the script
Add one script tag to every page that has an order form.
Add the script tag#
Replace pk_xxxxx with your publishable key, and place the tag anywhere in the page.
<script
src="https://js.antiro.io/v2/antiro.js"
data-key="pk_xxxxx"
async></script> The tag loads with async, so it does not delay the page. A second copy of the script on the same page does nothing.
Attributes#
- data-key string Required
Your store’s publishable key.
- data-forms off
Stops the script from checking the order button. See Integration modes.
- data-lang string
The language of the messages a shopper can see: values starting with
argive Arabic, any other value gives French. By default the script uses the page’slangattribute, then the browser’s language.
Thank-you pages#
If your thank-you page fires a purchase event, add the script there too, so that ad pixel protection covers that event.
Check the installation#
- Open your order page and the browser console.
- Run
Antiro.version. It should return3.0.0. - Click into a field of the order form, then run
Antiro.token(). It should return a value, and the form should now hold the same value in a hiddenantiro_tokenfield.
If the value stays empty, check data-key and the allowed domains of your store.