Targeting in-app messages

Sending people in-app messages depends on two things: the value you pass as their userId and the screen they land on in your app.

Targeting people with in-app messages

Whoever composes messages in your system needs to know how you identify people—whether you use people’s email addresses or a database ID.

When you set up a message in Customer.io, you’ll set a To field. This field is the identifierThe attributes you use to add, modify, and target people. Each unique identifier value represents an individual person in your workspace. that your app uses to identify people in Customer.io. When a person in your campaign or broadcast is identified by the value in the To field, they’ll receive your message. If your app doesn’t identify people using the value you select, we won’t deliver your message to the person. Your messages will appear as Sent, but never Opened or Clicked.

Page rules

You can set page rules when you create in-app messages. These rules determine the pages that your audience must visit in your app to see each message. Before you can take advantage of page rules, you need to:

  1. Track screens in your app. You can add $0.autoTrackScreenViews = true to your CustomerIO.config to automatically track screens or you can track screens manually.
  2. Provide page names to whomever sets up in-app messages in fly.customer.io. If we don’t recognize the page that you set for a page rule, your audience will never see your message.

The SDK automatically uses the class name of UIViewController, minus ViewController, as the name of each page. For example, if you wanted to display an in-app message on a class called EditProfileViewController, you would enter EditProfile as your page rule.

 Make sure your screens use the same names across your apps

If you have a screen called DashboardActivity in Android, and DashboardViewController in iOS, we’ll recognize Dashboard as the screen for both platforms, making it easier for you to set page rules and track events for users across platforms.

Set up page rules to limit in app messages by page
Set up page rules to limit in app messages by page

Keep in mind: page rules are case sensitive. If you’re targeting your mobile app, make sure your page rules match the casing of the name in your screen events. If you’re targeting your website, your page rules should always be lowercase.

The first page rule is Web contains /dashboard. The second page rule is iOS contains Dashboard.
The first page rule is Web contains /dashboard. The second page rule is iOS contains Dashboard.
Copied to clipboard!
  Contents
Current release
 3.1.3
Is this page helpful?