Page 1 of 1

Help with Review Collection Code on Receipt Page

Posted: Mon Jan 12, 2015 9:00 am
by jill224
Hi all,

We recently signed up for ShopperApproved.com, a review collection service and I need to be able to insert their code in the body of our Receipt page to begin collecting reviews after checkout.

I have tried inserting their provided javascript code on several different places in the Receipt.aspx file without any success. From what I understand, if the code is inserted correctly there should be a pop-up with option to place a review. I either get no result at all or an error code that breaks the page. I am not sure exactly what would be the correct place to insert this javascript code to ensure it is included within the body tags for the page and functions properly.

I was hoping someone could help me out with this or offer any suggestions for the best way to get this code implemented and working on the receipt page. It needs to only be on the Receipt page that shows immediately after order is placed. I imagine someone has some similar experience working with this or other review company's such as BizRate, TrustPilot, etc. Any help or tips are greatly appreciated. Thank you!

Re: Help with Review Collection Code on Receipt Page

Posted: Mon Jan 12, 2015 9:21 am
by rmaweb
What are the installation instructions? I'd rather not have to sign-up for the service to see what they are. Some people want their javascript files inserted at the beginning or end of the <body> section, so that may help out in determining this.

Re: Help with Review Collection Code on Receipt Page

Posted: Mon Jan 12, 2015 9:24 am
by jill224
Thanks for looking into this! These are the exact instructions provided:

The following code needs to be placed in the body of their Thank You / Confirmation page. (The Thank You / Confirmation page is the page that customers go to right after they make a purchase. It usually says “Thank You For Your Order” on it.)

------------------ Copy the code below this line ------------------

<!-- Shopper Approved Thank You Code --> <script type="text/javascript"> var sa_values = { “site":---- }; function saLoadScript(src) { var js = window.document.createElement("script"); js.src = src; js.type = “text/javascript”; document.getElementsByTagName("head")[0].appendChild(js); } var d = new Date(); if (d.getTime() – 172800000 > 1421076664000) saLoadScript("//www.shopperapproved.com/thankyou/rate/-----.js"); else saLoadScript("//direct.shopperapproved.com/thankyou/rate/13699.js?d=” + d.getTime()); </script> <!--/Shopper Approved Thank You Code -->

------------------ Copy the code above this line ------------------

Re: Help with Review Collection Code on Receipt Page

Posted: Tue Jan 13, 2015 2:11 am
by nadeem
Copy the below script at Receipt.aspx above the checkoutPage div:

Code: Select all

<script type="text/javascript">
   var sa_values = { "site": 13699 };
   function saLoadScript(src) {
   var js = window.document.createElement("script"); 
   js.src = src; js.type = "text/javascript"; 
   document.getElementsByTagName("head")[0].appendChild(js); 
} 
   var d = new Date(); 
   if (d.getTime() - 172800000 > 1421076664000) 
   saLoadScript("//www.shopperapproved.com/thankyou/rate/13699.js");
   else 
   saLoadScript("//direct.shopperapproved.com/thankyou/rate/13699.js?d=" + d.getTime());
</script>
Hope it will work.

Re: Help with Review Collection Code on Receipt Page

Posted: Tue Jan 13, 2015 10:49 am
by rmaweb
Yeah try nadeem's code, just make sure you substitute the values for the site id with the site ID you should have gotten from Shopper Approved.

var sa_values = { "site": 13699 };
saLoadScript("//www.shopperapproved.com/thankyou/rate/13699.js");
saLoadScript("//direct.shopperapproved.com/thankyou/rate/13699.js?d=" + d.getTime());

Re: Help with Review Collection Code on Receipt Page

Posted: Wed Jan 14, 2015 6:49 am
by jill224
Thank you both so much for your replies. I was able to get this to work right away using nadeem's instructions. I really appreciate the help!

Re: Help with Review Collection Code on Receipt Page

Posted: Mon Dec 18, 2017 10:51 am
by kwikstand
I am looking into using Shopper Approved also, but I want to use Product Reviews as well as Merchant Reviews. Anybody know how to integrate Product Reviews?

Any help wold be appreciated,

Scott