Target Audiences with Segmentation
Not every product update is relevant to every user. If you release a highly technical API feature, showing it to your non-technical marketing users might cause confusion or annoyance. NanoLog solves this with powerful rule-based Segmentation.
Why use Segmentation?
- Relevance: Users are more likely to read and engage with the widget if they know the content is always tailored specifically to them.
- Noise Reduction: Prevent alert fatigue by only notifying users of changes that actually impact their workflow or pricing tier.
- Targeted Upselling: You can use segmentation to show "Pro Feature Released" announcements exclusively to users on the "Free" plan, encouraging them to upgrade.
Defining Context Keys
Before you can segment posts, you must define the "Context Keys" that your application uses. These are properties about your users that you will pass to the widget upon initialization (e.g., plan, role, language).
- Go to your Widget Settings in the dashboard.
- Navigate to the Context Keys or Advanced tab.
- Define the keys your app will use. For example:
plan(Free, Pro, Enterprise) orplatform(iOS, Android, Web).

Applying Rules to Posts
Once your keys are defined, you can apply rules to any update you publish.
- Create a New Update from the Posts dashboard.
- Under the content editor, look for the Segmentation Rules section.
- Add a rule. For example:
planMUST EQUALPro.

- You can add multiple rules to create complex logic (e.g.,
planEQUALSProANDplatformEQUALSiOS).
Passing Context from Your App
Finally, you must ensure your application passes the user's actual data to the widget when it loads. Update your initialization script to include the context object matching the keys you defined:
window.NanoLog.init({
context: {
plan: "Pro",
platform: "iOS"
}
});
If the data provided in the context object matches the rules set on the post, the post will be displayed to the user. If not, it remains hidden!