Title: Different scripts(events) loaded
Last modified: September 14, 2018

---

# Different scripts(events) loaded

 *  Resolved [LogicRays Technologies](https://wordpress.org/support/users/logicrays/)
 * (@logicrays)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/different-scripts-loaded/)
 * 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](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
    -  This topic was modified 7 years, 8 months ago by [LogicRays Technologies](https://wordpress.org/support/users/logicrays/).
    -  This topic was modified 7 years, 8 months ago by [LogicRays Technologies](https://wordpress.org/support/users/logicrays/).

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [natekinkead](https://wordpress.org/support/users/natekinkead/)
 * (@natekinkead)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/different-scripts-loaded/#post-10689850)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/ecr-google-customer-reviews_b1cad0.
   svg)
 * [Google Customer Reviews for WooCommerce](https://wordpress.org/plugins/ecr-google-customer-reviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ecr-google-customer-reviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ecr-google-customer-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/ecr-google-customer-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ecr-google-customer-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ecr-google-customer-reviews/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [natekinkead](https://wordpress.org/support/users/natekinkead/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/different-scripts-loaded/#post-10689850)
 * Status: resolved