Skip to content

Analytics: Fix update consent method #8053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Analytics: Fix update consent method #8053

wants to merge 3 commits into from

Conversation

kuczmaja
Copy link

@kuczmaja kuczmaja commented Mar 5, 2024

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

@kuczmaja kuczmaja requested review from hsubox76 and a team as code owners March 5, 2024 12:40
Copy link

changeset-bot bot commented Mar 5, 2024

🦋 Changeset detected

Latest commit: cf3a06b

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

Copy link
Contributor

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this! One administrative thing you'll need to do: add a changeset, this ensures this change will be published in the next release. Run yarn changeset (see the changeset comment above for more info). Also one comment.

@kuczmaja kuczmaja requested review from a team as code owners March 25, 2024 10:20
@kuczmaja
Copy link
Author

kuczmaja commented Mar 25, 2024

Thanks for the review. The changeset is added.

@Approxipixie
Copy link

Thank you for the fix. Could you please provide an update on the status of the PR?
Much appreciated!

@kuczmaja kuczmaja closed this by deleting the head repository Oct 17, 2024
@firebase firebase locked and limited conversation to collaborators Nov 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants