Skip to content
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

PASE-1974: pmc-larva should support cookie consent category #840

Closed
wants to merge 4 commits into from

Conversation

shawncook
Copy link
Contributor

@shawncook shawncook commented Mar 13, 2024

Per PASE-1974, we need to check for OneTrust cookie consent before setting cookie using pmc.cookie.set(). This passes in a category of 'functional' for the webfont loaded cookie setting.

Relates to https://github.com/penske-media-corp/pmc-plugins/pull/4102/

  • Updated root CHANGELOG.md with summary of changes under Unpublished section

Copy link
Contributor

github-actions bot commented Mar 13, 2024

Deploy preview for pmc-larva ready!

✅ Preview
https://pmc-larva-koxlego72-penske-media-corp.vercel.app

Built with commit cce05a6.
This pull request is being automatically deployed with vercel-action

Copy link
Member

@ethitter ethitter left a comment

Choose a reason for hiding this comment

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

I thought we handled this in WP, when the loader script is enqueued. Is that not the case?

@shawncook
Copy link
Contributor Author

shawncook commented Mar 13, 2024

@ethitter we do, in that pmc cookies aren't set when a user rejects all cookie categories. However, this lets us pass in a category when calling pmc.cookie.set() to conditionally set individual cookies based on whether the user has consented that particular category.

You're right though - there is a lot of existing code related to this behavior:
https://github.com/penske-media-corp/pmc-plugins/blob/main/pmc-first-party-cookie/src/js/classes/FpcConsent.ts
https://github.com/penske-media-corp/pmc-plugins/blob/main/pmc-cxense/assets/src/pmc-cxense-consent.js

@shawncook
Copy link
Contributor Author

@shawncook shawncook marked this pull request as ready for review March 13, 2024 21:12
@shawncook shawncook changed the title pmc-larva should support cookie consent category PASE-1974: pmc-larva should support cookie consent category Mar 13, 2024
@shawncook
Copy link
Contributor Author

We don't really need this, since fonts_loaded is covered under defaults in pmc-consent.js

@shawncook shawncook closed this Mar 25, 2024
@shawncook shawncook deleted the feature/PASE-1974 branch March 25, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants