Experience Module Custom Mobile Integration

Experience Module Custom Mobile Integration

Custom Integration

Custom Integration (Backend Side) Guide and Restful API

Beta

This integration method is in beta and not recommended for frontend use. Please check other integration methods.


Introduction

This tutorial provides a very simple and quick introduction to the Dengage integration for custom applications by walking you through details of different events. Dengage has a RESTful API to feed important events like page/product information and visitor actions to the Dengage Engine.


Event Types

Dengage uses different event types for different visitor actions. You can define following events by using Dengage RESTful API:

EventDescriptionEvent Name
PageIt is send when a visitor views a pagePAGE_VIEW
ProductIt is send when a visitor views a productPRODUCT_VIEW
BasketIt is send when a visitor makes a basket action (add product to basket or remove product from basket)BASKET_OPERATIONS
CheckoutIt is send when a visitor makes a checkout action (views basket, enter customer information, enter payment information, finishes purchase)CHECKOUT
UserIt is send when a visitor makes a user action or use this event to update information about customersUSER_OPERATIONS
CustomIt is send when to identify any visitor action that has no predefined value in DengageCUSTOM_EVENT
InteractionIt is send when a visitor makes an interaction like click, view a widget, submit, etc.INTERACTION
FormIt is send when a visitor submits a form or surveyUSER_FORM
BannerIt is send when visitors views or clicks to bannersBANNER_VIEW or BANNER_OPERATIONS

Request Details

In order to use Dengage RESTful API, you must be make POST requests to your data center end point with event details at request body. Request body must be formed as a valid json array.

Dengage accounts have two important system variables used in integration: API KEY and Data Center. You can access these values from Integrations menu of Denage Panel:

System VariableDescription
Api Keyunique Dengagekey value to send events
Data Centerdata center end point to send Dengage events

To access Integrations menu of Dengage Panel, please login to your Dengage account and navigate to Settings > Integrations.

Request body should be a json array whose elements are Dengage events that will be described in the next sections, you can send multiple events with a single request.

Request Endpoint

Requests must be made to proper end point. Endpoint url format is like

Request Endpoint Format:

<DATA CENTER URL>/add/events/v1.json?apiKey=<APIKEY>

Data Center Url is account specific and you should use the end point shown at Integrations page under Account Settings.

Api Key is your account's unique key to send requests to Dengage RESTful Api, and you can learn your Api Key from Integrations page under Account Settings

Example Api Key:

XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Proper request end point is changing data center url and api key with your account specific value.


Request Headers

Dengage Restful API is based on json, so headers should match content type and response type.

All request should have the following headers:

HeaderValue
Content-Typeapplication/json
Acceptapplication/json

Request Body

Request body should be a json array whose elements are Dengage events that will be described in this document.

An example request body will be in this format:

[
    {
        "name": "PAGE_VIEW",
        "userId": "XXXXXXXXXXXXXXXXX",
        "sessionId": "YYYYYYYYYYYYYYYY",
        "device": "IOS",        
        "pageUrl": "http://www.exampleshop.com/",
        "referrer": "http://www.google.com/",
        "category": "Product Page",
        "subCategory": "Men > Sports"        
    },
    {
        "name": "PRODUCT_VIEW",
        "userId": "XXXXXXXXXXXXXXXXX",
        "sessionId": "YYYYYYYYYYYYYYYY",        
        "device": "IOS",
        "productId": "EXAMPLE_PRODUCT_1"        
    }
]

--

Response Details

RESTful API returns different status codes to show you status of your request. Summary of status codes are given:

Status CodeDescription
200 - OKRequest has reached to Dengage Server and it is processed. Please check Response Body for details.
400 - Bad Request The request was unacceptable, often due to wrong request type. You should make a POST request for sending events.
404 - Not Found The requested resource doesn't exist, often due to illformed request url
429 - Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
5XX - Server ErrorsSomething went wrong on Dengage's end.

Response Body

Dengage event requests returns a json object as reponse.

Example format of response body is given below:

{
    "campaigns": [
        [],
        []
    ],
    "responses": [
        [],
        []
    ],
    "timestamp": 1501142345512
}

If request is taken successfully, but there is an error with the request, statusCode variable shows the error. Example format of response body indicating an error is given below:

