LogoLogo
HomeBlogDocsGuides
  • Engage Documentation
  • GETTING STARTED
    • Quick Start Guide
    • Feature Introduction
    • A basic installation
      • Platform specific installation
  • Integrations
    • Overview
    • Destinations
      • Customer.io
      • Facebook Conversion API
      • Facebook Marketing API
      • Facebook Pixel
      • Google Ads API
      • Google Analytics 4
      • Google Analytics 4 -Send audience data
      • Google Analytics 4 - Server-side
      • Google Enhanced Conversions
      • Klaviyo
      • Klaviyo Server Side
      • LinkedIn Pixel
      • TikTok Pixel
    • Sources
      • AbiCart Plugin
        • Event Tracking
      • Google Product Feed
      • Javascript Tracker
      • Magento 1 Plugin
      • Magento 2 Plugin
      • Prestashop Module
        • Event Tracking
      • Shopify Plugin
        • Event Tracking
      • Wikingruppen Plugin
      • Woocommerce Plugin
        • Event Tracking
      • Troubleshooting
  • Features
    • Event Tracking
      • Capture Video events
      • Cart
      • Checkout
      • Order
      • Product
      • Product Lists
      • Promotions
      • Reviews
      • User
      • Wishlist
    • Identities
    • Segments
    • Audiences
    • Actions
      • Sync audiences
    • Analytics
      • Customer Report
      • Sales Report
      • Attribution Models
    • Personalization
      • Product Recommendations
        • Setup Recommendations
        • Blocks
        • Models
        • Troubleshoot
      • Personalized landing pages for marketing automation
      • Recommendation Report
  • API
    • Recently Viewed
    • Recommended Products
    • Server-side Tracker
    • Order History API
    • Product Catalog API
  • Billing
    • Legacy plans
    • Shopify
  • Terms & Conditions
    • Terms and Conditions
    • Privacy Policy
      • Privacybeleid
      • Informativa sulla Privacy
      • Datenschutz-Richtlinie
      • Politique de Confidentialité
      • Política de privacidad
Powered by GitBook
On this page
  • Server-side Tracking API
  • Example call
  • Dates & Time
  • Timestamp

Was this helpful?

Export as PDF
  1. API

Server-side Tracker

Server-side Tracking API

POST https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/track

This endpoint allows you to send tracking events from your servers to engage. Both historical events dating back the last 2 years, and new events can be sent through this endpoint. Note. The user_id is used to measure your tracked events against your monthly tracked visitor quota. Hence, adding a lot of events to the current or coming months may result in high charges. The datetime parameter can be used to ensure events end up in the month intended.

Query Parameters

Name
Type
Description

user_id

string

A unique customer id. This is used to measure the monthly tracked visitor quota.

event_name

string

One of the events under TRACKED EVENTS.

event

object

One of the event objects in TRACKED EVENTS.

datetime

string

Check the accepted date formats below

session_id

string

An id to separate between different visits from the same user.

Headers

Name
Type
Description

Authorization

string

"Bearer eyJhbGciOiJIUzI1NiIssdzNCw..." Log in to retrieve your user token.

Event successfully added
Event failed

Example call

curl --location --request POST 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/track' 
--header 'Authorization: Bearer [ADD YOUR USER TOKEN HERE]' \
--header 'Content-Type: application/json' 
--data-raw '{ 
    "user_id": "da123fg876sfed", 
    "event_name": "Added To Cart", 
    "event":
        {
          product_id: '',
          product_type: '',
          name: '',
          price: ,
          currency: '',
          quantity: 1,
          url: 'https://www.example.com/product/path',
          image_url: 'https://www.example.com/product/path.jpg'
        },
    "datetime": "2020-01-01 20:20:01+01:00"
    "session_id": "123a"
}'
var settings = {
  "url": "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer [ADD YOUR USER TOKEN HERE]",
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({ 
    "user_id": "da123fg876sfed", 
    "event_name": "Added To Cart", 
    "event":
        {
          product_id: '',
          product_type: '',
          name: '',
          price: ,
          currency: '',
          quantity: 1,
          url: 'https://www.example.com/product/path',
          image_url: 'https://www.example.com/product/path.jpg'
        },
    "datetime": "2020-01-01 20:20:01+01:00"
    "session_id": "123a"
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer [ADD YOUR USER TOKEN HERE]");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({ 
    "user_id": "da123fg876sfed", 
    "event_name": "Added To Cart", 
    "event":
        {
          product_id: '',
          product_type: '',
          name: '',
          price: ,
          currency: '',
          quantity: 1,
          url: 'https://www.example.com/product/path',
          image_url: 'https://www.example.com/product/path.jpg'
        },
    "datetime": "2020-01-01 20:20:01+01:00"
    "session_id": "123a"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var axios = require('axios');
var data = JSON.stringify({ 
    "user_id": "da123fg876sfed", 
    "event_name": "Added To Cart", 
    "event":
        {
          product_id: '',
          product_type: '',
          name: '',
          price: ,
          currency: '',
          quantity: 1,
          url: 'https://www.example.com/product/path',
          image_url: 'https://www.example.com/product/path.jpg'
        },
    "datetime": "2020-01-01 20:20:01+01:00"
    "session_id": "123a"
});

var config = {
  method: 'post',
  url: 'https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders',
  headers: { 
    'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>"JSON_ENCODE(array( 
      "user_id" => "da123fg876sfed", 
      "event_name" => "Added To Cart", 
      "event" =>
          array(
            product_id => '',
            product_type => '',
            name => '',
            price => ,
            currency => '',
            quantity => 1,
            url => 'https://www.example.com/product/path',
            image_url => 'https://www.example.com/product/path.jpg'
          ),
      "datetime" => "2020-01-01 20:20:01+01:00"
      "session_id" => "123a"
  ))",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer [ADD YOUR USER TOKEN HERE]",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests
import json

url = "https://api-dot-solutionsone-211314.ew.r.appspot.com/v1/orders"

event = { 
    "user_id": "da123fg876sfed", 
    "event_name": "Added To Cart", 
    "event":
        {
          product_id: '',
          product_type: '',
          name: '',
          price: ,
          currency: '',
          quantity: 1,
          url: 'https://www.example.com/product/path',
          image_url: 'https://www.example.com/product/path.jpg'
        },
    "datetime": "2020-01-01 20:20:01+01:00"
    "session_id": "123a"
}
payload = json.dumps(event)
headers = {
  'Authorization': 'Bearer [ADD YOUR USER TOKEN HERE]',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data = payload)

print(response.text.encode('utf8'))

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

YYYY-MM-DD[*HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]]

PreviousRecommended ProductsNextOrder History API

Last updated 4 years ago

Was this helpful?