Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Moloco Commerce Media Destination


Destination Info
  • Accepts Page, Alias, Group, Identify and Track calls.
  • Refer to it as Moloco Rmp, or Moloco MCM in the Integrations object
  • This integration is partner owned. Please reach out to the partner's support for any issues.

Moloco Commerce Media(link takes you to an external page) (MCM) is a technology solution that empowers marketplaces and online retailers to build and scale a retail media business (for example, sponsored ads). Moloco's solution helps platforms leverage and activate their first-party data to deliver highly relevant and performant ads, automate ad decision-making, and scale their ads business.

The Moloco Commerce Media destination can send user events collected using the Segment SDK to Moloco's platform for a simplified performance ads integration.

This allows you to run performance advertising without having to build your own backend system to ingest and send user events data in realtime to Moloco.


Getting started

getting-started page anchor

Prerequisites

prerequisites page anchor

Before you configure the Moloco Commerce Media destination, add a source to Segment and use the Source Debugger to verify Segment is receiving events.

Before you configure the Moloco Commerce Media destination, reach out to your Moloco representative about the following account information:

  • Moloco Platform ID
  • Moloco Event Service API key

After you obtain that account information, you can move on to the Segment app.

Set up your Moloco destination

set-up-your-moloco-destination page anchor
  1. From the Segment web console, click Catalog.
  2. On the Catalog page, search for "Moloco", select it, and click Add destination.
  3. Choose which of your sources to connect the destination to.
  4. In the Moloco MCM destination settings page, fill the Platform ID and API key fields with your Moloco Platform ID and Event Service API key.
  5. Select "APP" if your source endpoint is a mobile app, and "SITE" if it is a website.

Moloco strongly recommends that you identify your logged-in users using Segment's Identify method and that you hash the user ID before sending it to Moloco.

Please find an example Identify call below:

1
analytics.identify('361b1fdfbeaa9d64a13c033eb9f970dc6740f6bc', {
2
email: 'john.doe@example.com'
3
});

Once a user is identified, each call to Segment's Track method automatically records the user ID. Users that are not logged in can be tracked using an anonymousID. Moloco Commerce Media does not use anonymousIDs for users that are not logged in. Segment recommends formatting your anonymousID in UUID format.

(information)

Info

If you hash the user ID before sending it to Moloco, ensure you reuse the same hashed ID when calling other Moloco APIs.


If you're not familiar with the Segment Spec, take a look to understand what the Track method does. The mappings in the Moloco Commerce Media destination are built based on the Segment Ecommerce Spec.

Please find below an example call to track a product detail page (PDP) view event:

1
analytics.track("Product Viewed", {
2
product_id: "1193",
3
name: "Newage Uplift Eye Care Cream",
4
price: 19.99
5
currency: "USD"
6
quantity: 1,
7
image_url: "https://www.example.com/image.png"
8
});

If you're not familiar with the Segment Spec, take a look to understand what the Page method does.

Please find below an example call to page:

analytics.page();

If you use Segment's Web SDK, this call automatically collects the page information. Here's an example of page information automatically collected using Segment's Web SDK.

1
"page": {
2
"path": "/account",
3
"referrer": "",
4
"search": "",
5
"title": "Your Account",
6
"url": "https://www.example.com/account"
7
},

However for iOS and Android, it won't collect page information.

Moloco Commercial Media requires the page_id(link takes you to an external page) attribute for a PAGE_VIEW event. Using the Web SDK, the page_id can be associated with the path attribute. However for iOS/Android, Moloco Commercial Media recommends using the Page Identifier Token field.

The Page Identifier Token field accepts key:value pairs of strings that can identify the page. Stringification Logic is: {key}:{value}s concatenated by ";"

Moloco Commercial Media ignores the Page Identifier Token if page_id is passed, as page_id has a higher priority.

Here's an example of a Page Identifier Token that could be tracked in a mobile app.

Say the input had the following schema:

1
...
2
"event": "Product List Viewed",
3
"vertical": "fruit"
4
...

and user chose the following mapping:

1
// "event" represents the name of the event
2
event: properties.event
3
// "vertical" represents which vertical the event happened on
4
vertical: properties.vertical
5
6
// The combination of those two tokens can repsent
7
// "Which action happened on which vertical"

The tokens are stringified into the following:

"event:Product List Viewed;vertical:fruit"

The tokens are stringified in the format of the above example because they are key-value pairs concatenated by a semicolon (;).

(information)

Info

if you decide to use the Page Identifier Token in your mobile app, reuse the same Page Identifier Token in place of page_id when calling Moloco's APIs.


In the Mappings tab, some fields are chosen by default if some common fields map to Moloco Event's fields. If the mapped key does not exist in the input data, it won't trigger an error. Instead, the mapping will not pass any value.

