AmberWhite Posted December 11, 2019 Share Posted December 11, 2019 I have to add this: <!-- 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": "MERCHANT_ID", "order_id": "ORDER_ID", "email": "CUSTOMER_EMAIL", "delivery_country": "COUNTRY_CODE", "estimated_delivery_date": "YYYY-MM-DD", // OPTIONAL "products":[{"gtin":"GTIN1"}, {"gtin":"GTIN2">}], "opt_in_style": "OPT_IN_STYLE" }); }); } </script> <!-- END GCR Opt-in Module Code --> To the confirmation page, but I'm missing dynamic values for the " "estimated_delivery_date" and gtin1 and gtin2. I figure order id one can use the tag squarespace provides {orderId} as well as email address. But I can't find other values anywhere, not even customer service knows. Can someone help me? I am trying to collect seller reviews and product reviews so I can show these badges on shopping ads from google ads. Has anyone done this or have they used a review aggregator? Or is there another service which will accomplish this? THanks! Amber onlineKarma 1 Link to comment
nicoleHGA Posted December 19, 2019 Share Posted December 19, 2019 I came on here to ask the exact same question. I'm having a lot of difficulty having it show up on my page. The GCR badge shows up without a problem, but the survey isn't popping up. onlineKarma 1 Link to comment
Guest Posted January 24, 2020 Share Posted January 24, 2020 I came here for the same question. Did you have the answer for the code ? Many thanks Link to comment
Guest Posted June 17, 2020 Share Posted June 17, 2020 I'm trying to do this as well. Has anyone been successful with implementing this? Link to comment
Guest Posted October 21, 2020 Share Posted October 21, 2020 (edited) If u have access to order informations, u should have a "created_at" column. To have an idea of this value, u can juste transform this date and add +7days to it. Or if u want more realistic data, u can create a function to determine delivery date based on country, delivery mode etc.. PHP version of estimated_delivery_date : Quote date("Y-m-d", strtotime($order->getCreatedAt() . "+7 days")) Edited October 21, 2020 by BouBooo Link to comment
CharlieW Posted November 23, 2020 Share Posted November 23, 2020 @BouBooo I don't think you can use PHP with Squarespace code injection. Still looking for a solution myself. Anyone else have any luck? Link to comment
Richardf21 Posted January 18, 2021 Share Posted January 18, 2021 I have this so far <!-- 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( { "merchant_id": 280599083, "order_id": "{orderId}", "email": "{customerEmailAddress}", "delivery_country": "GB", "estimated_delivery_date": "YYYY-MM-DD" , "opt_in_style": "BOTTOM_LEFT_DIALOG" }); }); } </script> <!-- END GCR Opt-in Module Code --> <!-- BEGIN GCR Language Code --> <script> window.___gcfg = { lang: 'en-GB' }; </script> <!-- END GCR Language Code --> just need some JS to pull the date in the order "YYYY-MM-DD" from the order confirmation and add 4 days. anyone know how to write that in js? Link to comment
onlineKarma Posted February 12, 2021 Share Posted February 12, 2021 Same problem here. Would love to see a solution for this 🙂 Link to comment
Guest Posted June 28, 2021 Share Posted June 28, 2021 I did it efficaciously but it appeared at the header and seemed very messy as the nav bar turned into behind it. Is there a way to have it some place else at the web page or make the nav bar disappear? Link to comment
tuanphan Posted July 1, 2021 Share Posted July 1, 2021 On 6/29/2021 at 5:35 AM, fsaw333 said: I did it efficaciously but it appeared at the header and seemed very messy as the nav bar turned into behind it. Is there a way to have it some place else at the web page or make the nav bar disappear? Hi. What is site url? We can check problem easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Thomas_JF Posted March 21, 2023 Share Posted March 21, 2023 Did anyone ever get this working and have the code? Link to comment
pepdawg18 Posted May 27 Share Posted May 27 Did anyone ever get this to work properly? I still do not see the relevant values requested by Google... I am still trying to locate the following values that are not listed in the Code Injection section in Squarepsace, "delivery_country": "COUNTRY_CODE", estimated_delivery_date": "YYYY-MM-DD", "products":[{"gtin":"GTIN1"}, {"gtin":"GTIN2">}], lang: 'LANGUAGE' Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment