Step-by-step guide for adding Google Customer Reviews opt-in on the order confirmation page in PrestaShop 9 using HTML Box Pro and dynamic order variables.
Customer reviews are one of the strongest conversion drivers in e-commerce. Google Customer Reviews helps you collect trusted post-purchase feedback that can support your brand visibility in Google services.
In this guide, you will learn how to implement the official Google Customer Reviews opt-in script on the Order Confirmation page in PrestaShop 9 using HTML Box Pro and order shortcodes.
The real game changer is the module's dynamic variable engine: it automatically injects live order data into each shortcode used in your script. This is where HTML Box Pro truly shines, giving you exceptional flexibility, enterprise-level precision, and the power to launch advanced, personalized integrations in minutes without writing custom backend logic. WOW-level efficiency for real-world e-commerce workflows.
A configured Google Merchant Center account with Google Customer Reviews enabled, plus your numeric Merchant ID.
A running PrestaShop 9 store and HTML Box Pro with order shortcode support. The latest module release is recommended, but version 4.0.3 is sufficient for this implementation.
Open your PrestaShop back office and go to the HTML Box Pro configuration screen.
If the block is not active or group visibility is limited to the wrong audience, customers will never see the opt-in window. Before testing, always verify Active = ON and confirm your group selection.
Paste the code in HTML mode (not as a Smarty template). Replace the Merchant ID with your own value.
Before pasting the script, enable the extended editor in the module general settings. The standard PrestaShop editor can remove or inject unwanted HTML tags, which may deform the code and break the integration.
You must change merchant_id to your real Google Merchant Center ID. Do not leave the example value in production, otherwise Google Customer Reviews opt-in will not work correctly for your store.
<!-- BEGIN GCR Language Code -->
<script>
window.___gcfg = {
lang: '{id_lang}'
};
</script>
<!-- END GCR Language Code -->
<!-- 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": 123456789,
"order_id": "{order_id}",
"email": "{order_customer_email}",
"delivery_country": "{order_delivery_country}",
"estimated_delivery_date": "{order_delivery_date}"
});
});
}
</script>
<!-- END GCR Opt-in Module Code --> {id_lang} Uses the customer language ISO code, so the opt-in displays in the proper language context.
{order_id} Inserts the exact ID of the order placed by the customer.
{order_customer_email} Passes the buyer email where Google can send the survey request.
{order_delivery_country}, {order_delivery_date} Provides shipment destination and estimated delivery date in the expected format.
Save the block and place a test order. On the confirmation page, verify that the opt-in popup appears correctly.
The popup language should match the current order language.
Open browser developer tools and inspect the generated source to confirm that placeholders are replaced with real order values.
If values are rendered correctly, the integration is ready.
Skip the manual code editing! This module seamlessly integrates the GCR opt-in on your order confirmation page. It automatically handles GTINs, EAN-13, and delivery dates to ensure your surveys are sent at the perfect time.
Article written byMilosz Myszczuk, PrestaShop expert. CEO and founder of the VEKIA interactive agency. Learn more.
If you like this article, support our work!

The "Loyalty – Manual points & history" module is an extension for the main loyalty system (my...
14.99 €

An extension for the PrestaShop myprestaloyalty module. Automatically reward customers with loyalty ...
19.99 €

Ships the official Google Customer Reviews opt-in right after checkout - no pasted scripts in themes...
39.99 €

Gain full control over your loyalty program. View complete customer point history, manage balances, ...
19.99 €