Reference
Last updated
Last updated
Method | Description |
---|---|
Lists all the available methods,
Lists all the available properties on get
and set
,
Lists all the available events on on
and off
.
These methods are used for authentication. Please see the dedicated Help Center article : https://help.iadvize.com/hc/articles/6043078724626
iAdvize.get
takes a single property argument, and returns the associated value. Properties are keys that reference values that can change over time. These values can be accessed :
directly, using iAdvize.get
(ex: iAdvize.get('visitor:cookiesConsent')
)
when they change, using iAdvize.on (ex: iAdvize.on('visitor:cookiesConsentChange', callback)
)
Set editable properties.
Listen to a property change.
iAdvize.on
takes two arguments :
The name of an event,
A callback that takes the associated event value and the previous value as parameter.
Every property available on iAdvize.get
also has a corresponding event (iAdvize.on('{property}Change', (value, previousValue) => {...})
).
iAdvize.off
takes the same arguments to remove the event listener.
Some specific events can be listened with the on
method :
Allows to record transactions. See the dedicated article on the Help Center: https://help.iadvize.com/hc/en-gb/articles/206375538
If part of your web site is built using SPA technology that does not update your browser's history (=your site's url does not change, even though the page displayed to the visitor does), you can simulate a page change using the iAdvize.navigate("YOUR_PATH")
method.
This will restart iAdvize's targeting engine to take into account the new URL/path value you enter as parameter.
Property | Description | Values |
---|---|---|
Property | Description | Values |
---|---|---|
Event name | Description | Values |
---|---|---|
Argument | Type | Description |
---|---|---|
Displays a list of available commands in the console
Activates the tag with an identity or removes an identity, effectively stopping the tag.
Needed when authentication is enabled.
Getters for retrieving public properties
Getters for defining public properties
Event listeners to watch for changes of specific properties
Inform iAdvize that a transaction has occurred on your website
Changes the current screen and restart the tag, allowing a new targeting run
chatbox:status
The status of the chatbox
OPENED
, REDUCED
, CLOSED
(default)
conversation:id
The id of the conversation
string
, null
(default)
tag:version
The tag version
"LIGHT"
, "FULL"
visitor:cookiesConsent
Whether the visitor consented to cookies or not
true
, false
, null
(default)
visitor:GDPRConsent
Whether the visitor consented to GDPR or not
true
, false
, null
(default)
visitor:sourceId
The ID of the visitor
string
, null
(default)
engagementRules:triggered
Get all the triggered rules id on the page
string[]
Array of ids of engagement rules
engagementNotifications:displayed
Get all the notifications displayed on the page
object[]
type: "BADGE"
, "CLASSIC"
, "MESSAGING"
, "INVITATION"
, "MINI_BADGE"
, "CHATBOX"
, "MESSAGE"
, "CUSTOM_BUTTON"
, "EMBEDDED_CONVERSATION_STARTER"
id: string
ruleId: string
channels: ["CHAT", "CALL", "VIDEO", "MESSENGER", "SMS", "WHATSAPP"]
visitor:cookiesConsent
Whether the visitor consented to cookies or not
true
, false
visitor:GDPRConsent
Whether the visitor consented to GDPR or not
true
, false
engagementRule:triggered
Called when an engagement rule is triggered on the page
string
Id of engagement rule
engagementNotification:displayed
Triggered when a notification is displayed on the page
object
type: "BADGE"
, "CLASSIC"
, "MESSAGING"
, "INVITATION"
, "MINI_BADGE"
, "CHATBOX"
, "MESSAGE"
, "CUSTOM_BUTTON"
, "EMBEDDED_CONVERSATION_STARTER"
id: string
ruleId: string
channels: ["CHAT", "CALL", "VIDEO", "MESSENGER", "SMS", "WHATSAPP"]
engagementNotification:clicked
Triggered when the notification is clicked
object
type: "BADGE"
, "CLASSIC"
, "MESSAGING"
, "INVITATION"
, "MINI_BADGE"
, "CUSTOM_BUTTON"
, "EMBEDDED_CONVERSATION_STARTER"
id: string
ruleId: string
channel: "CHAT", "CALL", "VIDEO", "MESSENGER", "SMS", "WHATSAPP"
text: string
(is only filled for the starters, otherwise null)
path
String
Path/URL you wish to tell iAdvize where the visitor is "virtually" browsing