-
Notifications
You must be signed in to change notification settings - Fork 3
[TWE-660] Add VWO code to base page #401
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
base: main
Are you sure you want to change the base?
Conversation
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.
@damwaingames This looks good but I left a suggestion for you.
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.
Nice thanks 👍
<script> | ||
window.VWO = window.VWO || []; | ||
window.VWO.init = window.VWO.init || function(state) { window.VWO.consentState = state; } | ||
</script> |
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.
Note: This code exists in the RNIB base but I'm not actually sure whether it's essential to this implementation?
bindEvents() { | ||
window.addEventListener('CassieSubmittedConsent', () => | ||
this.toggleVWO(), | ||
); | ||
} |
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.
Note: Whatever Cassie
is I don't think is relevant to the this site?
} | ||
|
||
toggleVWO() { | ||
const isEnabled = getCookie('VWOCookie') === 'Yes'; |
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.
Question: Is setting up this cookie on us?
TWE-660
Description of Changes Made
Edited the base_page.html to insert the VWO script to the heads of all pages, so that the marketing team can get access to the visitor engagement data and testing features of that site.
How to Test
View several pages and ensure that the VWO code appears in the head section when you inspect the source.
Screenshots
This isn't a visible change.
MR Checklist
Unit tests
Documentation
Browser testing
Data protection
Light and dark mode
Accessibility
Sustainability
Pattern library