Mobile Apps and PWA
Understand how you can integrate Fresh Relevance into your native mobile apps and PWAs
Fresh Relevance offers a range of APIs to allow you to integrate personalized content and activity tracking into your native mobile apps, PWAs, and other systems.
Mobile Apps
Native apps
Fresh Relevance APIs are natively used to retrieve the underlying data for personalization, for example, the list of product IDs that should be recommended to a visitor on a particular page in the app.
PWAs
PWAs are more like websites. Fresh Relevance is used to retrieve the formatted HTML for the web page so you can use Client-side Personalization or Server-side Personalization, depending on the exact type of app.
Server-Side Personalization, Web Servers and Headless Servers
These run on a server and usually communicate with some form of client application on a web browser. This might be built in a framework like React or Vue.js
Tracking activity
When used on a website, Fresh Relevance captures data about shoppers’ behavior using JavaScript on every web page. This Tracking script sends data to the Fresh Relevance server for each visited page. This data is called a “beacon” and is a JSON document that contains the following types of data (this is not an exhaustive list):
Product Details Page Device ID (Cookie), Product ID, name, description, value Product List Page Device ID (Cookie), array of products Cart Page Device ID (Cookie), array of products Transaction Complete Page Device ID (Cookie), email address
Additional custom data can be sent for both the person, for example, a CRM ID, and for the product(s).
Data capture for mobile apps is very similar – the app makes a call to the Mobile Data Collection API, specifically the Record Activity call for each product, cart or more that is viewed.
Learn more about Server-side Tracking
For full documentation, see Server-side / PWA Activity Tracking
Personalizing content
Slots, Rules and Experiences for Native Mobile Apps
Your app can easily retrieve content from Fresh Relevance for use in the app by making calls to the Content API for each piece of content that is viewed. The content can be retrieved either in JSON format or in HTML format.
To personalize a web page or email, Fresh Relevance “Slot(s)” are used. Each slot is a location for content and can be used on either a web page or an email. You can easily change the content (SmartBlock) displayed by the Slot at any time using content rules configured in the Fresh Relevance UI. The same approach works for mobile app personalization.
We recommend creating a separate slot for each unique use or location where the content appears in the app. This way, you can change the content using rules without needing to add or remove slots.
Experiences allow you to control content across multiple channels such as web, email, and mobile app. There are various ways to use experiences with your mobile apps. See the server-side personalization documentation:
- Fetching Content for your Native App using the API
- Content for your mobile app can be created in the same way as for Web personalization:
Retrieving the content
The mobile app can make a call to the Content API, specifically the Retrieve a slot call, to retrieve JSON or HTML representing the slots content personalized for the viewer. This can then be rendered into the mobile app.
Learn more about Server-side Personalization
For full documentation, see Server-side Personalization
Updated 2 months ago