2.2K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
Guide Me

Reg Ex to Exclude pages from goals/reports

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Is it possible to use RegEx to exclude pages from reports?


At the moment, we are grouping together our thank you pages for goals/reports; however, there are some thank you pages we'd like to exclude. How would we do that, for example, in a goal?

1 Expert replyverified_user

Re: Reg Ex to Exclude pages from goals/reports

Rising Star
# 2
Rising Star
Reports and goals are very different things. Using advanced segments, ( is one good overview) you can apply very complex rules to your data. You can use fairly simple exclusion rules rather than trying to lump everything into single regular expression.

Goals, however, are not retroactive -- any change you make is only good going forward. A much simpler approach would to use events rather than attempting to write a regular expression that covers exclusions going forward. Simply add event JavaScript to any thank-you page that you want to associate with a particular goal. See for creating events.

In your case, use something like:

ga('send', {
hitType: 'event',
eventCategory: 'Form',
eventAction: 'Tracking',
eventLabel: 'Paid Lead'

To turn events into goals, go to your Account / Property and:
1. Admin > Goals
2. Click on “New Goal”
3. Look under “Acquisition”
4. click the “Create an Account” radio button
5. Enter a name and select the “Event” radio button
6. Enter the values from your javascript events. You will be given four categories. If all the forms for that goal are action "Tracking" then you could simply enter:
Category: 'Form'
Action: 'Tracking'

This way, adding a new form would not require you to rewrite and test your regular expression.
Director of Marketing | Nehmedia | Partner Profile