First of all, make sure your app integrates the 1.16 version of the SDK or higher. It includes a built-in action for In-app messages:
The built-in actions are Batch actions associated to a call-to-action of an In-App message, you just need to have the In-App feature enabled to use this feature. When creating a campaign, they allow you to set up actions beyond the different actions associated to a button. These actions do not require any development and can be activated directly via the dashboard when editing the campaign.
How to do it?
Set a tag in your In-App campaign
When you edit your first campaign, you need to manage the formatting of the buttons. Let's imagine the case of an In-App message presenting new app features. The buttons would be: "Discover now" and "Discover later".
At the level of the dismiss button "Discover later", you have to click on "Add secondary action" then on "Add tag".
Create a new collection and the tag(s) to add to your users, or search for tags that exist in the system.
A tag is now associated to your dismiss button "Discover later", so all your users who will click on this button will be associated to this tag.
Once this tag is set up, it will show up in your custom data. It is necessary to activate it in your Settings > Custom data in order to view them on the dashboard when creating the second In-App campaign.
Then, you will be able to retarget all the users who want to discover the new features of your app later on. This will give you an additional way to segment your userbase precisely.
Note that in this example, it would also have been possible to set a tag on the "Discover now" button, so in case you want to send a second campaign presenting the features, you could exclude users who have already discovered them.
Select a tag in a second campaign
When editing the second campaign, in order to retarget or to exclude users grouped under a tag, you will have to add the corresponding collection in the targeting section and then select the desired tag:
Other use cases
You can do the same thing in various other use cases.
in the context of a rating In-App campaign in order to group under a tag all users who have clicked on "Rate the app", you could then exclude them from future rating campaigns.
if you want to communicate about a contest via an In-App message, you can set a tag on the "Participate" button. Then, in a second campaign, you will be able to exclude all users who clicked on the "Participate" button in order to target only those who have not entered the contest.