FREE Google Customer Reviews and ratings

Request and discuss enhancements to ShopSite

FREE Google Customer Reviews and ratings

Postby ZASales » Tue Aug 29, 2017 1:15 pm

Can we get a field added for expected delivery date so we can utilize The FREE Google product reviews that show up on google product search results....

all we need is a field that asks how many days to estimated delivery... make it something we can change or static that's good for all orders....

I don't know if there is some quick way to pull the date off the server and add four days to it and insert it in that field or not... Any suggestions?

This is the link to google that explains it all. <script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer></script>

This is the code you need to include on checkout for Google to send the customer a request to rate your webstore/company.... we have everything but the expected delivery date.

<script>
window.renderOptIn = function() {
window.gapi.load('surveyoptin', function() {
window.gapi.surveyoptin.render(
{
"merchant_id": GOOGLE MERCHANT ID,
"order_id": "ORDER_ID",
"email": "CUSTOMER_EMAIL",
"delivery_country": "COUNTRY_CODE",
"estimated_delivery_date": "YYYY-MM-DD"
});
});
}
</script>

Were really anxious to get this going so we can start showing some reviews and ratings on google and boost sales...!!!!

Any help is appreciated even if it's a stop gap work around solution!!

ZASales
ZASales
 
Posts: 6
Joined: Tue Aug 29, 2017 1:01 pm

Re: FREE Google Customer Reviews and ratings

Postby loren_d_c » Tue Aug 29, 2017 1:43 pm

Your link didn't make it through, could you try again?

Where does that code need to go? No matter where you put it, you should be able to get the current date/time via JavaScript, here's an example tutorial:

https://www.w3schools.com/js/js_date_methods.asp

-Loren
loren_d_c
 
Posts: 2525
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: FREE Google Customer Reviews and ratings

Postby ZASales » Tue Aug 29, 2017 1:52 pm

Sorry about that link! here it is: https://support.google.com/merchants/answer/7188525?hl=en

Yes getting the date is not a problem, the issue is it's "expected delivery date" so it need to be sometime in the future or I'm sure google is going to know we're cheating.

What I need is whatever the current date is plus four days added to it as the transit time, and that date needs to be input into the ("estimated_delivery_date": "YYYY-MM-DD") field.

Seems like if one is smart enough there should be some way to accomplish it.... I certainly am not and I could not find anyone to plagiarize it from as well!

Thanks for the help!

Bob
ZASales
 
Posts: 6
Joined: Tue Aug 29, 2017 1:01 pm

Re: FREE Google Customer Reviews and ratings

Postby loren_d_c » Wed Aug 30, 2017 9:54 am

Maybe one of the methods suggested here would work:
https://stackoverflow.com/questions/3572561/set-date-10-days-in-the-future-and-format-to-dd-mm-yyyy-e-g-21-08-2010
loren_d_c
 
Posts: 2525
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: FREE Google Customer Reviews and ratings

Postby ZASales » Wed Aug 30, 2017 3:33 pm

Ok got the date to work and in the right format and order, but it does not want to get into that date field... when you run it by itself it generates the right date four days in the future so I got that part solved at least. What am I not understanding to get it to appear in that date field? I thought the variable name was DateHelper...
Thanks for all your help!
Bob

var DateHelper = {
addDays : function(aDate, numberOfDays) {
aDate.setDate(aDate.getDate() + numberOfDays); // Add numberOfDays
return aDate; // Return the date
},
format : function format(date) {
return [
date.getFullYear(),
("0" + (date.getMonth()+1)).slice(-2), // Get month and pad it with zeroes
// Get full year
("0" + date.getDate()).slice(-2), // Get day and pad it with zeroes
].join('-'); // Glue the pieces together
}
}

// With this helper, you can now just use one line of readable code to :
// ---------------------------------------------------------------------
// 1. Get the current date
// 2. Add 10 days
// 3. Format it
// 4. Output it
// ---------------------------------------------------------------------
document.body.innerHTML = DateHelper.format(DateHelper.addDays(new Date(), 4));

<!-- BEGIN GCR Opt-in Module Code -->
<script src="https://apis.google.com/js/platform.js?onload=renderOptIn"
async defer>
</script>

<script>
window.renderOptIn = function() {
window.gapi.load('surveyoptin', function() {
window.gapi.surveyoptin.render(
{
// REQUIRED
"merchant_id":123456,
"order_id": "ORDER_ID",
"email": "CUSTOMER_EMAIL",
"delivery_country": "COUNTRY_CODE",
"estimated_delivery_date": "DateHelper",

// OPTIONAL
"opt_in_style": "OPT_IN_STYLE"
});
});
}
</script>
<!-- END GCR Opt-in Module Code -->
ZASales
 
Posts: 6
Joined: Tue Aug 29, 2017 1:01 pm

Re: FREE Google Customer Reviews and ratings

Postby gabejackson » Wed Mar 28, 2018 9:33 pm

Did you ever get that date to populate? I'm currently stuck on the same problem for our website. Everything in the code is working except there is no javascript variables for current or future dates in Shopsite. Would love to have the fix it and get this going. The hosts at Lexiconn did a great job of helping me get everything else in the script to work but the lack of a variable in Shopsite has the whole thing fubar.
gabejackson
 
Posts: 1
Joined: Wed Mar 28, 2018 9:28 pm

Re: FREE Google Customer Reviews and ratings

Postby loren_d_c » Thu Mar 29, 2018 10:26 am

Even if ShopSite provided a variable for the order date you'd still have the same issue of changing that date into the format that Google wants. I googled for "get javascript date in google customer reviews format" and found this solution, which looks similar to ZASales' solution, note that they point out that the variable name used in the final JavaScript to Google shouldn't be in quotes, since it is a variable, quoting it passes it as a literal string containing the name of the variable instead:

https://stackoverflow.com/questions/43944257/google-customer-review-script-code-estimated-delivery-date

-Loren
loren_d_c
 
Posts: 2525
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: FREE Google Customer Reviews and ratings

Postby ZASales » Thu Mar 29, 2018 11:38 am

Gabe,
Can you post your code that you got from Lexiconn so I can compare it to what I've done see whats going to work best?

I'm done beating head into wall on this one, I'm going to forward what we have to a programmer and have him figure it out and give him some green.

We really need to get this going as goggle is now factoring in reviews.... plus it's free and it's the word of God.. or I mean Godoogle.... We used to use resellerrattings until they hit us up for almost $500 a month... we had usually 10 reviews a month...!!! I actually called and talked to the woman that owns runs it and she did not seem to think that was too much $ a review...!!!!

Bob
ZASales
 
Posts: 6
Joined: Tue Aug 29, 2017 1:01 pm

Re: FREE Google Customer Reviews and ratings

Postby fath3rFlamethrwr » Thu Apr 26, 2018 2:53 pm

The following code entered into the Commerce Setup > Order System > Thank You screen's "Text at the bottom of the Thank You screen" field should work perfectly to add 4 days onto the estimated delivery date and submit it all to GCR. Just be sure to edit in your own 'merchant_id' number into the code, have your Website URL both verified and claimed in Google Merchant Center, and have Customer Reviews enabled (under settings -> Merchant Center programs).

Code: Select all
<!-- BEGIN GCR Opt-in Module Code -->
<script src="https://apis.google.com/js/platform.js?onload=renderOptIn"
  async defer>
</script>

<script>
var DateHelper = {
addDays : function(aDate, numberOfDays) {
aDate.setDate(aDate.getDate() + numberOfDays); // Add numberOfDays
return aDate; // Return the date
},
format : function format(date) {
return [
date.getFullYear(),
("0" + (date.getMonth()+1)).slice(-2), // Get month and pad it with zeros
// Get full year
("0" + date.getDate()).slice(-2), // Get day and pad it with zeros
].join('-'); // Glue the pieces together
}
}

var delivery = DateHelper.format(DateHelper.addDays(new Date(), 4));  // Add 4 days


  window.renderOptIn = function() {
    window.gapi.load('surveyoptin', function() {
      window.gapi.surveyoptin.render(
        {
          // REQUIRED
          "merchant_id": 123456,
          "order_id": ss_ordernum,
          "email": ss_email,
          "delivery_country": "US",
          "estimated_delivery_date": delivery
        });
     });
  }
</script>
<!-- END GCR Opt-in Module Code -->

<!-- BEGIN GCR Language Code -->
<script>
  window.___gcfg = {
    lang: 'en_US'
  };
</script>
<!-- END GCR Language Code -->


Enjoy!
fath3rFlamethrwr
 
Posts: 1
Joined: Wed Mar 27, 2013 7:24 am

Re: FREE Google Customer Reviews and ratings

Postby ZASales » Thu Apr 26, 2018 7:30 pm

Thanks so much for that code, really appreciate it!

I've implemented it and it's popping up the request for the customer to get a google review so hopefully all the data is getting sent!

This is REALLY going to help us out big time, consumers love to see google reviews!

ZASales
ZASales
 
Posts: 6
Joined: Tue Aug 29, 2017 1:01 pm

Re: FREE Google Customer Reviews and ratings

Postby ZASales » Fri Apr 27, 2018 8:46 pm

Ok, after many emails and LOTS of help from the PAIR Networks Shopsite Support team ( Super great group of customer support people there!!! ) I have google friendly and shopsite friendly code that works! I have delivery time set for six days, google sends out the email three days after expected delivery date. Reviews are updated on a WEEKLY basis on your merchant center page so don't expect to see them show up immediately.

You will need to insert your google merchant ID there where the 1234567 is
If you want change the delivery date then replace the 6 with however many days you expect delivery to take.

DO NOT CHANGE ANYTHING ELSE >>> A SINGLE EXTRA SPACE MAY RUIN IT ALL.

This all needs to be pasted into the "Text at the bottom of the Thank You screen" box on the Commerce > Order System > Thank You screen.

Enjoy!

<!-- BEGIN GCR Opt-in Module Code -->
<script src="https://apis.google.com/js/platform.js?onload=renderOptIn"
async defer>
</script>

<script>
var DateHelper = {
addDays : function(aDate, numberOfDays) {
aDate.setDate(aDate.getDate() + numberOfDays); // Add numberOfDays
return aDate; // Return the date
},
format : function format(date) {
return [
date.getFullYear(),
("0" + (date.getMonth()+1)).slice(-2), // Get month and pad it with zeros
// Get full year
("0" + date.getDate()).slice(-2), // Get day and pad it with zeros
].join('-'); // Glue the pieces together
}
}

var delivery = DateHelper.format(DateHelper.addDays(new Date(), 6)); // Add6 days


window.renderOptIn = function() {
window.gapi.load('surveyoptin', function() {
window.gapi.surveyoptin.render(
{
// REQUIRED
"merchant_id": 1234567,
"order_id": ss_ordernum,
"email": ss_email,
"delivery_country": "US",
"estimated_delivery_date": delivery,
});
});
}
</script>
<!-- END GCR Opt-in Module Code -->

<!-- BEGIN GCR Language Code -->
<script>
window.___gcfg = {
lang: 'en_US'
};
</script>
<!-- END GCR Language Code -->
ZASales
 
Posts: 6
Joined: Tue Aug 29, 2017 1:01 pm


Return to Enhancement Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron