Reputation: 101
I'm attempting to set up a funnel in GA based on the destination page being /m/thanks(.*) where there are multiple one-time-offer pages in between that add a additional parameters to the URI.
The desired goal is to measure a Free signup. The flow looks like this..
/m/thanks?id=3LKJE-a723a72bc96cba65&oto=no&oto=no
The oto=no&oto=no
signify that the user has declined both OTO pages, and therefore results in a free lead
Step 1: Landing page: (literal URL)
Step 2: Signup Page: (literal URL)
Step 3: OTO 1: /m/thanks?id=3LKJE-a723a72bc96cba65
The string after ?id=
is dynamically generated, but does not contain &oto=no
/m/thanks?id=3LKJE-a723a72bc96cba65&oto=no
Same id, but contains exactly one instance of &oto=no
I'm not sure the best way to represent step 3 and 4 to make sure I am recording only those pages.
Upvotes: 2
Views: 772
Reputation: 15010
This regex will:
&oto=no
value/m/thanks?
^(?!.*?&oto=no)(?=.*?[?&]id=([^&]*))\/m\/thanks(?=[?])
^
match the start of the string(?!.*?&oto=no)
look ahead an validate we can't find a oto=no
key value set(?=.*?[?&]id=([^&]*))
look ahead and validate we have the id
and capture the value\/m\/thanks(?=[?])
ensure the string starts with /m/thanks?This regex will:
oto=no
in the string/m/thanks?
^(?=(?:.*?&oto=no){2})(?=.*?[?&]id=([^&]*))\/m\/thanks(?=[?])
^
match the start of the string(?=(?:.*?&oto=no){2})
validate that oto=no
exists twice in the query string(?=.*?[?&]id=([^&]*))
capture the id
value.*?(?=[?])
capture the string upto the first ?
Upvotes: 1