leaking ecommerce funnel

Sometimes, the urls (and titles) of your pages are not conducive to web analytics reporting. For example, your ecommerce site’s payment, shipping, and order confirmation page may all have the same url for some reason – . To web analytics, all these funnel pages are reported as one page. You are now stuck, you can’t create ecommerce funnels and measuring shopping cart funnel abandonment is impossible. And there is a more subtle and serious issue as well, in your report, you may find hits (events, ecommerce, social, etc) associated with this url, but you won’t know what part of the order process these hits belong to.

checkout.aspx browser bar

Here’s the actual flow we want to track and understand:
ecommerce funnel

If you have a shipping calculator on your shipping page, a card type drop-down on the payment page, social buttons on all pages, you want to track each of these events on each page. However, it will show like this:
events-landing-page-bad-url

All the urls are the same! How do you know if these events happened on the shipping page, payment page or order confirmation page? You might be able to tell from the event names, but in some cases you may not be 100% sure, and this is definitely not clean and ideal.

While fixing the actual real urls and title tags (assigning unique urls and titles per page) would make things very organized, your content management system may not support this, or you might prefer not to spend that time or money on developers.

Luckily, there is a secret, undocumented method that allows you to actually set the page url and title of a visited page in Google Analytics. More importantly, it will actually associate the hits with these new, more meaningful page urls and titles. Your reports will be easier to read and will provide insights that may not have been available before.

The Issue With Virtual Pages

The traditional solution to this would be to use the _trackPageview method and trigger virtual pages for each “step” (i.e. /virtual-page/shipping.html, etc.).

_gaq.push(['_trackPageview', '/new-meaningful-url.html']);

The drawback here though is still, the actual events will not be associated with these virtual pages you’ve created. They will always be connected to the “real” page, which would be /checkout.aspx (as you can see in the screenshot above). You’re still lacking potentially valuable insights.

SECRET HACK! Setting the URL and TITLE in Google Analytics – _set method

With this new _set method, you can manually set the url and title of the page to whatever convenient name you want.

  _gaq.push(['_set', 'page', '/new-meaningful-url.html']);
  _gaq.push(['_set', 'title', 'New Meaningful Title']);

Simply push the new page’s title using _set method before calling your _trackPageview

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_setDomainName', 'e-nor.com']);
  _gaq.push(['_set', 'page', '/new-meaningful-url.html']);
  _gaq.push(['_set', 'title', 'New Meaningful Title']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'https://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

pages-google-analytics

In the case of the ecommerce example mentioned earlier, for each page you’d like to rename, you can pass the preferred url and title so that it’s separated and meaningful in Google Analytics and associated WITH THE HITS:

_gaq.push(['_set', 'page', '/shipping.html']);
_gaq.push(['_set', 'title', 'shipping page']);

OR

_gaq.push(['_set', 'page', '/payment.html']);
_gaq.push(['_set', 'title', 'payment page']);

OR

_gaq.push(['_set', 'page', '/confirmation.html']);
_gaq.push(['_set', 'title', 'order confirmation page']);

events landing page good url

You’ll be able to see events and figure out things like “Did they abandon the cart at the payment page? At the shipping page? What are they clicking on the order confirmation page?” etc.

What do you think? Share what other use cases you might have in mind.

Message Sent

Thank you for registering.

Cardinal Path hosted a live session to connect with you and answer all your questions on Google Analytics.
Get all the expertise and none of the consultancy fees in this not-to-be-missed, rapid-fire virtual event.

Thank you for submitting the form.

Thank you for submitting the form.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Click here to download access the tool.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Success!
Your message was received.

Thank you.

Thank you for registering.

Cardinal Path is continuing with its series of free training. Next we are conducting training on Google Data Studio. Check it out here.

Message Sent

Thank you for registering.

Thank you for your submission.

Your request has been submitted and a rep will reach out to you shortly.

Message Sent

Thank you for your interest.

Thank you for registering.

You should receive a confirmation email from GoToWebinar with your unique webinar login information. If you do not receive this email or have trouble logging in to the event, please email asmaa.mourad@cardinalpath.com.

Thank you for subscribing!

You're now looped into the world's largest GMP resource hub!

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Thank you for registering.​

Paid media spend by Government websites increased a whopping 139% YoY in 2020.

2020 Online Behavior Live Dashboard

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

2020 Online Behavior Live Dashboard

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Success! Thank you
for reaching out.