How to generate JS API script
This essential integration uses a JavaScript snippet, a block of code inserted into your website. It’s a low-impact way to send data to Wooxy.com — through your users’ web browsers. While an API integration is more flexible, this is a quick way to get started.
Things to know before you start:
- We only track activity for users registered on your website after the JS Script is called.
- We do not track anonymous or unregistered user activity.
- To update an existing user’s variables, send the JS API call again. You must include their identification and any new attribute values.
- If the variables already exist in their profile, we’ll overwrite them.
- If there are any new variables included in the call, we’ll add them to the profile.
- We do not edit the user’s identification method if the contact is already added to the contact list.
- A JavaScript API makes it easy to get started but isn’t essential. You may do everything through our REST API.
Step-by-step instructions:
Navigate to the Integrations page (Menu -> Integrations).
Select the “JS code” section.
Click the “Add website” button.
Select the domain name in the header drop-down menu.
Select options and permissions from checkboxes. The code will change depending on the selected options.
Click the “Save” button.
In the opened tab, please copy the code and paste it on the desired page into your HTML.
You can place the same code on several pages – then all the subscribers will be collected in a Default Contact List.
- IMPORTANT: Keep in mind that at least one unique user identification ( userId| email | phoneNumber ) is required so Wooxy.com could match the contact with the one hosted in the Contact List.
Download and extract Worker File from the archive and add it to the root directory of your website
- Alternatively, email all the settings to your Developer if you have a problem adding this code to the website.
IMPORTANT: Include JS initialization and user identification snippets on every page in your website immediately before the closing tag to initialize JS API and identify your user.
Options and Permissions | Description |
WebPush | Enable Web Push Prompt API method to propose your users to subscribe to Push Notifications in one click. |
Contact create | You can create new contacts in the contact list. |
Contact update | You can update data in already added contacts. |
Event | You can fire an event and send its data to Wooxy.com. |
IMPORTANT: After generating JS code snippets you can work only with contacts from the default Contact List.