Sitecore Send Tracking HTTP API

Moosend logo

Review Sitecore Send Tracking API

In previous blog we talked about configuring Abandoned Cart with Sitecore Send. The suggested way to implement tracking is to use Moosend Javascript API. There are some downsides with it:

  • Front end needs to be changed
  • Additional tracking library needs to be imported onto site
  • It's one more JS integration in addition to default set: Google Analytics, Facebook Pixel and etc.

But it's possible to implement it with Sitecore CDP. Unfortunately we can't use Javascript Tracking API there. Instead we need implement Tracking without JS API just with HTTP Requests with required payload sent to Tracking URLs. Lets take a look how to implement it.

Search for sources

The sources of Moosend tracking library can be easily found on Github.

After some investigation of sources we found Tracker.ts and config.ts.

Basically we can see, that requests are made to host to paths /identify or /track - based on the event type.

Note. It's also file in this repository, but it's outdated: wrong payload is provided there.

HTTP Requests for Abandoned Cart tracking

Now lets review the request made for each type of event required for Abandoned Cart Tracking.

Identify request

This request is made when the user's email is known.


   "ContactEmailAddress":"[USER_EMAIL]",    // users' email
   "ContactId":"[USER_ID]",                 // unique user id
   "sessionId":"[SESSION_ID]",              // unique session id
   "siteId":"[SITE_ID]"                     // site id from Moosend settings

The key thing here is known email and user identifiers:

  • ContactId - unique user identifier, stays the same for multiple user sessions
  • sessionId - unique session identifier, stays the same per particular user's session, but is different per others user sessions.

[USER_EMAIL], [USER_ID], [SESSION_ID] will be used in all others requests. [SITE_ID] is the same for requests for all users in scope of single Moosend integration.

Add to cart request

This request is made when user adds something to the shopping cart.


   "properties":[                               // information about added to the cart product
            "itemPrice":10,                     // product price - decimal
            "itemQuantity":2,                   // added quantity
            "itemTotalPrice":20,                // itemPrice * itemQuantity
Order completed request

This request is made when the order is completed. Also, list of products needs to be included into the payload:




In the next articles we will keep reviewing Sitecore Send and we'll start implementing integration with Sitecore CDP.

Sitecore Send Series

Abandoned Cart with Sitecore Send

Sitecore Send Http API