All things Shopify and commerce
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?
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
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."
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.
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...
Thanks for pointing this out!
Hi, there
I think you could use post purchase page instead and have a try
Hmm.. where and how?
We see this issue too. Need update to the Google Shopify App so we can correctly collect product reviews and track purchases.
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
Won't work. Scroll to the bottom of that link to the comments. From the article author:
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.
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.
Still looking for a solution. This is driving me nuts!
@Shopify 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.
@Shopify 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.
@Shopify @shopify_develop We need a solution for adding the script to collect google reviews. @Google
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024