Hi, I’m getting desperate to use Google Product Reviews. I t is NOT about showing google reviews on the website, but about transferring our already existing reviews to google. At the beginning we were told that it would be programmable at WIX, but now there is not a single programmer who has a solution for this. Here you can find a few open threads about it, but no statements from Wix or any programmer who has successfully implemented it.
Can anyone explain to me where the real problem is, why this can’t be implemented with velo?
Here more informations:
Opt-in Integration
Important: Opt-in integration is a required step for Google Customer Reviews. The program won’t work on your site and surveys will not be offered unless this step has been completed. The opt-in integration lets Google display the Google Customer Reviews opt-in on your site and offer surveys to customers who have opted in to the program.
Before getting started, verify that you have reviewed the Google Customer Reviews policies and completed the integration requirements for the opt-in:
Your shopping cart and checkout pages must be hosted on the same domain
The confirmation page must be hosted on your own domain
must be added to the top of every webpage
Once verified, follow the integration instructions to add the code snippet below to your order confirmation page and customize the variables as needed. The snippet integration will allow Google to display the Google Customer Reviews opt-in on your website.
Note that Wix is unable to provide support for third-party scripts.
You might want to consider using an HtmlComponent . You can use messages to pass the necessary order information from the page to the script in the HtmlComponent. For more information, see the article Working with the HTML Component in Velo .
it’s not about support, but i don’t understand the basic problem. i can run other code without any problems. we are talking about a marketing measure that makes sense for every store. So WIX must have interest to implement this FINALLY. The requests for this are to be read here for years. Thanks for the tip, I will try to find a programmer who can do something with it.
i’m here because your support on facebook thinks here finally there would be a solution. the problem is a big one, every store needs this google service nowadays
it would be an absolute added value if this would finally work. i am the only one in my area without ratings, a clear competitive disadvantage that i am at WIX
“Note that Wix is unable to provide support for third-party scripts.” Really, we’re talking about a Google service here. With this logic, many services should not work with WIX.
if you want a laugh, here’s the latest feedback after Facebook support did such a great job explaining that someone cares: Thank you for your feedback and patience.
After checking the script you provided in the discussion forum, it looks like this is HTML code with javascript tags.
Because of this, you would need to put this code into an HTML element, as explained here on the pages where you want it to run.
Alternatively, you can add it via your dashboard, see instructions here.
We apologize for the previous confusion and ask you to let us know if you have any further questions regarding adding the script.
Otherwise, I hope I could help you further and I wish you good luck and a pleasant week.
Hi everyone,
Thank you for bringing this to our attention. We’re currently investigating the issue and will report back with an update. Thanks for your patience.
Although I can’t guarantee a solution to the problem, you can try the following once to retrieve order details on the thank you page.
Use the getOrder function on the thank you page to retrieve order information.
Use trackEvent to send tracking events to the external service.
Here you can see an example tutorial where Google Analytics was used as an example.
Please note that we don’t provide coding / code debugging solutions, but give guidance and point you to articles and APIs that will help you learn and achieve your goals.
For more information on Velo by Wix, check out the resources below:
Take the free Code Academy course here
About Velo by Wix - what Velo is and what features it has.
Onboarding to Velo by Wix - introduction to Velo with short tutorials.
Best practices for creating a Velo website.
You can also read our documentation and examples to get a better understanding of what can be done with Velo.
To share a coding problem or question with other Velo experts, we highly recommend visiting our Velo by Wix community website following these guidelines.
I finally figured out a solution to this problem. Don’t know if it will help anyone since this topic is so old, but I hope future people can find this answer.
The process involves using the getOrder function that @stant helpfully posted. On the checkout page, you can use getOrder to grab variables such as the customer email, order number and date.
When you have the variables, we need to pass it to the HTML iframe. Because iframes change the request url to a ‘yourdomain’.fileusr.com, it messes up the Google API call. To workaround this, I used http-functions (add a http-functions.js to your backend code). This is what I have for the code in that file:
`import { ok, badRequest } from 'wix-http-functions';
export function use_gcr(params) {
let resource_options = {
"headers": {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'text/html'
}
};
const customerEmail = String(params.query["email"]);
const customerOrder = String(params.query["order"]);
const customerDate = String(params.query["date"]);
let strBody = `<html>
<head>
<!-- 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": "##########", //change to your ID
"order_id": "${customerOrder}",
"email": "${customerEmail}",
"delivery_country": "US", //country was constant for me, change if needed
"estimated_delivery_date": "${customerDate}",
});
});
}
</script>
<!-- END GCR Opt-in Module Code -->
</head>
</html>`;
resource_options.body = strBody;
return ok(resource_options);
}`
Once the http-function is setup, we can pass the variables to the HTML iframe by changing the .src and plugging in the variables gotten from the getOrder function. Here’s how I had that setup on the checkout page code: