Update the Encore SDK
Trigger components ship in the first release of each SDK that includes them. Trigger components lists each SDK’s minimum version once it’s released. No migration is needed. Your existingshow() calls keep working as they do today.
Identify your user and share what you know
Callidentify() once you know who the user is, as for show(). Encore matches claims and completions to that ID.
Then send the attributes your app already has. Country has its own field, and anything of your own goes in custom. Gender is accepted only from an app rated 18+. This is strongly recommended: country and language already shape which offers a user is shown. Each platform’s user management page has the call:
- Pass the user’s age as
age(whole years) or their date of birth asdateOfBirth, whichever your app has. Every SDK takes both, works the age out on the device, and never sends the date. If you hold only a range, send its lowest end asage. See Sending an age. - A user under 18 is still served offers, from age-appropriate inventory only and with no per-user personalization.
- Only send what you have a lawful basis to share, such as the user’s consent.
Place a Gifts Button at your reward moment
Use the screen that celebrates something the user did: a finished streak, for example. The entry shows only when the reward sheet has offers for this user; until then it takes up no space. See Add a Gifts Button.- Use it in place of your
show()call at that moment, not as well as it. - Keep it clear of controls people tap without looking, such as a send button, so every tap on it is meant.
Place a Claim Reminder on a screen users return to
When a user claims an offer and leaves before finishing it, this card brings them back with a countdown. Add it as its own view on a screen people open on their own, such as your home tab, rather than one they rarely reach. See Add a Claim Reminder.- With no open claim it draws nothing and leaves no gap, so place it inline.
- A tap opens the reward sheet with that offer in it. When the look is dismissible, × hides that reminder on this device.
- Don’t also mount a Claim Reminder where a Gifts Button sits: the Gifts Button turns into the reminder after a claim by itself.
Make it look like your app
Passappearance on the trigger component to set its colors; yours always win over Encore’s. It styles only the trigger component, never the sheet it opens: the sheet keeps the look you give your sheets. See Colors.
headline,subheadlineandctaput your own words on it; each line you leave out keeps the look’s copy. See Your text.icon, next toplacement, picks the icon:gift(the default),appIconornone. See Icon.alignment, next toplacement, sets where it sits when the screen is wider than its look:center(the default),leadingortrailing. See Width and alignment.
Who controls what
Before you ship
Check each of these on a test build:- The SDK is on the first release that ships trigger components.
identify()runs once you know who the user is.- Attributes are sent, with
ageordateOfBirth, and no gender unless your app is rated 18+. - The Gifts Button replaces your
show()call on the reward screen, not both. - The Claim Reminder sits inline on a screen users return to, as its own view.
- Colors are set on the trigger components.
- You claimed a test offer and left without finishing it. When you came back, the reminder showed.
Related
- Quickstart: the code for both trigger components on every platform.
- Troubleshooting: why a trigger component isn’t showing.