Server-side Tracker
post
https://api-dot-solutionsone-211314.ew.r.appspot.com
/v1/track
Server-side Tracking API

Example call

cURL
Javascript - jQuery
Javascript - Fetch
Nodejs - Axios
PHP - cURL
Python
1
curl --location --request POST 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/track'
2
--header 'Authorization: Bearer [ADD YOUR USER TOKEN HERE]' \
3
--header 'Content-Type: application/json'
4
--data-raw '{
5
"user_id": "da123fg876sfed",
6
"event_name": "Added To Cart",
7
"event":
8
{
9
product_id: '',
10
product_type: '',
11
name: '',
12
price: ,
13
currency: '',
14
quantity: 1,
15
url: 'https://www.example.com/product/path',
16
image_url: 'https://www.example.com/product/path.jpg'
17
},
18
"datetime": "2020-01-01 20:20:01+01:00"
19
"session_id": "123a"
20
}'
Copied!
1
var settings = {
2
"url": "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders",
3
"method": "POST",
4
"timeout": 0,
5
"headers": {
6
"Authorization": "Bearer [ADD YOUR USER TOKEN HERE]",
7
"Content-Type": "application/json"
8
},
9
"data": JSON.stringify({
10
"user_id": "da123fg876sfed",
11
"event_name": "Added To Cart",
12
"event":
13
{
14
product_id: '',
15
product_type: '',
16
name: '',
17
price: ,
18
currency: '',
19
quantity: 1,
20
url: 'https://www.example.com/product/path',
21
image_url: 'https://www.example.com/product/path.jpg'
22
},
23
"datetime": "2020-01-01 20:20:01+01:00"
24
"session_id": "123a"
25
}),
26
};
27
28
$.ajax(settings).done(function (response) {
29
console.log(response);
30
});
Copied!
1
var myHeaders = new Headers();
2
myHeaders.append("Authorization", "Bearer [ADD YOUR USER TOKEN HERE]");
3
myHeaders.append("Content-Type", "application/json");
4
5
var raw = JSON.stringify({
6
"user_id": "da123fg876sfed",
7
"event_name": "Added To Cart",
8
"event":
9
{
10
product_id: '',
11
product_type: '',
12
name: '',
13
price: ,
14
currency: '',
15
quantity: 1,
16
url: 'https://www.example.com/product/path',
17
image_url: 'https://www.example.com/product/path.jpg'
18
},
19
"datetime": "2020-01-01 20:20:01+01:00"
20
"session_id": "123a"
21
});
22
23
var requestOptions = {
24
method: 'POST',
25
headers: myHeaders,
26
body: raw,
27
redirect: 'follow'
28
};
29
30
fetch("https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders", requestOptions)
31
.then(response => response.text())
32
.then(result => console.log(result))
33
.catch(error => console.log('error', error));
Copied!
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"user_id": "da123fg876sfed",
4
"event_name": "Added To Cart",
5
"event":
6
{
7
product_id: '',
8
product_type: '',
9
name: '',
10
price: ,
11
currency: '',
12
quantity: 1,
13
url: 'https://www.example.com/product/path',
14
image_url: 'https://www.example.com/product/path.jpg'
15
},
16
"datetime": "2020-01-01 20:20:01+01:00"
17
"session_id": "123a"
18
});
19
20
var config = {
21
method: 'post',
22
url: 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders',
23
headers: {
24
'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]',
25
'Content-Type': 'application/json'
26
},
27
data : data
28
};
29
30
axios(config)
31
.then(function (response) {
32
console.log(JSON.stringify(response.data));
33
})
34
.catch(function (error) {
35
console.log(error);
36
});
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "POST",
14
CURLOPT_POSTFIELDS =>"JSON_ENCODE(array(
15
"user_id" => "da123fg876sfed",
16
"event_name" => "Added To Cart",
17
"event" =>
18
array(
19
product_id => '',
20
product_type => '',
21
name => '',
22
price => ,
23
currency => '',
24
quantity => 1,
25
url => 'https://www.example.com/product/path',
26
image_url => 'https://www.example.com/product/path.jpg'
27
),
28
"datetime" => "2020-01-01 20:20:01+01:00"
29
"session_id" => "123a"
30
))",
31
CURLOPT_HTTPHEADER => array(
32
"Authorization: Bearer [ADD YOUR USER TOKEN HERE]",
33
"Content-Type: application/json"
34
),
35
));
36
37
$response = curl_exec($curl);
38
39
curl_close($curl);
40
echo $response;
41
Copied!
1
import requests
2
import json
3
4
url = "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders"
5
6
event = {
7
"user_id": "da123fg876sfed",
8
"event_name": "Added To Cart",
9
"event":
10
{
11
product_id: '',
12
product_type: '',
13
name: '',
14
price: ,
15
currency: '',
16
quantity: 1,
17
url: 'https://www.example.com/product/path',
18
image_url: 'https://www.example.com/product/path.jpg'
19
},
20
"datetime": "2020-01-01 20:20:01+01:00"
21
"session_id": "123a"
22
}
23
payload = json.dumps(event)
24
headers = {
25
'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]',
26
'Content-Type': 'application/json'
27
}
28
29
response = requests.request("POST", url, headers=headers, data = payload)
30
31
print(response.text.encode('utf8'))
32
Copied!

Dates & Time

Timestamp

Accepted timestamp formats

Format
Example
YYYY-MM-DD HH:MM:SS+HH:MM
2020-01-01 04:23:01+04:00
YYYY-MM-DD HH:MM:SS.ffffff
2020-01-01 04:23:01.000384
YYYY-MM-DD HH:MM:SS
2020-01-01 04:23:01
YYYY-MM-DDTHH:MM:SS+HH:MM
2020-01-01T04:23:01+04:00
YYYY-MM-DDTHH:MM:SS.ffffff
2020-01-01T04:23:01.000384
YYYY-MM-DDTHH:MM:SS
2020-01-01T04:23:01

Generic format supported

1
YYYY-MM-DD[*HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]]
Copied!
Last modified 6mo ago