Opt-in integration is a required step for GCR

Google customer reviews is the program for get better SEO in the e-commerce, how can integrate the badge code, I already tried but it doesn´t work
here is the code:
< script src = “https://apis.google.com/js/platform.js?onload=renderBadge
async defer >
< /script>

< script >
window.renderBadge = function () {
var ratingBadgeContainer = document.createElement(“div”);
document.body.appendChild(ratingBadgeContainer);
window.gapi.load(‘ratingbadge’, function () {
window.gapi.ratingbadge.render(
ratingBadgeContainer, {
// REQUIRED
“merchant_id”: 116709132,
// OPTIONAL
“position”: “BOTTOM_LEFT”
});
});
} < /script>

thanks in avance.
Andres

Hi Andres,

The code you have pasted looks like scripts tags for an HTML document, not a javascript file. Try to use the Wix HTML Component and paste the code there - this should do the trick.


Mr. Yoav followed his recommendation but, he does not recognize it, it seems that something is missing to show the Google badge. Please see the print screen and thanks

Hi Andres,

It looks like you have some spaces in the HTML code that break it.

The code, in order for it to be valid, should be

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

<script>
	window.renderBadge = function () {
		var ratingBadgeContainer = document.createElement("div");
		document.body.appendChild(ratingBadgeContainer);
		window.gapi.load('ratingbadge', function () {
			window.gapi.ratingbadge.render(
				ratingBadgeContainer, {
					// REQUIRED
					"merchant_id": 116709132,
					// OPTIONAL
					"position": "BOTTOM_LEFT"
				});
		});
	} </script>
	<!-- END GCR Badge Code -->
	<!-- BEGIN GCR Language Code -->
<script>
  window.___gcfg = {
    lang: 'ES'
  };
</script>

However, having done so, it still does not seem to function. I am getting a 404 from google when this is set in a page. Is this the most up to date code you got from google?


Well Mr. Yoav this is the code that gives Google merchant center but they tell me that I have to update the DOCTYPE, I do not know if that is the problem, then I send the print screen and the Google Merchant center link and again thank you very much
here is the link Optional: Integrate the badge code - Google Merchant Center Help

It’s unclear if this ever got resolved does wix/corvid support an integration with Google Customer Reviews for Merchant Center?

echo the above; how can we add the seller rating?

Hi there,

Welcome to the Corvid Community Forum. Please go through our guidelines and make a new post for your issue.