Playbooks

Serving Moments in Mobile Apps

AdsPostX is now MomentScience! 🎉

We have rebranded AdsPostX to MomentScience. All the latest documentation and updates can now be found at MomentScience Documentation.

Goal

To display a "Moment" in a mobile app. For reference, a "Moment" is either one Offer or a series/collection of Offers served together at a key time in a user's experience.

To implement a Moment in a mobile app, use the Moments API (also known as the Native Ads API) to retrieve Offers from AdsPostX and then render them as you see fit in your mobile app.

Steps

Step 1. Create an API Key

To return a collection of Offers via the Moments API, you will first need to get an API Key.

Note that you will need an API Key scoped for Ads.

Step 2. Configure Moments settings in the AdsPostX dashboard

The number of Offers returned in the Moments API response can be configured in the AdsPostX dashboard. To do this, head to Settings -> Configuration and then locate the Number of Ads setting. Select the number of ads you would like to have in a given moment. Then press Save Configuration.

This will instruct the Moments API to return the selected number of Offers in the response.

Step 3. Construct your API call to return a Moment

The API call that returns a collection of Offers to be displayed may be implemented in one of two ways:

  1. Directly in your app
  2. Via a proxy solution wherein your app contacts your own backend endpoint which then "relays" the request to AdsPostX and returns to your endpoint the API response. Your endpoint will then send the response to your app.

If you opt to use a proxy solution, ensure that the end-user's user-agent and IP address are provided in the Moments API request from your proxy server to ensure appropriate geo and platform targeting.

Step 4. Ensure that impressions are tracked

Every Offer returned includes an impression beacon (offers[].pixel) that needs to be triggered when the Offer is displayed to the user. This is important to implement to ensure correct reporting. Failing to implement the impression beacon will result in inaccurate reports as well as the inability to provide eCPM performance on an individual Offer basis. It also hinders the platform's ability to optimize Offer ranking and ultimately revenue yield.

Further Recommendations

Consider using postbacks to get real-time events on conversions based on the Offers that are served.