Moloco Commerce Media

📘

This integration is currently in beta. Contact your MetaRouter support team to get started.

What Is Moloco Commerce Media?

Moloco Commerce Media (MCM) is a commerce media platform that leverages retailer’s first-party data and machine learning to deliver highly relevant ads, optimizing ad performance and personalizing user experiences. It offers real-time bidding, ad delivery, and performance insights for retailers and advertisers.

MetaRouter facilitates server-side event collection through Moloco's Events API, enabling secure and reliable data transmission to Moloco's infrastructure. Customers can use this integration to capture critical shopper behavior and event data for campaign optimization and personalization.

What are the benefits of integrating MetaRouter with Moloco?

  • Improved Personalization: Send behavioral data to Moloco Commerce Media for targeted ads and optimized bidding.
  • Identity Persistence: Maintain consistent user identifiers using the anonymousId as the persistent device ID.
  • Simplified Server-Side Integration: MetaRouter handles event delivery, reducing client-side complexity.

Capabilities and Considerations

  • Event API Support: MetaRouter sends shopper behavioral events (e.g., page views, product views, add-to-cart, and purchases) to Moloco's Events API.
  • Identity Handling:
    • MetaRouter uses the anonymousId as the device.persistent_id for consistent user identification.
    • Device information, such as OS, OS version, user agent, and model, is included in the payload.
  • Support for Event-Specific Parameters: Payloads include key attributes such as product details, revenue, and quantities, as defined in Moloco's Events API Reference.
  • Session Started Event: This event is triggered by the MetaRouter sync when a new session begins. To enable this event, you must integrate the MetaRouter sync. Contact your MetaRouter support team for more details.

Getting Started - From Your Moloco Account

To integrate with Moloco, you will need the following:

  1. Endpoint:
    • The endpoint URL to send event data is provided directly by your Moloco representative. Please contact your Moloco representative for your endpoint.
  2. API Key:
    • The API key is required to authenticate requests to Moloco's Events API.
    • To manage or generate API credentials, follow the instructions in Moloco's API and SSO Credential Management.

Getting Started - From Your MetaRouter Account

Adding a Moloco Integration

From the integration library, add a Moloco Commerce Media integration. Then, fill out the Connection Parameters:

Connection ParameterDescription
ENDPOINTThe Moloco endpoint URL provided by your Moloco representative. Please include the full endpoint URL here.
API_KEYThe API key used to authenticate requests to Moloco's Events API.

Event Mappings

MetaRouter provides all of the event mappings that Moloco Commerce Media integrations typically require. You may add custom events, parameters, or mappings in accordance with Moloco’s API documentation and User Event Data Specifications.

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output Key

Description

Expected Input

id Required

String: A unique identifier for the event.

messageId

user_id
Required

String: The unique identifier of the user performing the event.

userId

timestamp
Required

Integer: The event timestamp in milliseconds since the Unix epoch.

Expression - Convert timestamp to milliseconds using MILLISECONDS_SINCE_EPOCH_FROM_RFC3999.

device.persistent_id
Required

String: The persistent device ID used to track users.

anonymousId

channel_type
Required

String: Indicates the event source. Value is APP for app events and SITE for web events.

Expression - Determine source using context.app.name, device.type, or os.name.

device.os
Recommended

String: The operating system of the device.

Expression - Convert context.device.type to lowercase values like ios or android.

device.os_version
Recommended

String: The version of the operating system.

context.os.version

device.model
Recommended

String: The device model name.

context.device.model

device.ua
Recommended

String: The user agent of the device.

context.userAgent

language

String: The user’s preferred language.

Expression - Extract from context.locale (e.g., "en").

page_id
Recommended

String: The ID or path of the current page.

context.page.path

referrer_page_id
Recommended

String: The ID or URL of the referrer page.

context.page.referrer


Event Specific

Page

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., PAGE_VIEW, HOME).

Expression - Use page path to determine type. This expression evaluates the page path from the event payload to classify the event type. If the page path is '/', indicating a visit to the homepage, the event type is assigned as "HOME". For all other page paths, the event type is assigned as "PAGE_VIEW", marking it as a general page visit.

Screen

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., PAGE_VIEW, HOME).

Expression - Use screen name to determine type. This expression checks the name of the screen event and assigns a type based on its value. If the screen name is "home" (case insensitive), the event type is set to "HOME". Otherwise, it defaults to "PAGE_VIEW".

Product Searched

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., SEARCH).

Enrichment - "SEARCH".

search_query
Required

String: The search term used by the user.

properties.query

Product Viewed

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., ITEM_PAGE_VIEW).

Enrichment - "ITEM_PAGE_VIEW".

items
Required

Array: Details about the product being viewed.

Expression - Map product data using properties.

Product Added

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., ADD_TO_CART).

Enrichment - "ADD_TO_CART".

items
Required

Array: Details about the product being added to the cart.

Expression - Map product data using properties.

revenue

Object: Contains the price and quantity for calculating total revenue.

Expression - Multiply price by quantity.

Product Added to Wishlist

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., ADD_TO_WISHLIST).

Enrichment - "ADD_TO_WISHLIST".

items
Required

Array: Details about the product added to the wishlist.

Expression - Map product data using properties.

revenue

Object: Contains the price and quantity for calculating total revenue.

Expression - Multiply price by quantity.

Session Started

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., LAND).

Enrichment - "LAND".

Application Open

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., LAND).

Enrichment - "LAND".

Order Completed

Output Key

Description

Expected Input

event_type Required

String: Describes the event type (e.g., PURCHASE).

Enrichment - "PURCHASE".

items
Required

Array: Details about the products purchased.

Expression - Map product data using properties.

revenue
Required

Object: Contains the price and quantity for calculating total revenue.

Expression - Sum product totals.

shipping_charge

Object: The cost of shipping for an order, including currency (defaults to USD) and amount from the event payload.

Expression - This expression returns the shipping charge as an object with the currency (defaulting to "USD") and the shipping amount from the event payload.



Required & Recommended Identifiers

These identifiers must be mapped to Moloco Commerce Media in order for successful user matching to occur. Without these IDs, any events sent to Moloco Commerce Media may not be accurately reflected in reporting. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.

Attribute

Example

Sync Injector Required?

user_id Required

123456

No

device.persistent_id
Required

abc123-anonymous-id

No


Additional Moloco Documentation

API and SSO Credential Management
User event data specifications
Event API Ref