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

316 more cookies #335

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ const WebStore = ({ Component }) => {

return (
<>
<CookiePreferencesModal
{/* <CookiePreferencesModal
disableCookies={disableCookies}
enableCookies={enableCookies}
getCookieConsent={getCookieConsent()}
/>
/> */}
<Header
auth={{
signIn: () => signIn(process.env.NEXT_PUBLIC_PROVIDER_NAME),
Expand Down
72 changes: 15 additions & 57 deletions pages/legal-notices/cookie-policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const CookiePolicy = () => (
<div className='container'>
<Title title='Cookie Policy' style={{ marginTop: '1rem' }} />
{cookiePolicy}
<h2>Cookie Preferences</h2>
{/* <h2>Cookie Preferences</h2>
<p> Please provide your consent below to our use of non-essential cookies on our site.
You may withdraw your consent at any point by following the instructions above or by
returning to this page and changing your selection.</p>
<CookiePreferencesCheck
cookieConsentValue={cookieConsentValue}
disableCookies={disableCookies}
enableCookies={enableCookies}
/>
/> */}
<div className='mb-4'></div>
</div>
)
Expand All @@ -31,9 +31,9 @@ const cookiePolicy = (
<ul>
<li><strong>Strictly necessary cookies.</strong> These are cookies that are required for the operation of our site. They include, for example, cookies that enable you to log into secure areas of our site or make use of services. We do not require your consent to place these cookies. Nevertheless, you may be able to block these cookies yourself on your device/browser, but restricting these cookies is likely to mean that our site will not work as you would expect and certain functionality may be inoperable.</li>
<p style={{textDecoration: 'underline'}}><strong>Non-essential cookies</strong></p>
<li><strong>Analytical/performance cookies.</strong> They allow us to recognise and count the number of visitors and to see how visitors move around our site when they are using it. This helps us to improve the way our site works, for example, by ensuring that users are finding what they are looking for easily. We use cookies to compile visitor statistics such as how many people have visited our site, how they reached our site, what type of technology they are using (e.g. Mac or Windows which helps to identify when our site isn't working as it should for particular technologies), how long they spend on the site, what page they look at etc. This helps us to continuously improve our website.</li>
{/* <li><strong>Analytical/performance cookies.</strong> They allow us to recognise and count the number of visitors and to see how visitors move around our site when they are using it. This helps us to improve the way our site works, for example, by ensuring that users are finding what they are looking for easily. We use cookies to compile visitor statistics such as how many people have visited our site, how they reached our site, what type of technology they are using (e.g. Mac or Windows which helps to identify when our site isn't working as it should for particular technologies), how long they spend on the site, what page they look at etc. This helps us to continuously improve our website.</li>
Copy link
Contributor Author

@alishaevn alishaevn Dec 6, 2023

Choose a reason for hiding this comment

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

we aren't using analytical, functional or targeting cookies on the webstore. at least not in the ways described.

<li><strong>Functionality cookies.</strong> These are used to recognise you/your language when you return to our site. This enables us to personalise our content for you and remember your preferences (for example, your choice of language or region).</li>
<li><strong>Targeting cookies.</strong> These cookies record your visit to our site, the pages you have visited and the links you have followed. This information will be used by us and third parties to make our site and the advertising displayed on it more relevant to your interests. We may also share this information with third parties for this purpose but only if you consent to such sharing.</li>
<li><strong>Targeting cookies.</strong> These cookies record your visit to our site, the pages you have visited and the links you have followed. This information will be used by us and third parties to make our site and the advertising displayed on it more relevant to your interests. We may also share this information with third parties for this purpose but only if you consent to such sharing.</li> */}
<li><strong>Social Website Cookies.</strong> We have included buttons on our site for certain social media sites such as Facebook, Twitter and Instagram. These cookies are set by the third party social media sites to which they relate.</li>
</ul>
<p>The privacy implications vary from social media site to social media site and will be dependent on the privacy settings you have chosen on these sites. Please refer to the relevant social media site's privacy and cookies policy for more information.</p>
Expand All @@ -60,10 +60,10 @@ const cookiePolicy = (
</tr>
<tr>
<td>
_rx_session
__Secure-next-auth.session-token
</td>
<td>
End of browser session
30 days
</td>
<td>
Scientist.com
Expand All @@ -74,75 +74,33 @@ const cookiePolicy = (
</tr>
<tr>
<td>
_rx_cookie_consent
__Host-next-auth.csrf-token
</td>
<td>
1 year
End of browser session
</td>
<td>
Scientist.com
<br />
<br />
This cookie stores the user's cookie consent status.
This cookie provides cross site request forgery protection on authentication routes.
</td>
</tr>
<tr>
<td>
intercom-lou-XXX
</td>
<td>
1 year
__Secure-next-auth.callback-url
</td>
<td>
Intercom cookie
<br />
<br />
This cookie helps to remember the user between visits and resume chat conversations.
</td>
</tr>
<tr>
<td>
intercom-session-XXX
</td>
<td>
1 week
</td>
<td>
Intercom cookie
<br />
<br />
This cookie enables us to track the user's session, including maintaining continuity in chat conversations.
</td>
</tr>
<tr>
<td>
intercom-id-XXX
</td>
<td>
1 year
</td>
<td>
Intercom cookie
<br />
<br />
This cookie enables us to distinguish users.
</td>
</tr>
<tr>
<td>
NID
</td>
<td>
6 months
End of browser session
</td>
<td>
Google
Scientist.com
<br />
<br />
This cookie contains a unique ID that identifies a returning user's device. Used by Google’s reCAPTCHA service to prevent spam.
This cookie allows for proper redirection during the sign up/in process.
</td>
</tr>
<tr>
{/* <tr>
<td colSpan={3} style={{textDecoration: 'underline'}}>
<strong>Non-essential cookies</strong>
</td>
Expand Down Expand Up @@ -273,7 +231,7 @@ const cookiePolicy = (
<br />
This cookie enables us to remember the last language visited.
</td>
</tr>
</tr> */}
</tbody>
</table>
<p>Please note that third parties (including, for example, providers of external services like web traffic analysis services) may also use cookies, over which we have no control. These cookies are likely to be analytical/performance cookies or targeting cookies.</p>
Expand Down
28 changes: 9 additions & 19 deletions utils/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ import {
} from 'cookies-next'

/**
* TODO: determine if/how to handle cookies
* ref: https://assaydepot.slack.com/archives/C05U031L0V9/p1701363833246969
* tldr: no rx session cookies are being set, and google analytics isn't enabled
*
* if we want to handle cookies, we need to readdress enableCookies() and disableCookies()
* if/when we add analytics, we need to address the following TODO's, as well as the TODO's in the code below
* - uncomment CookiePreferencesModal in pages/_app.js
* - uncomment CookiePreferencesCheck, the header and text in pages/legal-notices/cookie-policy.js
*/

const cookieConsentGiven = hasCookie('_dl_cookie_consent')

export const getCookieConsent = () => cookieConsentGiven // delete this and uncomment the line below to re-enable cookie consent
// export const getCookieConsent = () => !cookieConsentGiven
export const getCookieConsent = () => !cookieConsentGiven

export const cookieConsentValue = cookieConsentGiven ? getCookie('_dl_cookie_consent') : 'false'

Expand All @@ -33,23 +30,16 @@ const cookieOptions = {

export const enableCookies = () => {
// TODO(alishaevn): check for the presence of non essential (analytics) cookies. if none, enable them.
// setCookie('_dl_cookie_consent', 'true', cookieOptions)
setCookie('_dl_cookie_consent', 'true', cookieOptions)
}

const nonEssentialCookies = [
'__ga',
'__gid',
'__utma',
'__utmt',
'__utmb',
'__utmc',
'__utmz',
'__utmv',
'pll_language'
// TODO(alishaevn): create this list
// TODO(alishaevn): add these cookies to pages/legal-notices/cookie-policy.js under "Non-essential cookies" with a description and expiration time frame
]

export const disableCookies = () => {
// nonEssentialCookies.forEach(cookie => deleteCookie(cookie))
nonEssentialCookies.forEach(cookie => deleteCookie(cookie))
// TODO(alishaevn): after deleting the cookies, we need to also disable them
// setCookie('_dl_cookie_consent', 'false', cookieOptions)
setCookie('_dl_cookie_consent', 'false', cookieOptions)
}
Loading