• Hi

    Thank you for your plugin, i have one question, Google Suggest me to do this :

    <strong><script src="https://apis.google.com/js/platform.js?onload=renderOptIn"</strong> async defer></script> <script> window.renderOptIn = function() { window.gapi.load('surveyoptin', function() { window.gapi.surveyoptin.render( { // REQUIRED FIELDS "merchant_id": 104820982, "order_id": "ORDER_ID", "email": "CUSTOMER_EMAIL", "delivery_country": "COUNTRY_CODE", "estimated_delivery_date": "YYYY-MM-DD", // OPTIONAL FIELDS "products": [{"gtin":"GTIN1"}, {"gtin":"GTIN2"}] }); }); } </script>

    where your plugin using below scrips: https://apis.google.com/js/platform.js?onload=renderBadge
    means onload event is different so can you please advice what to do ?

    So can you please explain why you have used different event ? they have used : onload=renderOptIn

    Please advice.
    Thanks
    Ahir

Viewing 1 replies (of 1 total)
  • Plugin Contributor natekinkead

    (@natekinkead)

    The renderBadge event is for rendering the badge on every front-end page.

    The renderOptin event happens only on the WooCommerce Thank You / receipt page after a successful purchase. That is where the Survey Opt-in happens.

Viewing 1 replies (of 1 total)

The topic ‘Different scripts(events) loaded’ is closed to new replies.