...
...
...
...
...
CPD Integration for Experify
Customer Data Platforms (CDPs) are an important part of the modern marketer’s tech stack. As a third-party service that your website visitors will interact with, Experify enables you to augment a visitor's CDP record with event data reflecting the visitor’s usage of your Experify offering. This data can be useful for various reasons:
...
The below documentation describes the technical integration of this functionality.
Sending Experify events to data collectors
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
We use the command pattern for configuration and execution of custom event handlers. |
Setup
Create a file experifyEventTracking.js
and include it in your website. Make sure that the experify.js
script will be loaded as well, together with potentially any other CDP-related scripts (such as e.g. Klaviyo's klaviyo.js
or Segment's analytics.js
).
...
(We suggest adding your Experify event tracking to such a separate javascript file for easier maintainability, but ultimately it is up to you where you add the needed code, and strictly speaking, creating experifyEventTracking.js
isn’t necessary.)
Initialize Experify Tracking
Initialize the global ExperifyApi
object. This object must be initialized before any handlers (see below) are registered.
Code Block | ||
---|---|---|
| ||
ExperifyApi = window["ExperifyApi"] || []; |
Define callback functions
In order to track events with the below handlers, you will have to define the callback function that should be executed when an event happens and send associated event data to your data collector.
...
Below are simple callback function examples for two famous CDPs. Define these, or any other callback function you want to use, in experifyEventTracking.js.
Example Callback 1: Send event data to Klaviyo
If you want to send data to your Klaviyo CDP, and you already have the klaviyo.js installed on your website, a simple callback function to associate the Experify event with your CDP record could look something like this:
...
Please note the Klaviyo developer documentation.
Example Callback 2: Send event data to Segment
If you want to send data to your Segment CDP, and you already have the Segment analytics.js installed on your website, a simple callback function to associate the Experify event with your CDP record could look something like this:
...
Clearly, you can define whatever callback function you like, above are just two simple examples.
Available Event types
Below you will find a list of available event types that can be sent to your data collector.
openedExperifyPlugin
Fires when Experify Plugin is opened by the user (for example by clicking the button).
...
Code Block | ||
---|---|---|
| ||
{ "eventName": "openedExperifyPlugin", "timestamp": 1681803782584 //Event timestamp millis } |
clickedExperifyUserStory
Fires when user clicked any profile inside Experify Plugin.
...
Code Block | ||
---|---|---|
| ||
{ "eventName": "clickedExperifyUserStory", "timestamp": 1681803782584 //Event timestamp millis } |
sentContactRequest
Fires when new contact request is sent, so new conversation has started.
...
Code Block | ||
---|---|---|
| ||
{ "eventName": "sentContactRequest", "timestamp": 1681803782584 //Event timestamp millis } |
Example experifyEventTracking.js
Here is an example experifyEventTracking.js
, assuming you want to track events openedExperifyPlugin
and clickedExperifyUserStory
and sentContactRequest
and you are using Klaviyo as your CDP.
...