{
    "timestamp": "",
    "responses": [],
    "statusCode": "NO_DOMAIN_APIKEY_MATCH"
}

Details of response errors are given in secotion API Errors

API Errors

If your request body has a field statusCode, then you have an error in your request. Details of errors are given in below table:

Error CodeDescription
NO_API_KEYYour request doesn't have an apiKey parameter, please provide apiKey parameter at the request with your account's unique api key.
NO_ACCOUNT Given api key is not associated with a Dengage account, please check your api key value.
UNVERIFIED_ACCOUNTAccount associated with api key is not a verified account. To verify your account, please check your email and verify it.
FAILED_ACCOUNTAccount associated with api key is not an active account. Please contact with support team to re-activate your account.
NO_DOMAIN_APIKEY_MATCHEach Dengage account is associated with a domain. Please check your domain and provide at requests with header Origin. Check Reqeust Details for required headers.
UNVERIFIED_ACCOUNTAccount associated with api key is not a verified account. To verify your account, please check your email and verify it.
NO_EVENTThere is no events inside request body. You should add at least one event with each request.
NO_USERIDEach Dengage event should have an userId parameter, and at least one event in the request lacks this parameter.
NO_SESSIONIDEach Dengage event should have an sessionId parameter, and at least one event in the request lacks this parameter.
BAD_INPUTYour request body should be a json array of Dengage events. It is malformed, please check your json object for validity.

User & Session Management

Each event has to have user and session id fields to uniquely identify the user using your store and current session through out the visit.

User and session ids can be generated by Dengage and new ids can be reached by making GET requests to following url:

<DATA CENTER URL>/get/key?count=<KEY COUNT TO GENERATE>

Data Center Url is account specific and you should use the end point shown at Integrations page under Account Settings.

You should ask for one key to just getting key for session id, and ask for two keys to get keys for both user id and session id.

Request Body is a simple array with number of keys you have asked for. Example request body is shown below for two key request:

["XXXXXXXXXXXXXXXXXXXXXXX","YYYYYYYYYYYYYYYYYYYY"]

Alternative approach is creating and using your own unique ids. These ids can be any string, but must be unique for each user and session.


Common Parameters

Every event in Dengage shares common parameters and you can add these parameters to all events that will be defined later.

Details of common parameters for events are given below:

NameTypeDescriptionExample
Event
(name)
MandatoryName of the event. Use one name from Event Types'PAGE_VIEW' or 'CHECKOUT'
User ID
(userId)
MandatoryUnique id of the user. Please check User & Session Management for creating unique key for the user/visitor. You should send same key for every event of same user and this id must be unique among other users'USER_1234567890'
Session ID
(sessionId)
MandatoryUnique id of the user session. Please check User & Session Management for creating unique key for the user/visitor session. You should send same key for every event of same user session and this id must be unique among other sessions'SESSION_1234567890'
Device
(device)
MandatoryDevice type of current visitor.
Possible Options are:
- 'PC'
- 'TABLET'
- 'MOBILE'
- 'ANDROID'
- 'IOS'
'PC'
User Agent
(userAgent)
OptionalUser Agent information of current visitor's browser'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1'
Language
(lang)
OptionalType of current visitor's language.Contact us for other languages.
Default languages :
- 'TR'
- 'EN'
- 'FR'
- 'DE'
'FR'
Region
(region)
OptionalType of current visitor's region.'EU'
Currency
(currency)
OptionalCurrency of product price. Must be in Short Format. If not given, account's currency will be used for the product
'EUR'
Browser
(browser)
OptionalType of current visitor's browser
Possible Options are:
- 'Chrome'
- 'Firefox'
- 'Internet Explorer'
- 'Microsoft Edge'
- 'Safari'
- 'Android'
- 'Opera'
- 'Maxthon'
- 'iPhone'
- 'iPad'
'Chrome'
Operating System
(os)
OptionalOperating System of current visitor.
Possible Options are:
- 'Windows'
- 'Linux'
- 'MacOS'
- 'Android'
- 'iOS'
- 'Other'
'MacOS'
Operating System Version
(osversion)
OptionalOperating System Version of current visitor.'10.13.2'
Page Url
(pageUrl)
OptionalUrl of the current page which the event is generated'https://www.exampleshop.com/example-product-1/'
Referrer
(referrer)
OptionalReferal Url of the current page'https://www.google.com/'
Parameters
(params)
OptionalCustom parameters of the event. Must be in map format{'FIELD_1': 'VALUE_1', 'FIELD_2': 'VALUE_2'}
Test Mode
(testMode)
OptionalTest Mode Flag. If event is set to test mode, it will be only processed by campaigns in test mode and discarded in reports. Possible values are 'true' or 'false''false'
Next Page Flag
(nextPage)
OptionalNext Page Flag. If it is set to next page mode, this event will not be sent now, but will be kept for next page load. Set this flag to true, if page is redirecting and you want to store the event to be sent at next page. Possible values are 'true' or 'false''false'

