Skip to main content
Targeting rule tools control which visitors see an experiment and when it fires. Each experiment has one targeting rule that combines a segment and a trigger, and these tools change them.

Tools

Parameters

Use the exact parameter names that tools/list returns. To bind a saved trigger to an experiment, call targeting_rule_update with triggerConfiguration set to SAVED_TEMPLATE and targetingConfigurationParam set to the trigger ID. To bind a segment to an experiment, call targeting_rule_update with segmentId and segmentConfiguration set to SAVED_TEMPLATE. Pass segmentId and segmentConfiguration together. Accepted enum values: segmentConfiguration is ALL_VISITORS, AUTOPROMO_AUTODEFINED, GRAPHICAL_PAGES, HEAT_SLICE, PAGE, SAVED_TEMPLATE, SITE, or URL, and triggerConfiguration takes the same values except ALL_VISITORS. The targetingConfigurationParam input is a saved trigger ID for SAVED_TEMPLATE, a segment ID for HEAT_SLICE, a full URL for PAGE, or a URL fragment for URL.