Jump to content

ferguswood

Member
  • Posts

    32
  • Joined

  • Last visited

Posts posted by ferguswood

  1. Site URL: https://www.caminodelvino.co.uk

    I've tried implementing the Google Reviews Opt-in survey into my squarespace website - https://caminodelvino.co.uk.

    I've been guided by the code used on this Squarespace forum thread - https://forum.squarespace.com/topic/174434-how-to-google-customer-reviews-opt-in/#:~:text=April%207%2C%202021-,Hello,-%2C - supplied by @Adiran213. I’ve applied this code in my 'order confirmation page' code block and it works on my website with the opt in survey appearing post-purchase when I run a test.

    However, when I click ‘yes’ (ie. I would like to participate) I receive no follow on email asking me to write a review - could anyone provide some guidance on why this is not happening/how to solve it?

    Thank you

    Screenshot 2022-01-17 at 13.01.40.png

    Screenshot 2022-01-17 at 13.01.58.png

  2. On 4/7/2021 at 10:39 AM, Adrian213 said:

    Hello,

    If you haven't sorted this already, you need to use Javascript to generate the date - won't work with PHP. I believe the date is used by Google to send the review to the cusomer so it needn't be too specific, in this example I've just added 7 days to the current date:

    <script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer></script>
    <script>
      window.renderOptIn = function() {
        window.gapi.load('surveyoptin', function() {
          const deliveryDate = new Date();
          deliveryDate.setDate(deliveryDate.getDate() + 7);
          function formatDate(date) {
            var d = new Date(date),
            month = '' + (d.getMonth() + 1),
            day = '' + d.getDate(),
            year = d.getFullYear();
    
            if (month.length < 2) 
                   month = '0' + month;
            if (day.length < 2) 
                day = '0' + day;
            return [year, month, day].join('-');
        }
          
          window.gapi.surveyoptin.render(
            {
              // REQUIRED FIELDS
              "merchant_id": 12345678,
              "order_id": "{orderId}",
              "email": "{customerEmailAddress}",
              "delivery_country": "GB",
              "estimated_delivery_date": formatDate(deliveryDate)
              // OPTIONAL FIELDS
              //"products": [{"gtin":"GTIN1"}, {"gtin":"GTIN2"}]
            });
        });
      }
    </script>

    Hope it helps

    Hi @Adrian213, 

    Thank you very much for this. So does this code you've kindly shared work for you?

    EDIT: Code above works a treat! I've noticed companies such as Nudie Jeans use this service and you are able to write a review straight after your purchase - has anybody any idea how you would be able to change the code so this happens?

    Many thanks!

  3. Site URL: https://www.caminodelvino.co.uk

    Site: https://caminodelvino.co.uk

    I was wondering how I would be able to centre my logo like they do in this site : https://harlow.showit.site/. Really not a fan of how Squarespace bunches and constricts the position of the tabs.

    Equally, if anybody knows how to elongate the this 'line' the tabs are on, so that they align on the same line together (sitting below my logo) then that would be great too! Any help would be amazing and thank you 🙂

  4. Site URL: https://www.caminodelvino.co.uk/wine

    Hi Squarespace Forum,

    I'm trying to incorporate the stacking design option for my product images. However, when I use this option and move my cursor over the image, the 'zoom' element for the 'Hover action' goes all funny and essentially zooms in on the corner of the image - not ideal...

    This is almost likely to be a bug in Squarespace at the moment and I have made them aware. In the meantime whilst the issue gets fixed, is there a CSS solution I can use to this problem?? Thank you!

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.