Page View

When a visitor views a page, this event should be sent.

Parameters can be sent with page view event is given below (you can also add common parameters):

NameTypeDescriptionExample
Category
(category)
MandatoryCategory of the Page. Predefined values for Dengage are:
- Home Page
- Product Page
- Category Page
- Basket Page
- Checkout Page
- Search Page
- 404 Page
'Product Page'
Sub Category
(subCategory)
OptionalSub-category of the page. It is used to enhance information about product and category pages.
Example: For a sports category listing page, page category should be 'Category Page' and sub category should be 'Men>Shoes>Sports'
 'Men>Shoes>Sports'

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"PAGE_VIEW",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "category":"Home Page”,
        "device":"IOS"
    }
]
BODY

Product View

When a visitor views a product, this event should be sent.

If product is also inside a page, don't forget to send a page view event with category 'Product Page' and subCategory product's category too.

Parameters can be sent with product view event is given below (you can also add common parameters):

NameTypeDescriptionExample
Product ID
(productId)
MandatoryUnique id of the product'EXAMPLE_PRODUCT_1'
Title
(title)
MandatoryName/Title of the product 'EXAMPLE PRODUCT'
Stock
(inStock)
OptionalProduct’s stock status - either true or false. If not given it is assumed to be in stock ('true')'true'
Url
(url)
MandatoryCanonical url of the product'https://www.exampleshop.com/example-product-1/'
Mobile Url
(mUrl)
 Optionalmobile specific url for the product'https://m.exampleshop.com/example-product-1/'
Image
(image)
Mandatorymain image url to be used in product recommendations'https://cdn.exampleshop.com/example-product-1.png'
Image X-Small
(imageXS)
Optionalvery small image url to be used in product recommendations'https://cdn.exampleshop.com/example-product-1-xs.png'
Image Small
(imageS)
Optionalsmall image url to be used in product recommendations'https://cdn.exampleshop.com/example-product-1-small.png'
Image Medium
(imageM)
Optionalmedium image url to be used in product recommendations'https://cdn.exampleshop.com/example-product-1-medium.png'
Image Large
(imageL)
Optionallarge image url to be used in product recommendations'https://cdn.exampleshop.com/example-product-1-large.png'
Image X-Large
(imageXL)
Optionalvery large image url to be used in product recommendations'https://cdn.exampleshop.com/example-product-1-xl.png'
Category
(category)
MandatoryHierarchical category of the product'Men > Sports > Shoes'
Brand
(brand)
OptionalBrand of the product'EXAMPLE BRAND'
Price
(price)
 MandatoryPrice of the product, must be numeric349.99
Old/Sales Price
(oldPrice)
OptionalPrice of the product before sales449.99
Currency
(currency)
 OptionalCurrency of product price. Must be in Short Format. If not given, account's currency will be used for the product'EUR'
Gender
(gender)
OptionalGender of the product. Possible values are 'M', 'F', 'U''M'
Colors
(colors)
OptionalDifferent color options of the product. Must be in array format['black', 'red', 'blue']
Sizes
(sizes)
 Optional Different size options of the product. Must be in array format['small', 'medium', 'large']
Labels
(labels)
OptionalCustom labels associated with the product. You can use these labels to filter products in the recommendations. Must be in array format['top-seller', 'new-comer']

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"PRODUCT_VIEW",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "device":"TABLET"
        "productId":"EXAMPLE_PRODUCT_1”,
        "title":"Example Product”,
        "inStock":"true”,
        "url":"https://www.exampleshop.com/example-product-1/”,
        "image":"https://cdn.exampleshop.com/example-product-1.png,
        "category":"Men>Sports>Shoes”,
        "brand":"Example Brand,
        "price":349.99,
        "oldPrice":449.99,
        "gender":"M",
        "colors":["black","red","blue"],
        "sizes":["small","medium","large"],
        "labels":["new-comer","top-seller"],
        "params":{
            "field1":"value1",
            "field2":"value2"
        }
    }
]
BODY

