- On a fashion app, a user is only interested in men’s shoes—not women’s dresses.
- On a news app, a user consistently visits finance and sports articles—but never entertainment or politics.
Setup
1. Define and structure your topic taxonomy
Start by identifying the content categories or topics you want to track. These might be:- Broad verticals like
sports
,finance
, orentertainment
- Product types like
laptops
,accessories
, orpremium
- Authors or brands
- Start with 3–8 topics to keep management simple
- Stay under 20 topics overall to avoid bloat
2. Add code to track topic visits
You can tag users based on the number of times they visit a given topic. In the provided examples, we do the following:- Track one or more topics per page or screen.
- Increment the visit count every time the topic is viewed.
- Immediately tag the user with the updated count on each view.
3. Segment and send personalized messages
Once tags are applied to users, you can target them using:- Segments to build rule-based groups (e.g., users with
gaming >= 3
) - API Filters to dynamically include users in a campaign
- Only message users about specific topics that have visited related pages 5+ times
- Promote posts to users who’ve read more than 3 posts from a specific author
- Offer discounts to shoppers who keep returning to a specific product category
Best practices and tips
Do:
- Test your tag logic using
console.log()
before launching campaigns - Use consistent topic naming conventions across pages
Avoid:
- Using long or overly specific tag keys (e.g., full article titles or long URLs)
- Exceeding OneSignal’s tag limits
- Tagging with personally identifiable information (PII)
Congrats on enriching your user data with contextual information!
Additional resources: