Skip to content

Add script attribute to the cookie banner to mark additional cookies as essential. #2

@edthedev

Description

@edthedev

Context

Once we have #254, many users will reject all non-essential cookies.
This can lead to a degraded experience, for sites with additional functional cookies that are not known to the cookie banner.

It could be useful to add support for a data-essential-cookie attribute on the script tag that identifies an additional cookie to be saved when all other cookies are deleted.

Tasks

  • add data-essential-coookie to one of our example pages
  • update code from #254 to skip over a cookie identified as essential in this manner
  • but ignore any attempt to save known non-essential cookies in this manner (such as analytics cookies from popular vendors). This feature must not be a work-around to treat tracking cookies as essential. Throw a console warning if a non-essential cookie is specified.
  • add multiple copies of data-essential-coookie with different values to one of our example pages
  • ensure that multiple cookies can be marked as essential in this manner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions