Integrating MomentPerks
Who is this for: Partners, web developers, and app developers choosing how to integrate MomentPerks and needing guidance on which method fits their platform.
Outcome: Select the most appropriate integration method-JavaScript SDK for low-code web use, or the MomentPerks API for custom rendering-and begin the relevant implementation.
Overview
MomentPerks lets you deliver personalized offers at the most relevant moments in the user journey, like after a purchase, during a content unlock, or when a milestone is achieved. You can integrate MomentPerks into your online store, website, mobile app, or other digital experiences.
This guide walks you through the available integration methods and helps you choose the best approach based on your platform, customization needs, and development resources.
Integration Methods
MomentScience offers two primary ways to integrate MomentPerks:
1. JavaScript SDK (Recommended for Websites)
Use this method for a quick, low-code integration.
- Copy the JavaScript snippet from the MomentScience dashboardο»Ώ
- Paste it into the <head> of the page where offers should appear, such as a checkout confirmation or reward screen
- Customize the appearance using the MomentPerks Theme Editor in the dashboardο»Ώ
This option is ideal if you want to get up and running with minimal development effort.
2. MomentPerks API (POST /native/v2/offers.json)
Use the API if you need complete control over offer rendering, layout, and integration logic.
- Retrieve offer data in JSON from the API.
- Render offers in your own UI for maximum flexibility.
- Integrate with custom web apps, native mobile apps, or embedded experiences.
This option is recommended for teams that require deep customization or are integrating into platforms outside of traditional web environments.
Platform-Specific Playbooks
We also provide integration playbooks tailored for mobile apps and hybrid environments, including:
A. Moments Prefetch Integration
The Moments Prefetch Integration lets your app or website load offers in advance so theyβre ready to display instantly when users reach the relevant screen.
Benefits of prefetching:
- Reduces offer load times
- Ensures smoother user experiences
- Works with both SDK and API integrations
Available prefetch playbooks:
- ο»ΏReact Native - MomentPerks Prefetch Integration GuideReact Native prefetch integrationο»Ώ
- ο»ΏAndroid β MomentPerks Prefetch Integration GuideAndroid (Kotlin) prefetch integrationο»Ώ
- ο»ΏSwift β MomentPerks Prefetch Integration GuideiOS (Swift) prefetch integrationο»Ώ
- ο»ΏFlutter β MomentPerks Prefetch Integration GuideFlutter prefetch integrationο»Ώ
B. Serving MomentPerks in Mobile Apps (Using the Moments API)
This set of playbooks provides a high-level guide for implementing MomentPerks in mobile apps using the MomentScience Moments API.
Available mobile playbooks:
- ο»ΏReact Native - MomentPerks API Integration GuideReact Native integrationο»Ώ
- ο»ΏAndroid (Kotlin) - MomentPerks API Integration GuideAndroid (Kotlin) integrationο»Ώ
- ο»ΏiOS(Swift) - MomentPerks API Integration GuideiOS (Swift) integrationο»Ώ
- ο»ΏFlutter - MomentPerks API Integration GuideFlutter integrationο»Ώ
If you're unsure which method is right for you or need help getting started, contact our team at [email protected] our team is happy to guide your implementation.