- Set up URL targeting for your Optimizely experiments without using pages
URL targeting specifies the pages where an experiment or campaign should run. In Optimizely, you can use reusable pages to set up URL targeting. Pages are great for reusing targeting conditions across multiple experiments, but they require some time and strategic thinking to set them up.
Optimizely is introducing an alternative to pages for targeting experiments in Optimizely. This alternative targeting option only requires a URL. This method of URL targeting helps you get started with Optimizely, and it's a quick option when you don't need a reusable URL targeting solution.
Targeting menu and options
Here's how to find the targeting menu for an experiment:
Navigate to Experiments and select the experiment you want to target.
Under Manage Experiment, click Targeting.
The targeting menu (formerly called “Pages”) is where you can 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.
You also have the option to target by saved pages. If you want to create a one-time instance of a page for an experiment, click the Actions dropdown menu and select Use Page as URL Target.
Event tracking with URL targeting
If you don’t 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. Here's an example:
Optimizely will create 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’re using custom snippets, you can still use URL targeting for your experiments. One thing to remember is to make sure that the URL you want to target your experiment to is included in the custom snippet definition. Simply defining a custom snippet by pages won’t include experiments targeted using URL targeting. We recommend adding a URL pattern in your custom snippet definition to include experiments that use URL targeting:
Debugging URL targeting
Targeting by URL creates a page in the Optimizely data model, so debugging an experiment using URL targeting is very similar to debugging an experiment with saved pages.