Problem/Motivation
drupalSettings.google_analytics.account should return the account id in javascript, but returns an empty object.
The reason is, that the GaAccount object has to be casted to string explictly! $account property in the object in protected and JavaScript casting can't access it thereby.
Steps to reproduce
Call drupalSettings.google_analytics.account in Browser console on a page and see the value of "account" is ALWAYS an empty object
Proposed resolution
See MR
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork google_analytics-3245331
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
anybodyI can confirm this problem, this is quite surely a bug in the new implementation. RTBC+1! Fix works great.
Comment #4
anybodyAny chance for a review and commit @maintainer? This is blocking #2917905: Add JS-function / method to set ga-disable-...
Comment #7
japerryEasy enough. Fixed!