Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this chapter, you will learn how to execute API calls to get all the segments a specified user belongs to.


URI Syntax

{server}/segments/v1/{accountId}/{placementId}?everId={everId}&customerId={customerId}


Example

https://r.mateti.net/segments/v1/1234567891234//23232323/?everId=123420

UI Text Box
typenote

For customers who, for example, use their own tracking domain or third-party cookies due to ITP 2.x, the URI syntax looks as follows:

{{OWN_TRACKING_DOMAIN}}/segments/v1

Please note that in this case separate activation is required. Please contact your Webtrekk consultant for this purpose.

?customerId=04ee2ab263eeb5f0ca1139d7110f 93c8




Query Parameters

ParameterTypeDescription

accountId



String

Mandatory. The trackId of the Marketing Automation account.

Scroll Ignore
Tooltip
appendIconInfo-Circle
linkTextUnderlinetrue
width540px
linkTextHow to get the account ID
linkTextColor#b4bf00
  1. Log in Webtrekk Q3.

  2. Go to Configuration > System Configuration > Data Collection.

  3. Here, you will find your account ID as "Your Track ID."

placementIdLong

Mandatory. Placement ID (in the chapter Calling the API Information it is described how to find the desired placement ID).

everIdString

Mandatory. This ID is used to identify the user for whom you want to retrieve information. Alternatively, you can use the customer ID.

The everId is the Webtrekk device ever ID. Depending on your tracking setup you can get this ID from the first-party or third-party cookie.

UI Text Box
typenote

If you use your own tracking domain the everId is not required.



customerIdString

Mandatory. This ID is used to identify the user for whom you want to retrieve information. Alternatively, you can use the ever ID.

The customer ID must contain the same value that you use for the customer ID in your tracking.


Get Segment Information

GET https://r.mateti.net/segments/v1/1234567891234/23232323/?customerId=04ee2ab263eeb5f0ca1139d7110f 93c8

Headers

content-type: application/json

Response Syntax

Panel
borderColor#dcdcdc
{ 
    "user": <everID>, 
    "segments": {  
"<segment name>" : <true|false>
"<segment name>" : <true|false>
    },  
"categories": [
       { 
         "id": <urm category id> 
         "title": "<urm category title>" 
         "value": "<urm category value>" 
       }, 
       {  
"id": <urm category id>
        "title": "<urm category title>" 
        "value": "<urm category value>" 
       } 
   ] 
} 


Scroll Pagebreak



Scroll Ignore

Example Response

Expand
titleOpen/ close example response...
Panel
borderColor#dcdcdc
{     
"everId": "87235498273549765",
"segments": {
"men" : true,
"high frequency buyer" : false
},
"categories": [
{
"id": 1
"title": "URM Custom Profile Macro Status"
"value": "6"
},
{
"id": 2
"title": "URM RFM Status"
"value": "322"
},
     {  
"id": 3
"title": "URM Predicted conversion probability %"
"value": ""
}

]
}



Scroll Only

Example Response

Panel
borderColor#dcdcdc
{     
"everId": "87235498273549765",
"segments": {
"men" : true,
"high frequency buyer" : false
},
"categories": [
{
"id": 1
"title": "URM Custom Profile Macro Status"
"value": "6"
},
{
"id": 2
"title": "URM RFM Status"
"value": "322"
},
     {  
"id": 3
"title": "URM Predicted conversion probability %"
"value": ""
}

]
}



UI Text Box
typenote

Please note that some of the URM values are returned as numerical values. You can find the corresponding meaning of the numbers in the "Mapping Table for URM Status".

Scroll Pagebreak



Scroll Ignore