Recipes
Practical how-to guides for getting specific jobs done with MonetizationOS, from redeeming a Stripe Checkout offer to making surface decisions at the edge or in a native app.
Each recipe walks you through what's needed to get one thing working, ready to adapt to your own setup.
Call an action from a workflow
Fire a trigger from a Surface workflow so an Action runs in response.
Dispatch data to a third-party webhook
Post trigger payload data from an Action workflow to an HTTP endpoint, using Webhook.site to verify delivery.
Display a message to a user
Display a targeted message based on whether a visitor is anonymous or authenticated, using a Surface component workflow.
Geo-restrict and redirect users
Redirect users to locale-specific paths based on their geographic location.
Link Identities with an Endpoint
Create a custom endpoint that links an anonymous identity to an authenticated identity.
Push events to the data layer
Inject a script from a Surface component workflow that pushes identity data into window.dataLayer for analytics tools such as Google Tag Manager.
How to redeem a Stripe Checkout offer
Redeem a Stripe Checkout offer through the offer-redemptions endpoint and return a navigate action with a checkout URL.
Send a Slack message from an Action
Post a Slack message from an Action workflow when a trigger fires.
Decision based on Cookies
Read cookies forwarded by the MonetizationOS proxy in a Surface component workflow and decide what to show.
Make a Surface Decision in an Android app
Call the Surface Decision API from Kotlin with a public key, then apply the component properties it returns without blocking your first render.
Make a Surface Decision in an iOS app
Call the Surface Decision API from Swift with a public key, then apply the component properties it returns without blocking your first render.
Fetch Content from an external system
Fetch data from an external API in a Surface component workflow and display it.
Decision based on Meta Tags
Read meta tags in a Surface component workflow and decide what to show.
Decision based on Query Parameters
Read query parameters in a Surface component workflow and decide what to show.
Truncate content with fade out effect
Truncate article content with a fade-out effect using a Surface component workflow.