If you are using the default fields in a custom way, please confirm that your mapping meets Moloco's requirements.

Default Mappings are not hard rules. They can be modified to your convenience.


Property nameTypeRequiredDescription
API Keypassword
required

The API key for the platform


Channel Typeselect
required

Type of channel, either APP or SITE. Defaults to SITE.


Platform IDstring
required

ID of the platform


Platform Namestring

Optional

Name of the platform (default to the Platform ID)


Moloco MCM has the following presets

Preset NameTriggerDefault Action
SearchEvent type = "track" and event = "Products Searched"Search
Page ViewEvent type = "page" and properties.name != "Home" and properties.name != "Land"Page View
Item Page ViewEvent type = "track" and event = "Product Viewed"Item Page View
LandEvent type = "page" and properties.name = "Land"Land
Add to WishlistEvent type = "track" and event = "Product Added to Wishlist"Add to Wishlist
HomeEvent type = "page" and properties.name = "Home"Home
PurchaseEvent type = "track" and event = "Order Completed"Purchase
Add to CartEvent type = "track" and event = "Product Added"Add to Cart

Build your own Mappings. Combine supported triggers with the following Moloco MCM-supported actions:

(information)

Mapping limits per destination

Individual destination instances have support a maximum of 50 mappings.

Represents a user purchasing an item

Purchase is a Cloud action. The default Trigger is type = "track" and event = "Order Completed"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT
required

Item information list related to the event.


RevenueOBJECT
required

Revenue of the event


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority.


Shipping ChargeOBJECT

Optional

Shipping charge’s monetary amount in a specific currency.

Represents a user searching for an item

Search is a Cloud action. The default Trigger is type = "track" and event = "Products Searched"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT

Optional

Item information list related to the event.


Search QuerySTRING
required

Query string for the search.


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority.


Referrer Page IDSTRING

Optional

Similar to referrer in HTTP, this value indicates from which page the user came to the current page.

Represents a user adding an item to their cart

Add to Cart is a Cloud action. The default Trigger is type = "track" and event = "Product Added"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT
required

Item information list related to the event.


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority.

Represents a user viewing a certain page that is pertinent to sequence-based ML model training (Ex. a user browsing sneakers)

Page View is a Cloud action. The default Trigger is type = "page" and properties.name != "Home" and properties.name != "Land"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT

Optional

Item information list related to the event.


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar". Either page_id or page_identifier_tokens is required.


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority. Either page_id or page_identifier_tokens is required.


Referrer Page IDSTRING

Optional

Similar to referrer in HTTP, this value indicates from which page the user came to the current page.

Represents a user visiting a home page

Home is a Cloud action. The default Trigger is type = "page" and properties.name = "Home"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT

Optional

Item information list related to the event.


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority.

Represents a user adding an item to their wishlist

Add to Wishlist is a Cloud action. The default Trigger is type = "track" and event = "Product Added to Wishlist"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT
required

Item information list related to the event.


RevenueOBJECT

Optional

Revenue of the event


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority.

Represents a user visiting the client’s website from an external source (ex. Google Shopping)

Land is a Cloud action. The default Trigger is type = "page" and properties.name = "Land"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT

Optional

Item information list related to the event.


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority.


Referrer Page IDSTRING
required

Similar to referrer in HTTP, this value indicates from which page the user came to the current page.

Represents a user viewing an item page

Item Page View is a Cloud action. The default Trigger is type = "track" and event = "Product Viewed"

Property nameTypeRequiredDescription
Event IDSTRING

Optional

Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.


TimestampDATETIME
required

Timestamp that the event happened at.


User IDSTRING

Optional

User Identifier for the platform. The length should not exceed 128 characters.


DeviceOBJECT

Optional

Device information of the event


Session IDSTRING

Optional

Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.


Default CurrencySTRING

Optional

The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.


ItemsOBJECT
required

Item information list related to the event.


Page IDSTRING

Optional

A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".


Page Identifier TokensOBJECT

Optional

Tokens that can be used to identify a page. Alternative to page_id with a lower priority.


Once the mappings are configured correctly, you can verify the flow of events from your source to Moloco's destination in the Delivery Overview tab of your Moloco destination. If you correctly configured your destination, you should see a growing Successful delivery count.


You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo(link takes you to an external page).

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to false.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

(information)

Real-time to batch destination sync frequency

Real-time audience syncs to Moloco Commerce Media may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
API Keypassword
required

The API key for the platform


Channel Typeselect
required

Type of channel, either APP or SITE. Defaults to SITE.


Platform IDstring
required

ID of the platform


Platform Namestring

Optional

Name of the platform (default to the Platform ID)