Skip to content

Targeting Overview

Targeting determines which visitors are eligible for an experiment. Visitors who do not match your rules are never assigned.

Targeting is a set of filters applied before variant assignment. It includes URL rules, traffic allocation, and optional audience criteria configured in the dashboard.

Every experiment requires URL rules. The SDK sends the current page URL to /sdk/bootstrap, and the edge service checks whether it matches.

| Match type | Example pattern | Matches | | :--------- | :-------------- | :------ | | contains | /pricing | https://example.com/pricing | | exact | https://example.com/ | Only the homepage | | starts_with | https://example.com/blog | All blog URLs | | regex | ^https://example\.com/product/\d+ | Product pages with numeric IDs |

Traffic allocation (0–100%) limits the share of eligible visitors who enter the experiment. Visitors outside the allocation bucket are excluded before variant assignment.

Assignment uses a deterministic hash of the anonymous ID and experiment key, so allocation is consistent per visitor.

When enabled, returning visitors receive the same variant. The edge stores anonymousId + experimentKey → variantKey in KV.

Disable sticky assignment if you need fresh random assignment on every session (rare).

The dashboard supports additional targeting dimensions:

| Dimension | Example | | :-------- | :------ | | Device | desktop, mobile, tablet | | Country | US, BR, DE | | Browser | chrome, safari, firefox | | UTM parameters | utm_source=newsletter | | Referrer | https://google.com |

flowchart TD
A[Visitor loads page] --> B{URL matches?}
B -->|No| Z[No assignment]
B -->|Yes| C{Traffic allocation?}
C -->|No| Z
C -->|Yes| D{Audience rules?}
D -->|No| Z
D -->|Yes| E[Assign variant]
E --> F[Apply changes + exposure]

Only visitors who pass all active filters are assigned and counted in experiment results.

Pricing page test (US desktop only)

  • URL: contains /pricing
  • Country: US
  • Device: desktop
  • Traffic allocation: 50%

Newsletter campaign landing page

  • URL: contains utm_campaign=summer-sale
  • UTM source: newsletter
  • Traffic allocation: 100%
  • Ttoolab uses an anonymous browser ID — not email or login by default.
  • Avoid sending PII (email, name, phone) in ttoolab.track() payloads unless you have a lawful basis and your privacy policy covers it.
  • Country targeting uses the request’s country code from the edge network, not geolocation APIs in the browser.
  • Respect cookie consent requirements in your jurisdiction before loading the pixel.