Analytics: Fix update consent method
To send the user's consent status, second arg must be 'default' or 'update'
gtag('consent', 'update', {
'analytics_storage': 'granted',
// ....
});
While destructing args in gtagWrapper, the first item is the string, and ConsentSettings is given as the second parameter.
const [gtagParams] = args; // args is [ 'update', { 'analytics_storage': ... } ]
gtagCore(GtagCommand.CONSENT, 'update', gtagParams as ConsentSettings); // gtagParams is 'update' in this case
🦋 Changeset detected
Latest commit: cf3a06b6bb830dbfaa11a8a2ea7d3dfc9690befa
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 3 packages
| Name | Type |
|---|---|
| @firebase/analytics | Patch |
| @firebase/analytics-compat | Patch |
| firebase | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Thanks for the review. The changeset is added.
Thank you for the fix. Could you please provide an update on the status of the PR? Much appreciated!