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

Adding cookie banner #315

Closed
nnagewad opened this issue Aug 29, 2024 · 8 comments
Closed

Adding cookie banner #315

nnagewad opened this issue Aug 29, 2024 · 8 comments

Comments

@nnagewad
Copy link

Just wondering if it's possible to add a cookie banner?

If so, are there any additional settings that need to be setup?

@paulrobertlloyd
Copy link
Collaborator

To add a cookie banner (or add items to the head, with regards to #314), you’d need to create your own layouts (which can then extend from those provided by the plugin).

You can see an example of this in the layouts used for the Design History template repo (e.g. https://github.com/x-govuk/govuk-design-history-template/blob/main/app/_layouts/page.njk).

Layouts are a bit of hack right now, and this situation should improve with #290. But even with the addition of virtual templates, I think you’d still need to create your own layouts once you move off the beaten path of those provided by the plugin.

@nnagewad
Copy link
Author

Right on. Thank you for your help @paulrobertlloyd 👍🏽

@paulrobertlloyd
Copy link
Collaborator

Feel free to reopen this issue or create another one if you have any further questions.

@joelanman
Copy link

joelanman commented Sep 17, 2024

just wondering if this could be reopened and considered as a feature of the plugin? We're implementing it now and just thinking that it's probably a common need if people use Google Analytics. I'm new to the plugin so feel free to say if this is just not in the remit/intended purpose

@paulrobertlloyd
Copy link
Collaborator

paulrobertlloyd commented Sep 17, 2024

Maybe but – and currently a little sleep deprived so feeling a little bit grumpy and unreasonable – don’t have analytics! Somewhat of the mind if you want to add Google Analytics or anything needing cookies, you should do the leg work. As I say, am grumpy, and this topic presses my buttons!

Also, at some point, the plugin needs to draw a line in the sand. As I say, things should helpfully get a bit easier in the next major version in that layouts will be easier to override or extend, so that’d be the escape hatch for such additions.

@joelanman
Copy link

thats cool, but as you're aware, sometimes the decision to use analytics and which one is made by other people

@paulrobertlloyd
Copy link
Collaborator

Don't I know it 😔

Not entirely opposed to the idea, but it's not a priority right now.

@paulrobertlloyd
Copy link
Collaborator

…always open to PRs, of course 😉

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

No branches or pull requests

3 participants