Widgets & Embeds

Targeting widgets to user segments

Widget targeting controls when, where, and to whom your widgets appear. Use targeting rules to show relevant widgets to specific user groups or on particular pages.

Accessing targeting settings

In the widget builder, navigate to the Targeting section. Here you can configure timing, URL rules, and audience segments.

When to show the widget

Control the timing with these options:

  • Immediate — Widget appears as soon as the page loads

  • On page load — After page content finishes loading

  • On scroll — When the user scrolls down the page

  • Time delay — After a specific number of seconds

Add a delay (in seconds) to any trigger. For example, show the widget 5 seconds after page load.

Where to show the widget

Define URL rules to control which pages display the widget:

  • All pages — Widget appears site-wide

  • All pages except — Show everywhere but exclude specific URLs

  • Selected pages only — Show only on specific URLs

URLs support wildcards using *. For example:

  • https://example.com/blog/* — All blog pages

  • https://example.com/*/pricing — Pricing pages on any subdomain

  • *dashboard* — Any URL containing "dashboard"

Toggle Hide after leaving pages to close the widget when users navigate away from matching URLs.

Targeting user segments

Show widgets to specific user groups based on attributes you define:

  1. Create segments in your dashboard (if not already created)

  2. In the Targeting section, select segments from the dropdown

  3. The widget will only appear to users matching those segments

Using custom attributes

Pass user data through the Frill Script to enable segment targeting:

Frill('identify', {
  email: '[email protected]',
  plan: 'enterprise',
  role: 'admin'
});

You can then create segments based on these attributes (e.g., "enterprise plan users" or "admin role").

For detailed guidance, see Custom user attributes for segmentation and User identification and tracking.

Testing targeting rules

After configuring targeting, test on your website to verify:

  • The widget appears at the right time and on the correct pages

  • Users outside the target segment don't see it

  • URL wildcards match expected pages

Start with broad targeting and refine based on user behavior and feedback.

Was this helpful?