Hello,
in which section do I need to insert the Opt-in Integration code of Google Merchant Center:
Thank you so much!
Opt-in Integration:
Hello,
in which section do I need to insert the Opt-in Integration code of Google Merchant Center:
Thank you so much!
Opt-in Integration:
Make sure to replace all the attribute values with object attributes. To help you out, below is a code example, simply replace the id value with your id value.
{% assign fa_merchant_id = 123456789 %}
{% assign fa_delivery_days = 3 %}
{%- case shipping_address.country_code -%}
{%- when 'BG' -%}{%- assign fa_language = 'bg' -%}{%- when 'CZ' -%}{%- assign fa_language = 'cs' -%}{%- when 'DK' -%}{%- assign fa_language = 'da' -%}{%- when 'DE' -%}{%- assign fa_language = 'de' -%}{%- when 'GR' -%}{%- assign fa_language = 'el' -%}{%- when 'AU' -%}{%- assign fa_language = 'en-AU' -%}{%- when 'GB' -%}{%- assign fa_language = 'en-GB' -%}{%- when 'US' -%}{%- assign fa_language = 'en-US' -%}{%- when 'ES' -%}{%- assign fa_language = 'es' -%}{%- when 'FI' -%}{%- assign fa_language = 'fi' -%}{%- when 'FR' -%}{%- assign fa_language = 'fr' -%}{%- when 'HR' -%}{%- assign fa_language = 'hr' -%}{%- when 'HU' -%}{%- assign fa_language = 'hu' -%}{%- when 'ID' -%}{%- assign fa_language = 'id' -%}{%- when 'IT' -%}{%- assign fa_language = 'it' -%}{%- when 'JP' -%}{%- assign fa_language = 'JA' -%}{%- when 'KR' -%}{%- assign fa_language = 'ko' -%}{%- when 'LT' -%}{%- assign fa_language = 'lt' -%}{%- when 'LV' -%}{%- assign fa_language = 'lv' -%}{%- when 'MY' -%}{%- assign fa_language = 'ms' -%}{%- when 'BE' -%}{%- assign fa_language = 'nl' -%}{%- when 'NL' -%}{%- assign fa_language = 'nl' -%}{%- when 'NO' -%}{%- assign fa_language = 'no' -%}{%- when 'PL' -%}{%- assign fa_language = 'pl' -%}{%- when 'BR' -%}{%- assign fa_language = 'pt-BR' -%}{%- when 'PT' -%}{%- assign fa_language = 'pt-PT' -%}{%- when 'RO' -%}{%- assign fa_language = 'ro' -%}{%- when 'RU' -%}{%- assign fa_language = 'ru' -%}{%- when 'SK' -%}{%- assign fa_language = 'SK' -%}{%- when 'SI' -%}{%- assign fa_language = 'sl' -%}{%- when 'RS' -%}{%- assign fa_language = 'sr' -%}{%- when 'SE' -%}{%- assign fa_language = 'sv' -%}{%- when 'TH' -%}{%- assign fa_language = 'th' -%}{%- when 'TR' -%}{%- assign fa_language = 'tr' -%}{%- when 'VN' -%}{%- assign fa_language = 'vi' -%}{%- when 'CN' -%}{%- assign fa_language = 'zh-CN' -%}{%- when 'TW' -%}{%- assign fa_language = 'zh-TW' -%}
{%- else -%}
{%- assign fa_language = 'en' -%}
{%- endcase -%}
{%- if first_time_accessed -%}
{% assign fa_delivery_seconds = 86400 | times: fa_delivery_days %}
{%- endif -%}
Thank you so much!! ![]()
Quick Go-To code if you are looking to add required fields only with estimated delivery days of value 4 which you can change below:
{%- if first_time_accessed -%}
{%- assign delivery_days = 4 | times: 86400 -%}
{%- endif -%}
I have tried this code and a few others and none of them will work on my Shopify site. I never get the opt in nor do I get any statistics in my GMC. Iâve correctly put in my merchant id in all iterations.
I have tried the code in the Post Purchase Page code and also in the Order Status Page code. Nether works.
Any ideas?
thx
Most likely something went wrong with your setup. Here is a full guide: https://feedarmy.com/kb/install-google-customer-reviews-in-shopify/
Hi, Iâm trying to figure this out now but I donât understand how I can enter an âorder IDâ (for example, among other attributes) when this will change for each customer/order?
The code in my example is all automated, so no need to enter an order id.
Hi Emmanuel-
I read your article in the link above and was successful in integrating the badge code however, for the Survey Opt-in do I copy the code exactly as above including the copyright?
Thanks!!
It is generally the practice to include the copyright, when using someone elses coding.
Hi @EmmanuelFlossie , does this code still work in 2024? I have tried using the code with the forum but cannot get anything to pop-up. Iâm not sure if that has anything to do with Shopifyâs new checkout.
Thanks
You may need to remove if first time accessed. Shopify has for a year or so now, not been playing nice with this feature.
Hi @EmmanuelFlossie, I followed the instructions from your blog post sharing the code snippets that seem to work after the customer checks out. However, in terms of the interface, I noticed that they do not display any popup after clicking âcontinue shoppingâ. Is this feature currently working well on Shopify? Please confirm for us.
Please note additional scripts will go away this year, so I would not invest any or much time on this. But the additional scripts should show if you access the thank you page. Assuming the if first time accessed, is removed, because this feature no longer works in Shopify.
Hi @EmmanuelFlossie,
Thank you for your previous response. Given the upcoming removal of additional scripts, we are concerned about how to maintain our âOpt-in Integration Google Merchant Centerâ functionality.
Your guidance would be extremely helpful for us to determine if and how we can implement this integration successfully.
Thank you in advance for your assistance.
Best regards,
Bomb
I have no info, unfortunately.
Hi @EmmanuelFlossie,
Thank you
If you have any new information about this issue, it would be very helpful to us.
Iâm now accepting beta testers for the code, limited slots available.
The requirement is to provide access to GMC and Shopify. And once the tests are completed, you can keep the code.
I do not gaurantee all features, due to limitations within Shopify Pixels.
Adding additional script with this method is now deprecated. Is there another method to do this?
Only deprecated, it is not gone yet until August 2025. The only thing you can do is wait until Google updates itâs system, or use a different review platform.