Skip to main content

How Do I Deploy Surfaces in My App or Website?

There are two common ways that Aampe customers deploy Surfaces
  • Direct Integration
  • Embedded into third-party experiences (e.g. popups via Braze)

Direct Integration

Suppose you have the following text and image elements at the top of your layout. Surfaces Demo Fitness1 Pn
The subtitle was the winner from an A/B test last year, but you also know that some customers identify with other aspects of your business. You would love to give each customer the words that inspire them to use your product.
You have already set up the Surface in Aampe, along with several subtitles that speak to various reasons users have for using your product (click here to revisit how to set up a Surface in Aampe).

To insert Aampe-generated subtitles when a page loads, make use of code similar to the following.
You’ll need three things to call your Surfaces API:
  • proper authorization - an API key
  • surface_id- available within the Aampe composer for each surface
  • contact_id - the unique person identifier used by Aampe
In this example, the API results will populate the subtitle. You can follow the same pattern to personalize other elements such as colors, image URLs, or layout.

Third-Party Integration

Suppose you wanted to populate the same subtitle, but instead of the landing page we’re updating an in-app popup. You follow the same steps of (1) calling the Aampe API and (2) returning the parsed results to whatever tool renders the screen.

API Documentation

See here for the full Surfaces API documentation.