Wednesday, March 22, 2017

Regex to Setup a Guest Funnel in Google Analytics

Leave a Comment

How should I setup a guest checkout conversion funnel?

I need to setup a guest vs registered user funnel to track conversions separately. Specifically, we need to look at goal completions (conversions), cart abandonment, bounce, exit, as we A/B different page views (changing UI on middle pages).

Problems:

  • 1) The regex does not seem to work for the guest funnel visualization. Google reports 0 sessions in the visualization funnel, although it shows that 0.8% of visits completed this goal.

  • 2) Ideally, I'd like to NOT tag each guest page with the query string parameter.

The typical flow goes: Cart > Login > Shipping > Delivery > Payment > Review > Complete

I begin at Shipping because that is where the fork occurs for a guest (where we add on the querystring parameter).

Guest Destination Goal

 Regular Expression: ^\/complete\?guest=.*$    Step 1: /shipping?guest=1 (REQUIRED)  Step 2: /delivery  Step 3: /payment  Step 4: /review  Step 5: /complete?guest=1 (Destination) 

Registered User Destination Goal

 Regular Expression: ^/complete$   Step 1: /shipping (REQUIRED)  Step 2: /delivery  Step 3: /payment  Step 4: /review  Step 5: /complete (Destination) 

The registered user goal regex is working thanks to Allen, but the guest goal is still not working as desired.

I have tried these regex:

 ^\/complete\?guest=.*$  \/complete\?guest=.*$  /complete\?guest=.*$  /complete\?guest=1  /complete/?guest=1 

Google says, This Goal was completed in 0 sessions

Yet it shows a destination conversion rate of 0.8% for the goal. My understanding is that this happens because Google only evaluates the last URL, which is a match. However for the session conversions, the regex must apply to all pages in the funnel for the visualization to list the session number.

EDIT: I had a small breakthough, and it is almost working.

I changed the guest regex to /complete\?guest=1$, but I removed the Required setting for the first step. Now I get sessions for steps 2 - 5, but not step 1. So, the problem has to do with the first step of the funnel.

Why doesn't the regex work for step 1?

Does the regex have to be something like:

(begins with shipping OR complete WITH query string)

2 Answers

Answers 1

How about sending virtual page hits? will be great if you have separate templates for each page and send virtual hits.

Answers 2

If I understood correctly, you need a regex for guests, and another for registered users. If that's the case, maybe you could use:

Guests:

\/(shipping\/?\?guest=\d*|complete\/?\?guest=\d*)$ 

Registered users:

\/(shipping\/?|complete\/?)$ 

If you want a single regex for both guests and registered users, maybe:

\/(complete\/?|shipping\/?|shipping\/?\?guest=\d*|complete\/?\?guest=\d*)$ 

Please, let me know if this helps.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment