Hosting the Receipt Page on your own custom URL requires three easy steps:
Choose your StoreFront, and click on the Conversion Tracking tab. Once that page loads, click on the Advanced Tab.
Navigate to the "Conversion and Tracking" tab of the Screen Branding Themes Editor.
Main Menu → Configuration → screen branding → Conversion and Tracking (tab) |
Click the save
button.
When the "Custom Thank You URL" is configured (as shown above), UltraCart will actually load the UltraCart receipt page but it will appear as the "please wait...in progress" screen. This allows UltraCart to load any configured, supported pixels or custom tracking pixels/script configured in the "Conversion HTML" field of the "Other" section. |
When placing test orders using a configured "test" credit card, there is a checkbox setting that determines whether or not tracking pixels should be fired. Please make sure you have that checkbox setting configure appropriate to your needs. |
If you use the "Custom Thankyou URL" field described above, skip this step and proceed to the "Coding your custom receipt page" section below, unless you require item specific triggering of custom thank you pages, in which case this method combined with the IfPurchasing special tag in the receipt page with allow for selective triggering of item specific thank you pages within a single screen branding theme. |
Navigate to the "Screens" tab of the Screen Branding Themes Editor.
Main Menu → Configuration → screen branding |
Special coding needs to be added to the Header and Footer of your screen branding In the list of screens, click on the Receipt
screen.
Enter the following into the Header area of the Receipt Screen
<html> <head> <meta http-equiv="refresh" content=0;url=http://www.yoursite.com/receipt.html?orderText=[ordertexturlencoded]> </head> <body> <div style="display:none;"> |
Same example as above combined with the IfPurchased token to selective trigger the customer thank you for a specific item (in this case itemID 001)
<html> <head> [IfPurchased=001]<meta http-equiv="refresh" content=0;url=http://www.yoursite.com/receipt.html?orderText=[ordertexturlencoded]> <div style="display:none;"> [/IfPurchased] </head> <body> <div style="display:none;"> |
When copying and pasting the code above, make sure to edit this portion to reflect your actual website: www.yoursite.com/receipt.html |
Enter the following in the Footer Area of the Receipt Screen.
</div> </body> </html> |
Enter the following in your receipt.html page on your site to capture and display the receipt details:
Please notice that the orderText is decoded twice. This is because the orderText will often be encoded twice during the assembly of the redirection url. The double encoding is necessary to prevent parts of the order text from corrupting the url. |
<script type="text/javascript" language="JavaScript"> function gup( name ) { name=name.replace(/[\[]/,"\\\]").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; } document.writeln("<PRE>" + decodeURIComponent(decodeURIComponent(gup("orderText"))).replace(/\+/g," ") + "</PRE>"); </script> |
Almost all of the token supported in the conversion HTML section can also be used within the custom thank you URL. For example if you wanted to pass the current stage of the order over to your thank you page you would add:
¤tstage=[currentstage] |
to the URL. Likewise you could pass the custom fields using the tags [customfield1] through [customfield7]
We recommend that you put all your conversion pixels within the UltraCart system, but some trackers can not deal with the multiple domains. If so, make sure that you pass over the currentstage token and check that it's either the value SD (for shipping department) or CO (completed order) before firing the pixels on your page. Otherwise you could be firing conversion pixels for orders that are sent to your Accounts Receivable for fraud review. |
Test Credit Card or Electronic Check Payments (test credit card configuration)