Basket Operations

Dengage uses basket operations as intermediary step for measuring success of recommendations throughout the conversion funnel. Basket success rate is also reported by Trendify and Bannerify to show individual performance of products, categories, brands and banners.

Basket operations are similar to page view and product view. There are two possible steps in a basket operation these are: add product to basket, remove product from basket.

Add Product to Basket

When a visitor adds a product to basket/cart, this event should be sent.

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"BASKET_OPERATIONS",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "device":"IOS",
        "step":"add",
        "productId":"EXAMPLE_PRODUCT_1",
        "price":349.99,
        "currency":"EUR",
        "quantity":2
    }
]
BODY

Remove Product from Basket

When a visitor removes a product from basket/cart, this event should be sent.

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"BASKET_OPERATIONS",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "device":"IOS",
        "step":"remove",
        "productId":"EXAMPLE_PRODUCT_1",
        "quantity":1
    }
]
BODY

Basket Event Parameters

Parameters can be sent with basket operations event is given below (you can also add common parameters):

NameTypeDescriptionValues
Basket Step
(step)
Mandatory Basket operation type. Can be either 'add' or 'remove' 'add'
Product ID
(productId)
MandatoryUnique id of the product. Must match with product ids sent with product view event'EXAMPLE_PRODUCT_1'
Price
(price)
OptionalPrice of the product in the basket. If not given, price of the product in product catalogue will be assumed349.99
Currency
(currency)
OptionalCurrency of product price. Must be in Short Format. Currency of the product is used if not given 'EUR'
QuantityOptionalNumber of items added to basket at this operation. If not given, it is assumed 1. You can also use decimals for not integer quantities like 2.31

Checkout Operations

Dengage uses checkout operations to measure success of recommendations throughout the conversion funnel. Checkout information and steps are also used in email & personalization campaigns. Campaign, Trendify, Bannerify and Sales reports are feed from checkout information. It is essential for both analyitcs and recommendation capabilities to function properly.

Dengage track four different steps of checkout operation:

Operation StepDetails
View BasketbasketWhen customer views the basket page. Some online stores has dedicated basket pages, others have basket detail pop-ups. For both use cases we recommend you to send checkout event with basket details. To see details, please click
Customer InformationcustomerThis is the second step on checkout funnel. When customer is entering his personal information details, this event should be send to Dengage. To see details, please click
Payment InformationpaymentWhen customer is on payment stage of checkout funnel, you should send this event to Dengage. To see details, please click
Purchase/SuccesspurchaseFinal step of checkout funnel is purchase and Dengage uses this step as success indicator for recommendations. Reports for campaigns (both recommendation and engagement), sales analysis and real-time analtyics are dependent to this event and shoukd be implemented with great care. To see details, please click

View Basket

View Basket is the first step of checkout funnel, and followed by Customer Information.

When a visitor views his/her basket/cart, this event should be sent with basket details.

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"CHECKOUT",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "device":"ANDROID",
        "step":"basket",
        "totalPrice":999.99,
        "currency":"EUR",
        "cartUrl":"http://www.exampleshop.com/cart/cart-1234567890/"
        "productList":[
            {
                "productId":"EXAMPLE_PRODUCT_1",
                "price":349.99,
                "currency":"EUR",
                "quantity":2
            },
            {
                "productId":"EXAMPLE_PRODUCT_2",
                "price":249.99,
                "currency":"EUR",
                "quantity":1
            }
        ]
    }
]
BODY

Customer Information

Customer Information is the second step of checkout funnel, and preceeded by View Basket & followed by Payment Information.

When a visitor enters customer information as second step of checkout funnel, this event should be sent with basket details.

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"CHECKOUT",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "device":"ANDROID",
        "step":"customer",
        "totalPrice":999.99,
        "currency":"EUR",
        "cartUrl":"http://www.exampleshop.com/cart/cart-1234567890/"
        "productList":[
            {
                "productId":"EXAMPLE_PRODUCT_1",
                "price":349.99,
                "currency":"EUR",
                "quantity":2
            },
            {
                "productId":"EXAMPLE_PRODUCT_2",
                "price":249.99,
                "currency":"EUR",
                "quantity":1
            }
        ]
    }
]
BODY

