Use rules for data segments that include your website visitors

To provide a comprehensive and consolidated view of your Audiences and make audience management and optimization simpler, you’ll see the following improvements in Google Ads:

  • New audience reporting
    Detailed reporting about audience demographics, segments, and exclusions is now consolidated in one place, the “Audiences” tab within the left page navigation menu. You can also easily manage your Audiences from this report page. Learn more About Audience reporting
  • New terms
    We’re using new terms on your audience report and throughout Google Ads. For example, “audience types” (these include similar, custom, in-market, and affinity) are now referred to as audience segments and “remarketing” is now referred to as “your data”. Learn more about the Updates to Audience terms and phrases

While Google Ads creates data segments that include your website visitors, you may want to create your own segments that are customized to your website and audience. This article contains instructions to help you create rules based on the URLs of your website.

Before you begin

New to targeting? Read more about setting up your data segments. If you aren't familiar with your website's code, consider working with a developer or someone who has a technical background.

If you've set up the Global site tag to track your website visitors, you'll see that it consists of a global site tag and an event snippet. Learn how to adapt an existing global site tag for your Google Ads account

Instructions

  1. Follow steps 1-8 in the instructions section of Create a data segment for your website visitors.
  2. In the dialog that opens, add all the conditions that a single page needs to match. To add multiple conditions, click the "+" button to the side of a condition.
  3. Select the information you want to base your segment on. You can choose a basic option like URL, advanced options like referrer URL, parameters sent through the event snippets, or attributes from the Google Merchant Center (dynamic remarketing only).
  4. Select an option, such as "contains," "equals," or "starts with" from the second drop-down menu. Type in the value. Values can be words, a number, or a date, depending on the type of segment you're creating.
  5. Click Done.

Rules for specific pages

You can create rules for people who viewed your homepage, conversion page, or other specific pages.

Create rules for a specific page by selecting "URL" and "equals" from the drop-down menus. Enter the full URL in the text box, copying it exactly as it appears in a web browser and including your site's protocol ("http" or "https"). In cases where you don't know the protocol or have a page that uses both protocols, you can select "contains" and not include the protocol in the URL.

Example

An airline wants to create a data segment of people who visited their spring deals page. They create the rule "URL contains https://example.com/flights/spring-deals."

Rules with multiple conditions

You can create rules with multiple conditions.

Example

An airline creates a data segment of people who searched their website for flights from the JFK airport but not to the JFK airport. The rule has the conditions "URL contains origin=JFK" and "URL does not contain dest=JFK."

"AND" conditions

When your rule contains multiple conditions, visitors are added to the data segment only if they've visited a page which matches all of the conditions. Adding "AND" conditions may make your segment smaller.

Example

A rule has two conditions: "URL contains category" and "URL contains flights." People who visited "http://www.example.com/category/flights" would be added to the data segment. However, people who visited "http://www.example.com/category/travel-deals" and "http://flights.example.com" wouldn't since neither of these pages match all conditions.

All conditions must refer to the same page. For example, don't use rules to create a segment of people who visited one page but didn't visit another page, or people who visited two different pages. To create such segments, use custom combinations.

"OR" conditions

When you add conditions by typing into the text box, visitors are added to the segment when the pages they've visited matches any of the conditions. Adding "OR" conditions may make your segment bigger.

Combining "AND" and "OR" conditions

When you combine both types of conditions in a rule, visitors are added to the segment when the pages they've visited match all of the "AND" conditions and any of the "OR" conditions.

Example

An airline types the "OR" condition "URL contains purchase" in the text box. It also adds a rule with the two "AND" conditions "URL contains category" and "URL contains flights." People who have visited a purchase page or a flights category page will be added to this data segment.

Custom parameters

You can create more sophisticated data segments using custom parameters in your dynamic remarketing tag.

