Unique URL for second step of checkout process

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Unique URL for second step of checkout process

Post by AlanW » Fri Jun 11, 2010 10:26 am

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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Unique URL for second step of checkout process

Post by mazhar » Fri Jun 11, 2010 11:07 am

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.

dappy2
Commander (CMDR)
Commander (CMDR)
Posts: 114
Joined: Wed Jan 18, 2006 5:53 pm
Contact:

Re: Unique URL for second step of checkout process

Post by dappy2 » Fri Jun 11, 2010 1:30 pm

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

AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Re: Unique URL for second step of checkout process

Post by AlanW » Mon Jun 14, 2010 3:19 pm

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.

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> 
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.

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")"
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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Unique URL for second step of checkout process

Post by mazhar » Tue Jun 15, 2010 4:25 am

Have a look at following thread. You can incorporate java script to pages in similar way.
viewtopic.php?f=42&t=13217

AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Re: Unique URL for second step of checkout process

Post by AlanW » Tue Jun 15, 2010 9:57 am

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

AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Re: Unique URL for second step of checkout process

Post by AlanW » Tue Jun 22, 2010 7:57 am

Mazhar,

Will changes to the Continue Button (see previous post) break the code?


Best regards,
Alan Wills

AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Re: Unique URL for second step of checkout process

Post by AlanW » Wed Jun 30, 2010 12:45 pm

Mazhar,

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")"
We added GoogleFunnelWidget.ascx to Conlib/Custom

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> 
Once we get answer about CONTINUE BUTTON code we will add reference to GoogleFunnelWidget.ascx to ReceiptPage

Best regards,
Alan Wills

Post Reply