- Optimizely Feature Experimentation
- Optimizely Full Stack (Legacy)
- Optimizely Web Experimentation
- Optimizely Performance Edge
Set up URL targeting for your Optimizely Experimentation experiments without using pages.
URL targeting specifies the pages where an experiment or campaign should run. You can use reusable pages to set up URL targeting.
Pages are useful for reusing targeting conditions across multiple experiments. An alternative only requires a URL when you do not need a reusable URL targeting solution.
Targeting menu and options
To find the targeting menu for an experiment:
Go to Experiments and select the experiment you want to target.
Click Targeting. The targeting menu (formerly called “Pages”) lets you edit URL targeting settings for an experiment: Editor URL, pattern matching, exclude URLs, test URLs, and activation modes. You can click Save as Page to save your URL targeting settings as a page for future reuse.
Select Target By > Saved Pages.
To create a one-time instance of a page for an experiment, select Actions > Use Page as URL Target.
Event tracking with URL targeting
If you do not want to use an event in more than one experiment, you can create a single-purpose click event by enabling click tracking on elements from the Visual Editor.
Optimizely Experimentation creates a pageview event for the URL you used for URL targeting. The name is listed as Visit Page: URL Targeting for [experiment name] and you can find the associated event ID in the API Names menu.
URL targeting with custom snippets
If you use custom snippets, you can also use URL targeting for your experiments. Make sure that the URL —to which you want to target your experiment—is included in the custom snippet definition. Defining a custom snippet by pages alone will not include experiments targeted using URL targeting. You should add a URL pattern in your custom snippet definition to include experiments that use URL targeting:
Debug URL targeting
Targeting by URL creates a page in the Optimizely Experimentation data model, so debugging an experiment using URL targeting is very similar to debugging an experiment with saved pages.