Serving Moments in Mobile Apps
This playbook provides a detailed guide for implementing a Moment via the Moments API in your mobile app.
A "Moment" is defined as a single offer or a collection of offers presented at key times in the user's experience. By using the Moments API, you can retrieve Offers from MomentScience and render them as you see fit within your app, enhancing user engagement and generating additional revenue.
To return a collection of Offers via the Moments API, you first need to obtain an API key.
Ensure you obtain an API Key specifically scoped for Ads.
The number of Offers returned in the Moments API response can be configured in the MomentScience dashboard.
Configure the Number of Offers:
- Locate the "Number of Ads" setting.
- Select the desired number of ads to be included in a Moment.
- Press Save Configuration.
This setting instructs the Moments API to return the selected number of Offers in the response.
The API call that returns a collection of Offers can be implemented in one of two ways:
- Directly in Your App:
- Make the API call directly from your mobile app to retrieve the Offers.
- Via a Proxy Solution:
- Your app contacts your backend endpoint, which then relays the request to MomentScience.
- Your backend processes the response and sends it back to your app.
If using a proxy solution, ensure the end-user's user-agent and IP address are included in the Moments API request from your proxy server. This ensures appropriate geo and platform targeting.
Every Offer returned includes an impression beacon (offers[].pixel) that needs to be triggered when the Offer is displayed to the user. Implementing this correctly ensures accurate reporting and the ability to optimize Offer ranking and revenue yield.
- Trigger Impression Beacons:
- Ensure your app triggers the impression beacon each time an Offer is displayed to the user.
Failure to implement the impression beacon will result in inaccurate reports and hinder the platform's ability to optimize performance metrics such as eCPM.
Implement postbacks to get real-time events on conversions based on the Offer served. This provides immediate feedback and helps in refining targeting and effectiveness.
📢 If you're running into any issues while going through the integration process, feel free to contact us at help@momentscience.com