How do we install Google Merhcant Center Opt-In Script now that "checkout scripts" is Deprecated?

Topic summary

Shopify’s deprecation of “Order status page additional scripts” has broken the ability to implement Google Merchant Center’s opt-in survey script, which is essential for collecting product reviews that appear in Google Shopping.

The Core Problem:

  • The Google opt-in script requires loading an external JavaScript file (platform.js?onload=renderOptIn) on the order confirmation page
  • Shopify’s new custom pixels system operates in a sandboxed environment that blocks external script loading and interface elements like modals
  • Checkout UI extensions that could potentially work are limited to Shopify Plus stores

Attempted Solutions (All Unsuccessful):

  • Custom pixels: Cannot load external scripts or render the required popup interface
  • Post-purchase pages: Same sandbox limitations apply
  • Various workarounds using document.head.appendChild(): Fail due to sandbox restrictions

Current Workarounds (With Major Limitations):

  • Third-party apps like “Easy Google Customer Reviews” ($20/month) display static promos instead of popups, resulting in significantly lower engagement
  • Email/SMS flows directing customers to external pages with query string variables (not ideal)
  • Alternative review platforms (Trustpilot, Judge.me) with additional costs

Status: Unresolved after nearly a year. Multiple users are calling for updates to the official Google-Shopify app to include this functionality by default. No native solution exists for non-Plus merchants.

Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

Consider the following very simple script

which must appear on the order confirmation page

to trigger the Google Merchant Center OPT IN script for Top Quality stores:

Traditionally we have just simply added this into SETTINGS->CHECKOUT->ADDITIONAL SCRIPTS

and it has worked fine… (till now)

Here is the official documentation:

https://support.google.com/merchants/answer/14629205

The survey opt-in module is the only way to collect PRODUCT reviews that show up in GoogleShopping.

However, now that the “Order status page additional scripts” are Deprecated

There is no easy way I can see here to integrate the script.

I don’t see any “blocks” that allow me to add Javascript with inline liquid

(correct me if I am wrong please, I have tried making custom blocks, but they do not allow JS)

There do not appear to be any apps that allow us to inline a simple script

https://apps.shopify.com/search?q=checkout%20script

I know that for $2300 per month (using ShopifyPlus) this can be easily done.

However, for all clients that are using anything less than ShopifyPlus I see no solution that allows us to “just copy in the simple code” needed. (other than making our own custom Shopify App for every client)

I really feel like I must be missing something here?

The documentation for Pixel creation does not allow us to pull in any external scripts

https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels

The overview page seems to be an elaborate way to say: “you can not pull in external scripts”

https://help.shopify.com/en/manual/promoting-marketing/pixels/overview

Surely…

there must be a way to handle this simple embed from Google Merchant Center on the order confirmation page?

12 Likes

Hey @liquidwebmaster

You might consider using a custom pixels here

1 Like

Hi, there

I think you could use post purchase page instead and have a try

1 Like

Thank you @liquidwebmaster for calling this out. This IS A PROBLEM, please update the Google Shopify App so we can correctly collect product reviews and track purchases.
That feature should already be included by default in the Official Google-Shopify app. Please update ASAP, this a causing a problem for us.

5 Likes

Agree this is absolutely an issue. Need an update to the Google Shopify App so we can properly collect reviews and track purchases.
It’s causing problems for our store. That feature should already be included by default in the Official Google-Shopify app. Please update asaP.

4 Likes

We see this issue too. Need update to the Google Shopify App so we can correctly collect product reviews and track purchases.

That feature should already be included by default . It’s causing problems for our store. Please update,

4 Likes

that does not work.

Pixel Apps do not allow us to sideload the required embed script: https://apis.google.com/js/platform.js?onload=renderOptIn

That OptIn endpoint is not accessible via Google APIs
We are able to write the code needed to tap into the liquid variables by making our own custom pixel,
however, there is no API to “send” them to via Google

nor do custom pixels allow us to load in the platform.js?onload=renderOptIn dependency from apis.google.com

There are no PIXEL Apps for this scenario.
(correct me if I am wrong, the truth is more important to me than thinking I am right)

The documentation for Pixel creation does not allow us to pull in any external scripts

https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels

The overview page seems to be an elaborate way to say: “you can not pull in external scripts”

https://help.shopify.com/en/manual/promoting-marketing/pixels/overview

