URL Path vs. URL Querystring vs. Javascript Event?

There are four ways to track conversion goals

  1. URL Path: Count a conversion anytime someone visits a page with a specific path: ex. /thankyou.html
  2. URL Querystring: Count a conversion anytime someone visits a page with a specific URL Querystring: ex. page=thankyou
  3. Javascript Event: Count a conversion anytime a specific javascript event is fired in the browser.
  4. Regular Expression: Count ac onversion a specific full domain or subdomain, i.e. blog.yoursite.com.

When to use Path

Use the "path" method when there's a specific page or site path visited by users who convert. The Path method lets you use a wildcard to include URLs "to the right" of the specified path.

Path Examples:

You have a page at "domain.com/thankyou" that visitors see after converting. You would make a path conversion goal with:

/thankyou

You have a section of your site with 50 different pages and anytime someone visits one of those pages, that's a conversion. These pages are structures like domain.com/section/23 and domain.com/section/45. Your path conversion goal would look like this:

/section/*

Note that we used a wildcard to avoid having to make a ton of conversion goals for every page that starts with "/section".

When to use Querystring

Use the "querstring method" for conversion goal tracking when the URL visited by converted users has a unique querystring in it. A querystring is a word or bundle of characters that comes in a URL after a "?". If you've ever seen those very long URLs like "domain.com/?url=awesome&perfectaudience=amazing&retargeting=terrific", those are querystring: "awesome", "amazing", ad "terrific."

So perhaps you want to track a conversion goal every time someone visits a page with a URL with "purchase=true" after the ? in it.

That'd be the perfect time to use the Querystring method.

When to use the Javascript Event method

Use the Javascript event tracking method for conversion goals when converted users don't see a unique path or querystring. Using the javascript API, you can set an event to fire to our system when a specific action happens and we'll record that as a conversion. You can read the details here. We also have a list of use cases with example code here: Tracking API Cookbook

When to use the Regular Expression method

Use the "regular expression" conversion method to trigger a conversion goal when the URL they visit matches a regular expression. This method is similar to the "Path" method but more complex, requiring knowledge of regular expressions. While "path" conversions work great for 90% of use cases, like Querystring conversions, sometimes you just need to use a regular expression. Learn how to set these up here.

Feedback and Knowledge Base