We’re working on an example code snippet.
Our work is not finished yet, but if anyone wants to contribute, I am sharing it as open code here.
*** Important only a test code please test it is not ready to use.
@Armonika if you are not aware, popups can not render in Pixels / customer events. As the Google Customer Review requires popups to ask to opt in for requesting a review, the script will not work, regardless what you do.
Either Shopify needs to allow for popups, or Google needs to update the script to not require opt in popup.
I have already built the script to work with pixels, we just need to wait for 1 or the other big companies to make a change.
Emmaneul, is your script up to date for users that are not using the new thank you page? We reverted back on our shop to the old version, but are having issues with this script:
{% 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 'CA' -%}{%- assign fa_language = 'en-CA' -%}{%- 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 -%}
{% assign fa_delivery_seconds = 86400 | times: fa_delivery_days %}
It looks like you just need this line at the top which only runs the script once when the page loads. This prevents the script from running when you hit refresh or going back to that page when you want to relook at an order.
What is strange is that it does show, but ONLY on refresh, do you think it this would fix that issue so it appears the first time and just doesn’t after that point?
Hi Claudez7, we are using FeedArmy’s script on our website, and the review pop-up does work, but only upon refresh on the old thank you page. One thing to note is we did switch to the new thank you page, then reverted back due to the discovery the customer reviews module didn’t work. Are you having any issues with having to refresh to see the review pop-up?
Do you mind messaging me with your code implementation? Obviously you can exclude the merchant ID, just trying to compare scripts to see if I’m doing something wrong.
Hi Max, it looks like we are experiencing the exact same issue. I am using the same code as what you are using above which I got from Feedarmy. Everything technically works, however, when a customer gets to the order confirmation/thank you page, the popup to opt-in from Google does not automatically show, the page first has to be refreshed, then the pop-up displays.
Have you managed to find a solution to this? I have looked everywhere and have not had any success!
We can’t trigger the pop-up in the extensible checkout due to all whats in this thread. However, we’ve built an app block which will ask customers if they want to participate in the Google Review programme. If they say yes, we redirect them to a proxy page which then fires the Google script. It’s not the most optimal solution but it does allow merchants to continue collecting reviews. From what we’ve seen of merchants who have switched to this method, they are still collecting reviews.
I had hoped you’d come up with something that works. I’ve reinstalled the app. One question though, do I install the app block on the Thank You page or the Order Status page? I’m thinking the Thank You page as everyone reaches that page at the end of checkout.
I would do it for both because you might have more chance for customers to opt in. Give me a shout on support if you need any help setting it up. You can add the blocks via customise theme > checkout then > add app blocks. Please get in touch as i’d love to know how the opt in rate goes and compares to the ‘legacy’ way.
We are only round what feels like 300 to fix this. But first we need to fix what is missing (or atleast we think is missing) for discounting and functions to be able to do what checkout.liquid can currently do. Stay tuned as we have a meeting this week to hopefully fix that. Then it’s the thank you page / success page that needs to be updated.