Please refer to View Basket Step of Checkout for basket products detail and use the same information throughout the purchase funnel by only changing step information.

Payment Information

Payment Information is the third step of checkout funnel, and preceeded by Payment Information & followed by Purchase/Success.

When a visitor enters payment information as third step of checkout funnel, this event should be sent with basket details.

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"CHECKOUT",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "device":"ANDROID",
        "step":"payment",
        "totalPrice":999.99,
        "currency":"EUR",
        "cartUrl":"http://www.exampleshop.com/cart/cart-1234567890/"
        "productList":[
            {
                "productId":"EXAMPLE_PRODUCT_1",
                "price":349.99,
                "currency":"EUR",
                "quantity":2
            },
            {
                "productId":"EXAMPLE_PRODUCT_2",
                "price":249.99,
                "currency":"EUR",
                "quantity":1
            }
        ]
    }
]
BODY

Please refer to View Basket Step of Checkout for basket products detail and use the same information throughout the purchase funnel by only changing step information.

Purchase/Success

Purchase/Success is the fourth and final step of checkout funnel, and preceeded by Payment Information.

When a visitor finalizes a purchase, this event should be sent with basket details.

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"CHECKOUT",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",
        "device":"ANDROID",
        "step":"purchase",
        "totalPrice":999.99,
        "currency":"EUR",
        "productList":[
            {
                "productId":"EXAMPLE_PRODUCT_1",
                "price":349.99,
                "currency":"EUR",
                "quantity":2
            },
            {
                "productId":"EXAMPLE_PRODUCT_2",
                "price":249.99,
                "currency":"EUR",
                "quantity":1
            }
        ]
    }
]
BODY

Please refer to View Basket Step of Checkout for basket products detail and use the same information throughout the purchase funnel by only changing step information.

Checkout Parameters

Detailed explanation for each parameter is given below:

NameTypeDescriptionExample
Checkout Step
(step)
MandatoryIdentifies which step of the checkout funnel. Each step has different meaning and use it accordingly'basket'
Total Price/Amount
(totalPrice)
MandatoryTotal amount of the basket including taxes, shipping costs and also discounts999.99
Currency
(currency)
OptionalCurrency of the total amount of the basket. Must be in Short Format. If not given, currency of the account is used'EUR'
Order No
(orderNo)
OptionalYour unique id of the order. Send this value only for purchase/succeess step and you can access to this id on sales report'ord_XXXXXX'
Cart Url
(cartUrl)
OptionalPermalink for accessing basket at later stages. Should be used for view basket, customer information and payment information steps of checkout. This url can be used at engagement campaigns like cart abondonment reminders. Customers will be informed with this url with out-bound channels like email and push messages. If not given, account's default cart url will be used (which can be adjusted from account settings in panel) 'https://www.exampleshop.com/cart/cart-1234567890/'
ProductsMandatoryList of products inside the basket. Must be in array format. Details are given at product parameters[product1,product2]

Basket Product Parameters

Each product inside the basket can be defined with following parameters. See Checkout Parameters for defining checkout operation in which basket product is also defined.

NameTypeDescriptionExample
Product ID
(productId)
MandatoryUnique id of the product'EXAMPLE_PRODUCT_1'
PriceOptionalPrice of the product in the basket. If not given, price of the product in the product catalogue will be used349.99
CurrencyOptionalCurrency of product price. Must be in Short Format. If not given, currency of the product in the product catalogue will be used 'EUR'
QuantityOptionalNumber of items from current product in the basket. If not given, it is assumed to be 11

User/Visitor Operations

Dengage tracks important user operations like sign-up/register, sign-in/login, sign-out/logout and also you can share your customer's information with Dengage by sending an update event.

There are 4 possible user/visitor operations:

  1. User Register/Sign-up: It should be sent when a visitor signed up to your website,.
  2. User Login/Sign-in: It should be sent when a registered user logins to your website.
  3. User Logout/Sign-out: It should be sent when a registered user logouts from your website.
  4. User Update: It should be sent when you want to share registered user's information (ex: name, email, phone number, etc.) with Dengage . These information can be used at campagin templates to customize message or email address is used for email out-bound campaigns like abandoned cart reminders. To see details please click

