Unique URL for second step of checkout process
Unique URL for second step of checkout process
We are setting up a Goals funnel inside Google Analytics to address cart abandonment.
The shipping info and billing steps require two screens to complete the order. Ideally we want to track each page individually to identify where customers abandon the order. Do they bail out on the shipping screen or the billing screen? Because the shipping and billing URL doesn’t change between steps, /Checkout/Default.aspx we can't differentiate between them.
Since Goal funnels need unique URLs for each step, until we’re able to address this, we won’t have a 100% picture of where people are bailing out.
Is there a way to work around this and add a ?step=2 on the second step of the checkout process ?
--Alan Wills
PracticeRange.com
The shipping info and billing steps require two screens to complete the order. Ideally we want to track each page individually to identify where customers abandon the order. Do they bail out on the shipping screen or the billing screen? Because the shipping and billing URL doesn’t change between steps, /Checkout/Default.aspx we can't differentiate between them.
Since Goal funnels need unique URLs for each step, until we’re able to address this, we won’t have a 100% picture of where people are bailing out.
Is there a way to work around this and add a ?step=2 on the second step of the checkout process ?
--Alan Wills
PracticeRange.com
Re: Unique URL for second step of checkout process
Login as admin user and then go to Checkout/defualt.aspx on retail side. Then from bottom edit the page and for content scriptlet select Checkout Page with login. This will turn on multiple screen checkout instead of one page checkout.
Re: Unique URL for second step of checkout process
You should look at the page events in Google Analytics. I think you could use some javascript to force a call to Google Analytics with a custom URL or data.
http://code.google.com/apis/analytics/d ... rview.html
http://code.google.com/apis/analytics/d ... rview.html
Re: Unique URL for second step of checkout process
We could implement event tracking, however, this wouldn’t appear in the funnel visualization. Not a big issue, but we’ll need to remember to do the math when reviewing funnel results. In regards to the funnel, I made a slight modification as I noticed you can jump straight to checkout w/o having to view your basket.
So here is the JavaScript we would need added to the footer of each page.
Once in place, we’ll need to update the “continue” button code on the first billing step. Below is what is currently there, and what we would have to add to put it in place.
Can we add this to the "continue" button without breaking the code?
After we are tracking events, we can take the total number of “Step 2” events and subtract them from the total for this stage of the funnel to see who abandoned.
Best regards,
Alan Wills
PracticeRange.com
So here is the JavaScript we would need added to the footer of each page.
Code: Select all
<script type="text/javascript">
<!--
function recordOutboundLink(link, category, action, label) {
try {
var pageTracker = _gat._getTracker("UA-5561768-1");
pageTracker._trackEvent(category, action, label); setTimeout('document.location = "' + link.href + '"', 100)
} catch (e) {
alert("An exception occurred in the script. Error name: " + e.name + ". Error message: " + e.message);
}
}
function locationHREF(loc) {
try {
setTimeout("window.self.location = \"" + loc + "\"", 500);
return false;
} catch (e) {
alert("An exception occurred in the location. Error name: " + e.name + ". Error message: " + e.message);
}
}
//-->
</script>
Code: Select all
onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$wpm$CheckoutPage$ctl02$ContinueButton", "", true, "OPC", "", false, false))"
Find a way to add:
onclick="javascript:recordOutboundLink(this, "Checkout", "Step 2", "Continue")"
After we are tracking events, we can take the total number of “Step 2” events and subtract them from the total for this stage of the funnel to see who abandoned.
Best regards,
Alan Wills
PracticeRange.com
Re: Unique URL for second step of checkout process
Have a look at following thread. You can incorporate java script to pages in similar way.
viewtopic.php?f=42&t=13217
viewtopic.php?f=42&t=13217
Re: Unique URL for second step of checkout process
Thanks Mazhar,
Noted. That is clean method for including java script to footer of each page.
Will changes to the Continue Button (see previous post) break the code?
Best regards,
Alan Wills
PracticeRange.com
Noted. That is clean method for including java script to footer of each page.
Will changes to the Continue Button (see previous post) break the code?
Best regards,
Alan Wills
PracticeRange.com
Re: Unique URL for second step of checkout process
Mazhar,
Will changes to the Continue Button (see previous post) break the code?
Best regards,
Alan Wills
Will changes to the Continue Button (see previous post) break the code?
Best regards,
Alan Wills
Re: Unique URL for second step of checkout process
Mazhar,
Can you provide example of changes we should make to Continue Button so we don't break the code?
We added GoogleFunnelWidget.ascx to Conlib/Custom
Once we get answer about CONTINUE BUTTON code we will add reference to GoogleFunnelWidget.ascx to ReceiptPage
Best regards,
Alan Wills
Can you provide example of changes we should make to Continue Button so we don't break the code?
Code: Select all
onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$wpm$CheckoutPage$ctl02$ContinueButton", "", true, "OPC", "", false, false))"
Find a way to add:
onclick="javascript:recordOutboundLink(this, "Checkout", "Step 2", "Continue")"
Code: Select all
<%@ Control Language="C#" ClassName="GoogleFunnelWidget" %>
<script type="text/javascript">
<!--
function recordOutboundLink(link, category, action, label) {
try {
var pageTracker = _gat._getTracker("UA-5561768-1");
pageTracker._trackEvent(category, action, label); setTimeout('document.location = "' + link.href + '"', 100)
} catch (e) {
alert("An exception occurred in the script. Error name: " + e.name + ". Error message: " + e.message);
}
}
function locationHREF(loc) {
try {
setTimeout("window.self.location = \"" + loc + "\"", 500);
return false;
} catch (e) {
alert("An exception occurred in the location. Error name: " + e.name + ". Error message: " + e.message);
}
}
//-->
</script>
Best regards,
Alan Wills