Right before this field, there’s a drop-down with the options: Equals to, Begins with, and Regular expression. Let’s break down those options:
The goal will only fire if the page path that a user hits is exactly the page path provided in the goal. This may seem like the best option, but it’s important to remember that many times URLs are appended with query parameters, such as a marketing automation tracking code. If those query parameters are in the URL that a visitor sees, the goal won’t fire. There are exceptions to this rule if you exclude URL query parameters in Google Analytics. Unless you’re sure about the exact page path URL, I don’t recommend using this option.
The goal will fire only when the page path begins with what you provided in the destination field. This is a great option if you’ve structured your thank you pages to accommodate goal groupings. For example, if you have 10 eBooks on your site and their unique thank you pages begin with the same structure, you can create a goal that tracks all eBook downloads. To do that, the thank you pages would need to have a similar structure, such as the following:
To track total eBook downloads, all you would need to do is input the term “/downloaded-ebook” into the destination field and the goal will fire when anyone downloads and eBook on your site. If organized correctly, this is a great way to scale your conversion tracking, especially if you will be tracking more than 20 conversions.
When creating Google Analytics goals, a regular expression is a powerful way to search and select the exact items you’re looking to track. They can get very complex and I recommend becoming familiar with regular expressions for many reasons, but for now, we’ll stick to a simple example:
Say you have 10 eBooks that don’t follow a similar URL structure (like above), but you want to measure them all together. You can write a regular expression to have the goal fire when a user hits any of the 10 unique thank you pages. For example, say you have the following Thank You pages:
To capture users who hit any of those pages, you can write the following regular expression that says, “trigger on this page, or this page, or this page.” Each page path is separated by a pipe and the entire expression is surrounded by parenthesis.