New User

When a visitor registers (sign-up) to your website, you should send a new user event.

If you want to share details of an already registered user with Dengage, please use User Update.

Details of parameters of new user is given below:

NameTypeDescriptionExample
User Operation
(step)
MandatoryIdentifies which operation is taken for current user/customer. Each operation has differen meaning and use it accordingly'signup'
Username
(username)
MandatoryUnique identifier for the customer'johndoe'
Full Name
(fullName)
OptionalFull name of the customer. 'John Doe'
Email
(email)
Optional
(Mandatory for using email module)
Email address of the customer 'john.doe@exampleshop.com'
Mobile Phone
(phone)
OptionalMobile phone number of the customer '+1 555 555 5555'
Gender
(gender)
OptionalGender of the customer. Must be either 'M' or 'F' 'M'
Age
(age)
OptionalAge of the customer. Must be numeric. Either use age or birthdate 27
Birthdate
(birthdate)
OptionalBirthdate of the customer. Must be in format 'DD.MM.YYYY'. Either use age or birthdate '23.01.1980'
Membership Date
(memberSince)
OptionalMembership date of the customer. Must be in format 'DD.MM.YYYY' '20.01.2014'
Location
(location)
OptionalLocation of the customer 'New York'
Customer Segments
(segments)
OptionalSegments of the customer. Must be in array format ['SEGMENT 1', 'SEGMENT 2']

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"USER_OPERATIONS",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",      
        "device":"MOBILE",
        "step":"signup",
        "username":"CUSTOMER USERNAME",
        "fullName":"NAME SURNAME",
        "email":"EMAIL OF THE CUSTOMER",
        "phone":"MOBILE PHONE OF THE CUSTOMER",
        "gender":"GENDER OF THE CUSTOMER",
        "age":18,
        "memberSince":"23.01.2014",
        "location":"LOCATION OF THE CUSTOMER",
        "segments":["segment1","segment2"],
        "custom":{
            "field1":"value1",
            "field2":"value2"
        }
    }
]
BODY

User Login

When a registered customer logins (sign-in), a user login event should be sent to Dengage.

Details of parameters of user login is given below:

NameTypeDescriptionExample
User Operation
(step)
MandatoryIdentifies which operation is taken for current user/customer'signin'
UsernameMandatoryUnique identifier for the customer'johndoe'

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"USER_OPERATIONS",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",      
        "device":"MOBILE",
        "step":"signin",
        "username":"CUSTOMER USERNAME"  
    }
]
BODY

User Logout

When a registered customer logouts (sign-out), a user logout event should be sent to Dengage.

Details of parameters of user logout is given below:

NameTypeDescriptionExample
User Operation
(step)
MandatoryIdentifies which operation is taken for current user/customer'signout'
UsernameMandatoryUnique identifier for the customer'johndoe'

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"USER_OPERATIONS",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",      
        "device":"MOBILE",
        "step":"signout",
        "username":"CUSTOMER USERNAME"
    }
]
BODY

User Update

When you want to share an already registered customer information, provide details of the customer by sending an user update event. You can use both this integration for both frequently updating user information and instant updates when customer updates his/her personal information.

If you want to share a new registered user with Dengage, please use New User.

Details of parameters of user update is given below:

