Regular Expression Conversions

Use the "regular expression" conversion method to trigger a conversion when the URL a user visits 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. 


Scenario: Your company blog is located at "http://blog.perfectaudience.com". You want to trigger a conversion goal when users visit the blog, but since the URL uses a subdomain rather than a subdirectory, you can't use the "path" method.

Solution: Create an "regular expression" conversion with target text of "blog\.perfectaudience\.com". If the tracking tag is included on the site, when people visit it, the conversion will trigger.


Technical Details: Your regular expression will be tested against the entire URL your user visits. This differs from Google Analytics, but allows you maximum flexibility in creating your segments. You may use this feature to match protocol, subdomains, domains, paths, querystrings, and hashes (all the components of a URL). All regular expressions are executed with the case-insensitive flag set.

To test your regular expression against the URLs you wish you match, we recommend using an online JavaScript Regular Expression Matcher, like Scriptular. The text entered between the forward slashes on Scriptular should exactly match the text you enter in Perfect Audience.

Important: While we provide extensive support over e-mail for all aspects of Perfect Audience, we cannot teach you how to write regular expressions. If you need help with that, click here for a 3rd party tutorial.