Analytics
2.7K members online now
2.7K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Partial Match Regular Expressions

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi,

 

My website is an ecommerce website similar to Expedia.com. When a user searches for the flights, hotels etc, the dynamic URL's will be generated. All the dynamic URL's are single page application, I mean the URL's won't load browser wise. We are more concerned about the Funnel Visualization, in particular drop-offs.

 

Since, analytics can't record SPA url's in default, we are pushing the SPA url's with the help of below datalayer code.

 

<script type="text/javascript">
   dataLayer.push({
      'event':'VirtualPageview',
      'virtualPageURL':'/flight/result.................................',
      'virtualPageTitle':'Flight Results'
});
</script>
 
We are facing major issue on writing regular expression that matches with all my flight scenarios, hotels etc.
 
Now, my questions is, if I write partial match regular expression that matches with all my flight scenarios and push the same partial match with the help of data layer do it help me in finding drop offs under funnel visualization?
 
Thanks in Advance
1 Expert replyverified_user

Partial Match Regular Expressions

Rising Star
# 2
Rising Star

Hi SPrabhu f,

 

This is tough to answer based on what you've shared (and probably the constraints of this forum); that said, if you are trying to do a simple match on the initial virtual sub-directory e.g. ^/flights/result and then ^/flight/selection and on to ^/hotel/selection  etc. etc.

 

You could apply your logic and then update your virtual pageview e.g. ^/step1/flight/results

Hope that helps.

 

Best,

 

Theo Bennett

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Partial Match Regular Expressions

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi Theo,

 

You meant to say instead of tracking all the dynamic virtual urls, just tracking the sub-directory like ^/flights/results would help me in finding the number of drop-offs using funnels?

Partial Match Regular Expressions

Rising Star
# 4
Rising Star

Hi,

 

Yes if only the funnel steps match those directories then you can simply do it as I laid out and it will match any variations.

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Partial Match Regular Expressions

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

Hi Theno,

 

Thanks for your reply, we have implemented the same in our results page but we are facing another new issue. 

 

Whatever, hits coming to the results page through adwords is showing as Google organic traffic in real time. Even the adwords conversions are added to the Google organic conversions after implementing this.

 

When a hit comes from adwords, Google click id is added to the landing page. During that time, real time is showing traffic source as CPC but when they move to the results page, traffic source is changing to Google organic.

 

 

I'm I removing the cookies by implementing the data layer code in the results page. 

 

Below is the data layer code added in the results page

 

<script type="text/javascript">
   dataLayer.push({
      'event':'VirtualPageview',
      'virtualPageURL':'/flight/result',
      'virtualPageTitle':'Flight Results'
});
</script>
 
What might be the reason for this?
 

Partial Match Regular Expressions

Rising Star
# 6
Rising Star

Hi, so I'm a little confused as you said two things:  1.  AdWords traffic is Organic in real time, then AdWords (google/cpc) is showing on the landing page in real time but subsequent pageviews show as organic?  Or is it once they leave the landing page and move from there? 

 

It sounds like you have the accounts (GA and AW) linked and auto-tagging applied, yes?  Do you also use the same GTM container and GA tags withing across all pages?

 

-Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Partial Match Regular Expressions

[ Edited ]
Follower ✭ ☆ ☆
# 7
Follower ✭ ☆ ☆

Hi Theo,

 

Thanks for your prompt response.

 

1) Once a user from adwords, moves from the landing page to results page, it is showing as Google organic in real time. Even the conversions are showing as Google organic instead of adwords. I crossed check it by clicking my ad, when I hit my landing page it showing as adwords traffic but when I move to results page problem occurs.

 

2) Yes, adwords account is linked and we use the same GTM container across the website.

 

I setup my Tags and Triggers by following this article http://www.webmethod.co.uk/blog/2015/06/tracking-virtual-pageviews-in-google-tag-manager-google-anal...

 

As I see, once a user click an ad, Google is passing gclid to track the metrics. But when they move to the results page, in order to track dynamic virtual results pages we are just passing that results path to analytics like this /flight/result using data layer. So, are this creating an issue?

 

 

Partial Match Regular Expressions

Rising Star
# 8
Rising Star

No, once the user advances to the next page, the GCLID is gone in any instance.  The server already recognizes the source and it's set.   The virtual pageview is not the problem.  You could easily test this by removing the virtual pageview and testing in preview.

 

I looked at the link and there is nothing overtly problematic is the way the tag is configured.  I don't think the event is necessary unless you have a lot of latency and the dataLayer is not always available on page load but it should work fine. 

 

So you need to go back to basic blocking and tackling here as something else is causing this problem.   Use chrome tag assistant (look for it in the Chrome Store) to record the session and watch to see where the breakage occurs.  Hopefully you don't have any utm tags on your site overwrting the source!  Smiley Happy

 

-Theo

 

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Partial Match Regular Expressions

Follower ✭ ☆ ☆
# 9
Follower ✭ ☆ ☆

We didn't face any issues on Adwords conversions tracking and in real time before the virtual pageview tracking was implemented. 

 

As per your suggestion, will test it by removing virtual pageview tracking to see any other issues are there normally.