Custom
An event with a custom type, not related to any of the existing types.
Here's an example of a Custom:
- Javascript
- Swift
- Kotlin
- Java
- Objective-C
pcdp("event", "track", {
"type": "customMobileLogin",
"clientId": "kevel",
"siteId": "kevel.com",
"customFields": {
"debug": "true",
"role": "superuser"
}
})
import VelocidiSDK
let trackingEvent = [
"type": "customMobileLogin",
"clientId": "kevel",
"siteId": "kevel.com",
"customFields": [
"debug": "true",
"role": "superuser"
]
] as [String: Any]
VSDKVelocidi.sharedInstance().track(trackingEvent, userId: userId)
@import VelocidiSDK;
NSDictionary *trackingEvent = @{
@"type" : @"customMobileLogin",
@"clientId" : @"kevel",
@"siteId" : @"kevel.com",
@"customFields" : @{
@"debug" : @"true",
@"role" : @"superuser"
}
};
[VSDKVelocidi.sharedInstance track: trackingEvent userId: userId]
import org.json.*
import com.velocidi.Velocidi
val trackingEvent = mapOf(
"type" to "customMobileLogin",
"clientId" to "kevel",
"siteId" to "kevel.com",
"customFields" to mapOf(
"debug" to "true",
"role" to "superuser"
)
)
Velocidi.getInstance().track(userId, JSONObject(trackingEvent))
import org.json.*;
import com.velocidi.Velocidi;
JSONObject trackingEvent = new JSONObject()
.put("type", "customMobileLogin")
.put("clientId", "kevel")
.put("siteId", "kevel.com")
.put("customFields", new JSONObject()
.put("debug", "true")
.put("role", "superuser")
);
Velocidi.getInstance().track(userId, trackingEvent);
In more detail, the fields supported on every Custom are:
Field | Required | Type | Default | Example | Description |
---|---|---|---|---|---|
type | required | string | "customMobileLogin" | A single-word identifier beginning with custom , limited to 64 characters. Only letters (A-Z , a-z ) and numbers (0-9 ) are permissible; no whitespace, special, or accented characters are allowed. | |
customType | string | "setReminder" | (Deprecated) Use type to define the custom event type. | ||
clientId | string | "kevel" | The client identifier. | ||
siteId | string | "kevel.com" | The client's site identifier. | ||
customFields | object of string | {...} | An object with custom fields for extra metadata to be supplied in the event. The values within this object must all be strings. | ||
facebookConversionTracking | Facebook Conversion Tracking Details | {...} | A description of a tracking event to send to Facebook using Facebook Conversions API. |
Facebook Conversion Tracking Details
A description of a tracking event to send to Facebook using Facebook Conversions API.
Field | Required | Type | Default | Example | Description |
---|---|---|---|---|---|
pixel_id | string | "396622227884531" | The pixel ID to associate this Facebook tracking event with. | ||
event_id | string | "0c53d0b57" | ID used to deduplicate events sent by both Facebook Pixel and Conversions API. More information about the usefulness of this ID is available at https://developers.facebook.com/docs/marketing-api/server-side-api/using-the-api/deduplicate-pixel-and-server-side-events. | ||
event_name | string | "AddToCart" | A Facebook pixel Standard Event or Custom Event name. This field is used to deduplicate events sent by both Facebook Pixel and Conversions API. The available Standard Events are listed in https://developers.facebook.com/docs/facebook-pixel/reference#standard-events. | ||
custom_data | object | {...} | Parameters to send additional data Facebook can use for ads delivery optimization. More information about the fields that can be supplied here is available at https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data. |