Skip to main content
Gravity can update a placement’s ad design without requiring a publisher code change or SDK upgrade. Publishers only install the SDK and mount the appropriate ad component.

React

Render the ad returned by your Gravity API request:
See the JavaScript and React SDK guide for request setup.

React Native

Include GRAVITY_RN_SPEC_OPTIONS in your ad request, then render the returned ad:
See the React Native SDK guide for request setup and list visibility wiring.

iOS

Use SpecAdView with the ad returned by getAds():
See the iOS SDK guide for installation and request setup.

Android

Use SpecAd with the ad returned by getAds():
See the Android SDK guide for installation and request setup.

Handled automatically

The official SDKs handle:
  • compatible server-managed placement designs
  • built-in fallback when no valid design is available
  • impression and click tracking
  • required ad disclosure
  • light and dark themes
  • server-requested feedback controls
A custom design changes presentation only. Tracking, attribution, and billing use the same ad response URLs.

Image ads

When an ad has a product image, Gravity sends an image card layout with it: the image on one side, the copy on the other. The official SDKs render it with no code change, starting at @gravity-ai/react 1.3.0, @gravity-ai/ui 0.3.0 and @gravity-ai/react-native 0.2.0. Older versions keep showing the text card. Ads without an image always use the text card. To preview an image ad, send a test request with testAdFormat: "image" — see Image ads.

Custom placement design

Contact support@trygravity.ai with your placement identifier and desired look. Gravity will configure and validate the design before it goes live.