5. User event data streams

To start sharing user event data with Moloco, you must be granted access to the user event API by your Moloco representative. You must create API requests to the user event API to send e-commerce marketplace user data to Moloco Commerce Media.

📘

Note

It takes approximately 1 to 3 weeks for the machine learning models to finish training on the user event data. Event data integration must be complete before starting to send the Decision API requests to serve advertisements.

Your Moloco representative will provide the following:

  1. Test API key for a testing environment
  2. Production API key for the production environment

Send requests to the user event API

You must follow the steps below to start sending API requests to the user event API.

Step 1. Reach out to your Moloco representative to initiate the integration.

Step 2. Send API requests to the user event API. Moloco uses one of these to generate a single internal identifier with the following priority: user_id, device.unique_device_id, device.advertising_id, and session_id.

  • user_id should be your internal unique identifier for registered users.
  • device.unique_device_id is the UDID of the device used for the event.
  • device.advertising_id is the ADID(GAID/IDFA) of the device used for the event.
  • session_id is the identifier for the session in which the event occurred.

📘

Note

These identifiers should be used in the decision API request parameters

Event data delivery options

To share your user event data with Moloco Commerce Media, you must send API requests to the Event API. There are several different ways you can accomplish this on your backend services. Below are some examples of using AWS services.

Use a backend proxy server (recommended)

We recommend using a backend proxy server to send event data to Moloco Commerce Media.

You may use AWS-managed services to collect and stream event data from your app or web to MCM Event API endpoints. Please refer to the AWS user guides below for further information.

If you are a Google Cloud user, please refer to the GCP user guides below for further information.

Calling Event API directly from frontend service

Alternatively, you can choose to make API requests directly from your mobile app or web browser to the Event API endpoint. This isn’t recommended, as there are several issues associated with making calls directly from your app or web server. See the following table for a comprehensive list of potential issues and benefits of using each method.

Backend proxy vs. Frontend API integration

MethodProsCons
Backend proxy serverReduced security risks. Deploying the API key to an app or web server increases security risks.

Reduce the risk of losing events while transmitting data to Moloco Commerce Media.

Allows data to be stored and retransmitted later during a network or service disruption.
Requires building a backend service to relay event-sending requests from your app or web server.
Frontend integrationQuick and easy to implement, as there is no need to set up additional backend services.Greater security risks when deploying API keys to your app or web server.

Debugging issues is difficult.

Using a third-party integrations for Event API

If you are currently using a Mobile Measurement Partner (MMP) or a Customer Data Platform (CDP) to manage your users’ event data, you may be able to integrate those services to stream user events to Moloco instead of using our user event API directly.

Below is a list of currently supported MMPs and CDPs. Please check the following section for instructions on integrating them into our user event API. If the MMP/CDP you are using is not on the list, please consult your Moloco representative about this option.

MMP

You can stream the postbacks tracked by MMP to Moloco instead of using Moloco’s user event API. Note: the data tracked by MMP should contain information that exists in the user event API specifications.
Please consult your Moloco representative to get started. Note that MMP integration will take 1-2 weeks due to related work on Moloco’s side.

Amplitude (CDP)

Amplitude has a dedicated event streaming destination integration for Moloco.
The Moloco destination integration is currently under re-construction. Due to the integration being under construction, please consult your Moloco representative on an estimated time window for it to be ready.

Segment (CDP)

You can stream the user events tracked by Segment to Moloco instead of using Moloco’s user event API. Note: the data tracked by Segment should contain information that exists in the user event API specifications.
Please consult your Moloco representative to get started. Note that Segment integration will take 2-3 weeks due to related work on Moloco’s side.

Starting with lower data requirements

If your goal is to expedite the launch of your in-house ad business with Moloco Commerce Media, yet you're constrained by the inability to provide your first-party full-user event data, Moloco Commerce Media offers flexible, alternative solutions.

Minimum Event Integration Mode allows for faster onboarding using minimal user events while supporting a seamless transition to Standard Integration with the help of our expert team if desired.

Bring-your-own ML Mode allows you to use your own prediction or quality scores for ad decisioning when leveraging custom_item_pool for determining ad candidates

Please consult with a Moloco Representative about your business objectives and circumstances for a better integration guide.

📘

Note

As these modes have limited access to Moloco’s machine-learning engine, they may not capture the high performance achievable with Standard Integration. As such, we recommend Standard Integration for most customers - please consult with a Moloco representative about your unique business objectives.