Parameters names and values are not case sensitive. If a parameter shows up more than once in the drop down menu, you only need to select one. For example, "firstname" and "FirstName" function the same, so you would only need to make a parameter using one spelling.

Example

Your event snippet can pass to Google Ads the value of a viewed product (the custom parameter in this example would be "value"). From that information, you could create segments of people who viewed products with a price of less than $100, $100-$500, and $500+.

Referrer URLs

You can create segments to reach people based on the URL they were on before they came to your website by selecting the condition "Referrer URL contains."

Example

To create a segment of visitors who accessed your website from Google's search results, you can create the rule "Referrer URL contains www.google.com.

If someone visits website A and then website B by typing the URL of website B in the address bar, the URL of A can't be used as referrer URL for B. The user must have prompted the referrer to navigate to the other page. This generally happens with the click of a link or button.

Advanced rules

Advanced rules give you more flexibility when setting conditions that a single page must match (available under "Show advanced options" in the "Visitors of a page" template). You can use advanced rules when you want to create rules that apply to multiple conditions that have something in common.

Example

An airline wants to create a segment of people who are looking on their website for information about traveling to any of three destinations (JFK or LAX or IAH) and are departing from SFO.

"OR" relationship

To add a new condition to include visitors who viewed URLs that contain one or more of your terms, click + New condition. Each condition you add stays within the brackets of the set so that the segment you define will include visitors who viewed any URL that contains any of your terms.

Example

An airline creates a segment that looks like this: [Matches any of these conditions: "URL contains arrivals," "URL contains departures"], the data segment will include visitors who viewed any URL that contains "arrivals" or any URL that contains "departures."

"AND" relationship

To add a new set of conditions to include visitors who viewed a URL that has all the terms in the same URL path, click + New set. When you add a set, you'll see new brackets added to your segment definition so that your segment will include visitors who viewed any URL that contains all your terms.

Example

An airline creates a segment that looks like this: "URL contains arrivals" AND "URL contains departures," the data segment will include visitors who viewed any URL that contains both "arrivals" and "departures" in the same URL.

You can't combine different pages using "AND." However, "any of these conditions" (OR) applies to different pages. You also can't add a new set of conditions ("AND") to create a rule-defined segment that includes people who visited a combination of different webpages.

Example

An airline can't create a rule to include people who visited the "arrivals page" AND the "departure page." If you'd like to combine different pages, you need to use custom combinations.

Formatting rules

Rather than enter the full URL to create a rule, you can enter key parts of it.

Note: To protect user privacy, content following a "#" in your URL won't be used for segment rule evaluation.
Descriptive URLs

If your website uses descriptive URLs, isolate the key part of the URL to create conditions for your rule.

Example

An airline wants to create a segment of visitors to their flights pages and all sub-URLs, including visitors to pages about Washington.

  • "www.example.com/flights"
  • "www.example.com/flights/washington"
  • "www.example.com/flights/washington/seattle"
  • "www.example.com/flights/washington"
  • "www.example.com/flights/washington/tacoma"

To do so, they create the condition "URL contains flights."

Non-descriptive URLs

If your websites uses non-descriptive URLs, usually you can't use this type of URL to create data segments; you can use custom parameters instead. However, there are some non-descriptive URLs that you can use to create segments. For example, if you use IDs to identify a category or product you can use the IDs to create segments.

Example

An airline wants to create a segment of visitors to their flight pages that have the ID "category_id=23," like "www.example.com/?category_id=23&product_id=456." To do so, they create the condition "URL contains category_id=23."

Homepage URLs

If your homepage URL is structured like "www.example-site.com/index.html," type the homepage URL in the text box. If your site doesn't use "index.html," you need to use rules. You might want to use "contains" instead of "equals" when you create your segment. If you use "equals," the page URL needs to match exactly what you enter, and the URL may or may not include "www" or "https."

Google Ads does not permit the implementation of tags on pages related to policy-restricted offers. Learn more about the Personalized advertising policy
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
73067
false