Tracking with Custom Events

Custom events are your own defined event that you can use to extend the default triggers of Drips.

Table of Contents


Introduction

Custom events help you follow subscriber actions beyond the standard Voyage events. Here are the steps for getting started.

Create Custom Event

Navigating to Custom Events

 

navigating-to-custom-event

  1. Click Settings from the left tab 
  2. Click Events from settings tab
  3. Click + NEW EVENT

Custom Event Creation

Form Definitions

Name of your custom which can be anything. (e.g., 'product review tracking')
Name Description Data Type Delete
Name of the attribute Reference details about the attribute Data type for the attribute Delete the attribute

 

Implement Custom Events

To trigger custom event from any page of your site you need to copy the script shown below your event and place it in your page with relevant dynamic value.

Voyage JavaScript

Note: Requires the Voyage Global Tag to be installed.

Find a limited list of Common Examples to utilize Custom Events to trigger Drips from a variety of platforms.


APIScreen Shot 2021-03-08 at 10.28.12 AM


Use Custom Events With Drips

  • From your Drips trigger you will find your custom event inside Custom category

 

  • In message composer of Drips you can use the attributes value you defined while creating event

 

 

Learn more about creating a Drip here


Integrating with Custom Events (A2A)

Application-to-Application (A2A) usage is supported for integrating third-party applications with Voyage.

API Keys

Under Settings -> Advanced -> API Keys, each client can create individual API keys which must be included in the header of the request.

API Details

With this method, events can be published with either Phone Number or Voyage Subscriber ID.

Request

phone: [string] Phone Number for the subscriber (e.g. "+15555555555")

subscriberId: [string] Voyage-specific identifier for the subscriber

POST /api/v1/customEvent HTTP/1.1
Host: api.voyagetext.com
Accept: application/json
Content-Type: application/json
x-api-key: <API_KEY>

{
"eventTypeId": <EVENT_ID>,
"phone": "<PHONE_NUMBER>",
"eventMeta": {
"productName": "Name",
"customerName": "Name",
"rating": 199
}
}
{
"eventTypeId": <EVENT_ID>,
"subscriberId": "<VOYAGE_SUBSCRIBER_ID>",
"eventMeta": {
"productName": "Name",
"customerName": "Name",
"rating": 199
}
}

 

Examples

cURL

curl -d '{
"eventTypeId": <EVENT_ID>,
"phone": "<PHONE_NUMBER>",
"eventMeta": {
"productName": "Name",
"customerName": "Name",
"rating": 199
}
}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: <API_KEY>' \
https://api.voyagetext.com/api/v1/customEvent

Custom Event Schema

Custom events are defined with standard JSON schemes, which are well documented at json-schema.org. Configuring a custom event in the Voyage API ultimately generates a schema that looks very much like the included example. This schema will later be used by the system to validate incoming event data.
If there are more complex data structures, such as embedded lists, nullables or objects you will need to develop a custom schema as our tool currently only supports single dimensional objects. Please contact service@voyagesms.com if you would like to implement a more complex custom event.

Embedded objects and lists cannot be used to personalize messages at this time

 

 
Please see below for an example of a more complex Custom Event schema: 
{
 "$id": "https://voyagesms.com/custom.event.schema.json",
 "type": "object",
 "$schema": "http://json-schema.org/draft-04/schema#",
 "required": ["name", "age", "img"],
 "properties": {
   "age": {
     "use": "number",
     "type": "number",
     "title": "age",
     "description": "Age"
   },
   "img": {
     "use": "image",
     "type": [ "string", "null"]
     "title": "img",
     "format": "uri",
     "description": "Picture"
   },
   "name": {
     "use": "text",
     "type": "string",
     "title": "name",
     "description": "Name"
   }
 },
 "description": "Customevent"
}

 

 

Integration Partners

For integration partners, standardized events can be created to apply across multiple clients. Please contact service@voyagesms.com for more information on how to get started.