-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore/PSD-3525_gtm_cookie_investigation #3229
base: main
Are you sure you want to change the base?
Conversation
ddf38c1
to
a210556
Compare
@@ -14,12 +14,12 @@ | |||
<%= javascript_include_tag "application", type: "module", nonce: true %> | |||
<%= stylesheet_link_tag "application" %> | |||
<%= csrf_meta_tags %> | |||
<% if Rails.env.production? && analytics_cookies_accepted? %> | |||
<% if !Rails.env.development? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use <% unless Rails.env.development? %>
also why are we not checking the analytics_cookies_accepted
now? - leads to this #3229 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading John's email the issue seems to be the GTM container doesn't respond unless analytics cookie is accepted so the intention here is bypass that trigger the container regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that means you're not setting the cookie, I think they need to remove that and trust that we are dealing with it or update their code to use the one we have set.
<%= render "shared/ga_head" %> | ||
<% end %> | ||
</head> | ||
<body class="govuk-template__body app-body-class"> | ||
<% if Rails.env.production? && analytics_cookies_accepted? %> | ||
<% if !Rails.env.development? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above maybe use <% unless Rails.env.development? %>
@@ -49,7 +49,8 @@ def set_analytics_cookies(accept_analytics_cookies) | |||
cookies[:cookies_policy] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems if you're not calling this is it really needed? this was removed from the app/views/layouts/application.html.erb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust code to ensure cookies policy is created.
6a54aeb
to
95bf3c8
Compare
Ensured GTM script is firing at correct time and cookies_policy is being set.