NameTypeDescriptionExample
User Operation
(step)
MandatoryIdentifies which operation is taken for current user/customer. Each operation has differen meaning and use it accordingly'update'
Username
(username)
MandatoryUnique identifier for the customer'johndoe'
Full Name
(fullName)
OptionalFull name of the customer. 'John Doe'
Email
(email)
Optional
(Mandatory for using email module)
Email address of the customer 'john.doe@exampleshop.com'
Mobile Phone
(phone)
OptionalMobile phone number of the customer '+1 555 555 5555'
Gender
(gender)
OptionalGender of the customer. Must be either 'M' or 'F' 'M'
Age
(age)
OptionalAge of the customer. Must be numeric. Either use age or birthdate 27
Birthdate
(birthdate)
OptionalBirthdate of the customer. Must be in format 'DD.MM.YYYY'. Either use age or birthdate '23.01.1980'
Membership Date
(memberSince)
OptionalMembership date of the customer. Must be in format 'DD.MM.YYYY' '20.01.2014'
Location
(location)
OptionalLocation of the customer 'New York'
Customer Segments
(segments)
OptionalSegments of the customer. Must be in array format [ 'SEGMENT 1', 'SEGMENT 2' ]
Is Registered Flag
(isRegistered)
OptionalThis is an advanced parameter, use cautiously. If you want to change user's register status without sending a register event, use this flag. Value is either 'true' or 'false''true'
Is Login Flag
(isLogin)
OptionalThis is an advanced parameter, use cautiously. If you want to change user's login status without sending a login/logout event, use this flag. Value is either 'true' or 'false''true'

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"USER_OPERATIONS",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",      
        "device":"MOBILE",
        "step":"update",
        "username":"CUSTOMER USERNAME",
        "fullName":"NAME SURNAME",
        "email":"EMAIL OF THE CUSTOMER",
        "phone":"MOBILE PHONE OF THE CUSTOMER",
        "gender":"GENDER OF THE CUSTOMER",
        "age":18,
        "memberSince":"23.01.2014",
        "location":"LOCATION OF THE CUSTOMER",
        "segments":["segment1","segment2"],
        "custom":{
            "field1":"value1",
            "field2":"value2"
        }
    }
]
BODY

Custom Event

This integration enables any event & data important for you to be tracked by Dengage and become actionable. With this integration, you can send any non standard events & data to Dengage, and gives endless opportunities to track and take actions to your visitor's behaviour.

Details of parameters of custom event is given below:

NameTypeDescriptionExample
Type
(type)
MandatoryType of the event. You should use same type for same events'my_custom_event'
Custom Parameters
(params)
OptionalCustom parameters of the event. Must be in map format.'{"field1":"value1", "field2":"value2"}'

An example curl request is given below:

curl \
    --url 'https://dce1.segmentify.com/add/events/v1.json?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
    --request POST \
    --header 'Origin: http://www.exampleshop.com' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data-binary @- <<BODY
[
    {
        "name":"CUSTOM_EVENT",
        "userId":"XXXXXXXXXXXXXXXXXXX",
        "sessionId":"YYYYYYYYYYYYYYYYYYYYY",
        "pageUrl":"http://www.exampleshop.com/",
        "referrer":"",      
        "device":"MOBILE",
        "type":"my_custom_event",
        "params":{
            "field1":"value1",
            "field2":"value2"
        }
    }
]
BODY

Interaction

This section will be available in next releases. To learn more about this integration, please contact with support team, by sending an email to support@segmentify.com.


Form/Survey

This section will be available in next releases. To learn more about this integration, please contact with support team, by sending an email to support@segmentify.com.


Banners

This section will be available in next releases. To learn more about this integration, please contact with support team, by sending an email to support@segmentify.com.


Tracking

This section will be available in next releases. To learn more about this integration, please contact with support team, by sending an email to support@segmentify.com.


    • Related Articles

    • Experience Module Integration For Mobile App

      Mobile App Integration ​ Segmentify can integrate with any mobile application and has following alternatives: iOS SDK: You can connect your iOS app to Dengage Experience Module by using native iOS SDK Android SDK: You can connect your Android app ...
    • Experience Module iOS SDK Integration

      iOS SDK¶ Dengage iOS SDK for sending visitor behavior and rendering product recommendations. Important warning ProductView, Basket Add/Remove, View Basket, Purchase and Click events must match productId. Introduction¶ This tutorial provides a very ...
    • Experience Module Android SDK Integration

      Android SDK¶ Dengage Android SDK for sending visitor behavior and rendering product recommendations. Supports Android 4.4 and higher devices. Important warning ProductView, Basket Add/Remove, View Basket, Purchase and Click events must match ...
    • Neto Integration

      Neto D·engage Integration In a matter of minutes, without a single line of code you will become able to connect your Neto store to your D·engage account. This integration is a one-way sync that sends your product catalog as well as your contact and ...
    • D·engage GTM Integration

      There are two different ways for GTM integration. You can create new google tags as well as, you can use existing ones. (a) Using Existing Tags for Sending Events Data In order to use your existing triggers to send data to the D·engage platform you ...