Inline campaigns are informational notes that are embedded directly into your application's existing user interface. Unlike pop-ups or overlays, these views live within your page layout. Initially, they are hidden and have a height of 0 px. When a campaign is triggered, the view expands with an animation to reveal the content, which typically includes a headline and message. The following image shows an example inline campaign.
Note: The steps in this article apply only to Jetpack Compose. For Android Views inline campaigns, see the Android Views implementation topic.
How inline campaigns work
After you add the campaign components to your layout, the SDK handles the rest automatically:
-
Discovery: When the
Granify.trackPageView(...)method is called, the SDK scans the current activity to identify all availableGranifyInlineComposablelocations. - Matching: If the Contextual Commerce server matches the current shopper to a campaign, it instructs the SDK to activate a specific location on the page.
- Expansion: The SDK locates the correct component, initializes the campaign content, and expands the view for the user to see.
Topics in this section
Select a topic to begin your integration:
|
Topics
|
Description
|
|---|---|
|
Steps to implement Contextual Commerce inline campaigns in your Android application.
|
|
| Describes how to validate your integration by forcing campaigns to appear in specific locations. |