Closed (fixed)
Project:
Google Customer Reviews
Version:
2.0.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2026 at 10:47 UTC
Updated:
12 Mar 2026 at 18:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
oana.hulpoi commentedComment #3
oana.hulpoi commentedAfter further investigation, the root cause is simpler than initially described. The issue is only in the library definition.
The original
google_customer_reviews.libraries.ymluses an HTMLonloadattribute:https://apis.google.com/js/platform.js: { type: external, attributes: { async: true, defer: true, onload: renderOptIn } }This references the function but doesn't reliably call it after the API is fully initialized.
Google's documentation specifies using the
?onloadquery parameter on the script URL:https://apis.google.com/js/platform.js?onload=renderOptIn: { type: external, attributes: { async: true, defer: true } }This is Google's own callback mechanism built into
platform.js. It callsrenderOptIn()after the API is fully initialized.No changes needed to the JS file. Updated patch attached with the one-line YAML fix.
Comment #5
rhovlandThank you for reporting this. I tested the module and have had it in production for a while now but missed this. I'm curious what browser did you encounter this in.
From my research it appears that the way I wrote this library file puts the onload as an HTML attribute which I guess sometimes fails to trigger in some browsers?
You're definitely right that google expects it in the url. I didn't know there was a difference.
Comment #7
rhovland