Here is the official documentation:

https://support.google.com/merchants/answer/14629205

The survey opt-in module is the only way to collect PRODUCT reviews that show up in GoogleShopping.

Please read those or, why reply at all?

Try it.

Try to get the GOOGLE OPT IN SURVEY to “popup” on the checkout screen. lol.

you’ll see the problem…

I predict if you actually try it, and read the docs, there is a 90% chance you will reply:

“Oh, ok. Yea, Google is going to have to update their official Shopify Channel to fix that.”

2 Likes

Hey @liquidwebmaster

You can import external script like below, it is a just simple example for google opt-in pixel

// Step 1. Initialize the JavaScript pixel SDK (make sure to exclude HTML)
const script = document.createElement('script');
script.setAttribute('src', 'https://apis.google.com/js/platform.js?onload=renderOptIn');
script.setAttribute('async', '');
document.head.appendChild(script);

// Step 2. Subscribe to customer events with analytics.subscribe(), and add tracking
 analytics.subscribe("surveyoptin", event => {
   // pixel("track", "event_name", event.data);
         window.gapi.surveyoptin.render(
        {
          // REQUIRED FIELDS
          "merchant_id": xxxxxxxxx,
          "order_id": event.data.order_number,
          "email": event.data.email,
          "delivery_country": event.data.country_code,
          "estimated_delivery_date": event.data.delivery_date,
          // OPTIONAL FIELDS
          "products": [{"gtin":"GTIN1"}, {"gtin":"GTIN2"}]
        });
 });

You might wonder how to get the event.data?

To get the data from the event, you need to publish the custom event first using checkout extension, pls refer this.

I am not sure if it will work?

But you can have a try.

1 Like

We have tried things like this…

document.head.appendChild(script);

They do not seem to work in SANDBOXED JS for all situations,

https://apis.google.com/js/platform.js?onload=renderOptIn

being one of them

We have also tried to test/debug, we also have a GTM integration.

Alas… SANDBOXED JS seems to cause the embed to fail.

We will give it another shot, I can see there are some variations in the syntax you are proposing here in your code sample.

This is a good reply - thank you for that.

However, problems like this: https://www.youtube.com/watch?v=OMt5d7DxgqA

still remain and prevent us from testing/debugging.

On top of this, I deeply understand why Shopify has done this. Its a good idea. lol

But now, I think we need Google to change their code. which is not as easy as just asking…

3 Likes

Just found this article - its Friday evening here in NZ so will try to implement next week…

https://www.digitaldarts.com.au/google-customer-reviews-shopify

1 Like

Won’t work. Scroll to the bottom of that link to the comments. From the article author:

Joshua Uebergang> June 19, 2024 11:02 am> > The guide was updated very recently, but I believe you’re right. The sandbox has limitations that stop interface elements from being loaded. This includes modals and buttons. It’s very annoying and silly in the name of “security” when it’s loaded from Google. So I believe it’s not possible to have Google Customer Reviews through Customer Events.> > Interface changes are possible through Checkout UI extensions, which surprise, is limited to Shopify Plus.> > I’m aware of the Simsyspro app that does Google Customer Reviews, but it just prefills in some variables of the script, which anyone can do in a few seconds, and still uses the additional scripts being depreciated.

Asinine how Shopify constantly removes features.

2 Likes

Hmm.. where and how?

Have you been able to find a solution to this problem yet? We’re in the same boat and can’t figure out how to get around it.

3 Likes

Thanks for pointing this out!

Agree this is absolutely an issue. Need an update to the Google Shopify App so we can properly collect reviews and track purchases.
It’s causing problems for our store. That feature should already be included by default in the Official Google-Shopify app. Please update

1 Like

Still looking for a solution. This is driving me nuts!

1 Like

@Shopify_77 how do we not have a solution for this yet? The Google Customer Review Opt-In Code can not be deployed manually or via any app in the Shopify app store. Any business attempting to sell as a Google Merchant is now handicapped as their Google Customer Review stars can not show in their Google Ads.

2 Likes

@Shopify_77 could you please look into this ASAP. We have not been able to receive any google reviews since this update… very unfair to all businesses impacted.

2 Likes

@Shopify_77 we also need a solution? Crazy this is still outstanding

2 Likes

@Shopify_77 @shopify_develop We need a solution for adding the script to collect google reviews. @Google_3

1 Like

Did this work?