Skip to content

Commit 61db71e

Browse files
authored
Merge pull request #320 from scientist-softserv/316-cookie-policy
316-cookie-policy
2 parents 43a0752 + 4f2b403 commit 61db71e

File tree

12 files changed

+434
-13
lines changed

12 files changed

+434
-13
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
"@rjsf/core": "^5.0.0-beta.17",
2121
"@rjsf/utils": "^5.0.0-beta.17",
2222
"@rjsf/validator-ajv8": "^5.0.1",
23-
"@scientist-softserv/webstore-component-library": "^0.1.18",
23+
"@scientist-softserv/webstore-component-library": "^0.1.19",
2424
"@sentry/nextjs": "^7.42.0",
2525
"axios": "^1.1.3",
2626
"bootstrap": "^5.2.3",
27+
"cookies-next": "^4.0.0",
2728
"next": "12.3.1",
2829
"next-auth": "^4.20.1",
2930
"react": "18.2.0",

pages/_app.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Footer, Header } from '@scientist-softserv/webstore-component-library'
1+
import { CookiePreferencesModal, Footer, Header } from '@scientist-softserv/webstore-component-library'
22
import { SWRConfig } from 'swr'
33
import { useRouter } from 'next/router'
44
import {
@@ -11,10 +11,13 @@ import {
1111
FOOTER_NAME,
1212
FOOTER_SECTIONS,
1313
FOOTER_SOCIALS,
14-
headerAndFooterLinkColors,
1514
LOGO,
1615
NAVIGATION_LINKS,
16+
disableCookies,
17+
enableCookies,
18+
getCookieConsent,
1719
fetcher,
20+
headerAndFooterLinkColors,
1821
} from '../utils'
1922
import '../utils/theme/globals.scss'
2023

@@ -32,6 +35,11 @@ const WebStore = ({ Component }) => {
3235

3336
return (
3437
<>
38+
<CookiePreferencesModal
39+
disableCookies={disableCookies}
40+
enableCookies={enableCookies}
41+
getCookieConsent={getCookieConsent()}
42+
/>
3543
<Header
3644
auth={{
3745
signIn: () => signIn(process.env.NEXT_PUBLIC_PROVIDER_NAME),
Lines changed: 293 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,293 @@
1+
import { CookiePreferencesCheck, Title } from '@scientist-softserv/webstore-component-library'
2+
import { cookieConsentValue, disableCookies, enableCookies } from '../../utils'
3+
4+
const CookiePolicy = () => (
5+
<div className='container'>
6+
<Title title='Cookie Policy' style={{ marginTop: '1rem' }} />
7+
{cookiePolicy}
8+
<h2>Cookie Preferences</h2>
9+
<p> Please provide your consent below to our use of non-essential cookies on our site.
10+
You may withdraw your consent at any point by following the instructions above or by
11+
returning to this page and changing your selection.</p>
12+
<CookiePreferencesCheck
13+
cookieConsentValue={cookieConsentValue}
14+
disableCookies={disableCookies}
15+
enableCookies={enableCookies}
16+
/>
17+
<div className='mb-4'></div>
18+
</div>
19+
)
20+
21+
export default CookiePolicy
22+
23+
/* eslint-disable max-len, react/no-unescaped-entities */
24+
const cookiePolicy = (
25+
<div>
26+
<h2>Information About Our Use of Cookies</h2>
27+
<p>Our website and platform (together our <strong>"site"</strong>) is operated by the Assay Depot, Inc. d.b.a Scientist.com (<strong>"Scientist.com"</strong>, <strong>"we"</strong>, <strong>"us"</strong>, <strong>"our"</strong>). The site uses cookies to distinguish you from other users and this helps us to provide you with a good experience when you browse our site and also to improve our site.
28+
If you wish to remove cookies placed on your device by our site or stop our site placing further cookies on your device you can do this at any time (learn how to do this below).
29+
A cookie is a small file of letters and numbers that we store on your browser or the hard drive of your computer if you agree. Cookies contain information that is transferred to your computer's hard drive. We use the following cookies:
30+
</p>
31+
<ul>
32+
<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>
33+
<p style={{textDecoration: 'underline'}}><strong>Non-essential cookies</strong></p>
34+
<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>
35+
<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>
36+
<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>
37+
<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>
38+
</ul>
39+
<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>
40+
<p>You can find more information about the individual cookies we use and the purposes for which we use them in the table below:</p>
41+
<table className="table table-responsive table-bordered">
42+
<thead>
43+
<tr>
44+
<th width="20%">
45+
Cookie
46+
</th>
47+
<th width="20%">
48+
Cookie duration
49+
</th>
50+
<th width="60%">
51+
Purpose/further information
52+
</th>
53+
</tr>
54+
</thead>
55+
<tbody>
56+
<tr>
57+
<td colSpan={3} style={{textDecoration: 'underline'}}>
58+
<strong>Essential (strictly necessary) cookies</strong>
59+
</td>
60+
</tr>
61+
<tr>
62+
<td>
63+
_rx_session
64+
</td>
65+
<td>
66+
End of browser session
67+
</td>
68+
<td>
69+
Scientist.com
70+
<br />
71+
<br />
72+
This cookie enables us to distinguish users and sessions.
73+
</td>
74+
</tr>
75+
<tr>
76+
<td>
77+
_rx_cookie_consent
78+
</td>
79+
<td>
80+
1 year
81+
</td>
82+
<td>
83+
Scientist.com
84+
<br />
85+
<br />
86+
This cookie stores the user's cookie consent status.
87+
</td>
88+
</tr>
89+
<tr>
90+
<td>
91+
intercom-lou-XXX
92+
</td>
93+
<td>
94+
1 year
95+
</td>
96+
<td>
97+
Intercom cookie
98+
<br />
99+
<br />
100+
This cookie helps to remember the user between visits and resume chat conversations.
101+
</td>
102+
</tr>
103+
<tr>
104+
<td>
105+
intercom-session-XXX
106+
</td>
107+
<td>
108+
1 week
109+
</td>
110+
<td>
111+
Intercom cookie
112+
<br />
113+
<br />
114+
This cookie enables us to track the user's session, including maintaining continuity in chat conversations.
115+
</td>
116+
</tr>
117+
<tr>
118+
<td>
119+
intercom-id-XXX
120+
</td>
121+
<td>
122+
1 year
123+
</td>
124+
<td>
125+
Intercom cookie
126+
<br />
127+
<br />
128+
This cookie enables us to distinguish users.
129+
</td>
130+
</tr>
131+
<tr>
132+
<td>
133+
NID
134+
</td>
135+
<td>
136+
6 months
137+
</td>
138+
<td>
139+
Google
140+
<br />
141+
<br />
142+
This cookie contains a unique ID that identifies a returning user's device. Used by Google’s reCAPTCHA service to prevent spam.
143+
</td>
144+
</tr>
145+
<tr>
146+
<td colSpan={3} style={{textDecoration: 'underline'}}>
147+
<strong>Non-essential cookies</strong>
148+
</td>
149+
</tr>
150+
<tr>
151+
<td>
152+
__ga
153+
</td>
154+
<td>
155+
2 years
156+
</td>
157+
<td>
158+
Google Analytics
159+
<br />
160+
<br />
161+
This cookie enables us to distinguish users.
162+
</td>
163+
</tr>
164+
<tr>
165+
<td>
166+
__gid
167+
</td>
168+
<td>
169+
24 hours
170+
</td>
171+
<td>
172+
Google Analytics
173+
<br />
174+
<br />
175+
This cookie enables us to distinguish users.
176+
</td>
177+
</tr>
178+
<tr>
179+
<td>
180+
__utma
181+
</td>
182+
<td>
183+
2 years
184+
</td>
185+
<td>
186+
Google Analytics
187+
<br />
188+
<br />
189+
This cookie enables us to distinguish users and sessions. The cookie is created when the javascript library executes and no existing __utma cookies exists. The cookie is updated every time data is sent to Google Analytics.
190+
</td>
191+
</tr>
192+
<tr>
193+
<td>
194+
__utmt
195+
</td>
196+
<td>
197+
10 minutes
198+
</td>
199+
<td>
200+
Google Analytics
201+
<br />
202+
<br />
203+
This cookie is used to limit the number of requests sent to the Google Analytics servers in the case of unusually high traffic.
204+
</td>
205+
</tr>
206+
<tr>
207+
<td>
208+
__utmb
209+
</td>
210+
<td>
211+
30 minutes
212+
</td>
213+
<td>
214+
Google Analytics
215+
<br />
216+
<br />
217+
This cookie enables us to determine new sessions/visits. The cookie is created when the javascript library executes and no existing __utmb cookies exists. The cookie is updated every time data is sent to Google Analytics.
218+
</td>
219+
</tr>
220+
<tr>
221+
<td>
222+
__utmc
223+
</td>
224+
<td>
225+
End of browser session
226+
</td>
227+
<td>
228+
Google Analytics
229+
<br />
230+
<br />
231+
This cookie is not used in most sites but is set to enable interoperability with the older version of Google Analytics. Historically, this cookie operated in conjunction with the __utmb cookie to determine whether the user was in a new session/visit.
232+
</td>
233+
</tr>
234+
<tr>
235+
<td>
236+
__utmz
237+
</td>
238+
<td>
239+
6 months
240+
</td>
241+
<td>
242+
Google Analytics
243+
<br />
244+
<br />
245+
This cookie stores the traffic source or campaign that explains how the user reached the site. The cookie is created when the javascript library executes and is updated every time data is sent to Google Analytics.
246+
</td>
247+
</tr>
248+
<tr>
249+
<td>
250+
__utmv
251+
</td>
252+
<td>
253+
2 years
254+
</td>
255+
<td>
256+
Google Analytics
257+
<br />
258+
<br />
259+
This cookie is used to store visitor-level custom variable data. This cookie is created when a developer uses the _setCustomVar
260+
method with a visitor level custom variable. This cookie was also used for the deprecated _setVar method. The cookie is updated every time data is sent to Google Analytics.
261+
</td>
262+
</tr>
263+
<tr>
264+
<td>
265+
pll_language
266+
</td>
267+
<td>
268+
1 year
269+
</td>
270+
<td>
271+
Polylang cookie
272+
<br />
273+
<br />
274+
This cookie enables us to remember the last language visited.
275+
</td>
276+
</tr>
277+
</tbody>
278+
</table>
279+
<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>
280+
<p>You can block cookies by activating the setting on your browser that allows you to refuse the setting of all or some cookies. However, as set out above, if you use your browser settings to block all cookies (including essential cookies) you may not be able to access all or parts of our site.</p>
281+
<h2>More Information</h2>
282+
<p>More information about cookies, including how to block them or delete them, can be found at <a href="http://www.aboutcookies.org" target="_blank" rel="noreferrer">http://www.aboutcookies.org/</a></p>
283+
<p>If you have any further questions, comments or requests regarding our cookies policy or how we use cookies
284+
on our site, then you can contact us by email at <a href="mailto:[email protected]">[email protected]</a>.</p>
285+
<h2>Changes To This Cookies Policy</h2>
286+
<p>Any changes to this cookies policy in the future will be posted on this page and we will take all measures
287+
necessary to communicate any changes to this cookies policy to you. Please check back frequently to see
288+
any updates or changes to this cookies policy. We will also bring your attention to such changes by updating
289+
our cookie banner/pop-up.</p>
290+
<p>This policy was last reviewed and updated: May 31, 2018</p>
291+
</div>
292+
)
293+
/* eslint-enable max-len, react/no-unescaped-entities */

pages/legal-notices/index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Link, Title } from '@scientist-softserv/webstore-component-library'
2+
import { LEGAL_NOTICES } from '../../utils'
3+
4+
const LegalNotices = () => (
5+
<div className='container'>
6+
<Title title='Legal Notices' style={{ marginTop: '1rem' }} />
7+
{LEGAL_NOTICES.map(({ name, url }) => (
8+
<Link
9+
key={name}
10+
label={name}
11+
href={url}
12+
style={{
13+
borderBottom: '1px solid',
14+
marginBottom: '10px',
15+
display: 'block',
16+
paddingBottom: '5px'
17+
}}
18+
/>
19+
))}
20+
</div>
21+
)
22+
23+
export default LegalNotices

pages/privacy-policy/index.js renamed to pages/legal-notices/privacy-policy.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ const PrivacyPolicy = () => (
55
<div className='container'>
66
<Title title='*Client* Privacy Policy' style={{ marginTop: '1rem'}} />
77
{privacyPolicy}
8-
<p>View the <Link href='/privacy-policy/scientist-privacy-policy'>Scientist.com Global Privacy Policy</Link></p>
8+
<p>View the <Link href='/legal-notices/scientist-privacy-policy'>Scientist.com Global Privacy Policy</Link></p>
99
</div>
1010
)
1111

1212
export default PrivacyPolicy
1313

1414
const privacyPolicy = (
1515
<div>
16-
Delete this text and the div! Just needed this so that the build would not fail.
16+
{/* Delete this text and the div! Just needed this so that the build would not fail. */}
17+
Place the privacy policy here.
1718
{/*
1819
* How to add the proper html to this page:
1920
*
File renamed without changes.

pages/terms-and-conditions/index.js renamed to pages/legal-notices/terms-and-conditions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export default TermsAndConditions
1111

1212
const termsAndConditions = (
1313
<div>
14-
Delete this text and the div! Just needed this so that the build would not fail.
14+
{/* Delete this text and the div! Just needed this so that the build would not fail. */}
15+
Place the terms and conditions here.
1516
{/*
1617
* How to add the proper html to this page:
1718
*

0 commit comments

Comments
 (0)