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

[DEV-19083] Refactor #397

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c90e39c
Upgrade @react-hookz/web
yuriyyakym Jan 8, 2025
c887109
Use `useQueue` from `@react-hookz/web` & drop custom implementation
yuriyyakym Jan 8, 2025
7b9c9eb
Upgrade `@segment/analytics-next` to `v1.76.0`
yuriyyakym Jan 9, 2025
ed5b9de
Remove UI components
yuriyyakym Jan 9, 2025
ebf4aa3
Update test file
yuriyyakym Jan 9, 2025
ad03d13
Drop onetrust
yuriyyakym Jan 9, 2025
8c5e083
Drop cookieState helper && uninstall js-cookie
yuriyyakym Jan 9, 2025
6993519
Temporarily mock getConsentCookie in tests
yuriyyakym Jan 9, 2025
835a7f3
Remove Plausible-related tests
yuriyyakym Jan 9, 2025
c13ea94
Remove ignoreConsent param
yuriyyakym Jan 9, 2025
f1257d6
Remove plausible-related notes from Readme
yuriyyakym Jan 9, 2025
e78aba9
Get rid of Plausible
yuriyyakym Jan 9, 2025
c8288c7
Implement logToConsole plugin
yuriyyakym Jan 9, 2025
bbe0600
Replace inline logging with logToConsole plugin
yuriyyakym Jan 9, 2025
f561c19
Calculate isTrackingCookieAllowed && update analytics Context
yuriyyakym Jan 10, 2025
6f0dc14
Disable google tracking if tracking is not allowed
yuriyyakym Jan 10, 2025
2353b08
Introduce ConsentCategory type
yuriyyakym Jan 10, 2025
d4c61fb
Add injectPrezlyMetaFromPropsPlugin
yuriyyakym Jan 13, 2025
bee5d6e
Update PrezlyMeta type
yuriyyakym Jan 13, 2025
b1e326f
Extract injecting prezly meta to event into a separate plugin
yuriyyakym Jan 13, 2025
5bc9a25
Refactor redundant condition
yuriyyakym Jan 13, 2025
b9a4cda
Add useLatest hook
yuriyyakym Jan 13, 2025
4154062
Refactor useAnalytics hook to use useLatest instead of ref mutation
yuriyyakym Jan 13, 2025
b7543b5
Get rid of redundant useEffect for isTrackingCookieAllowed check
yuriyyakym Jan 13, 2025
6fe68d1
Add TrackingGroups type
yuriyyakym Jan 13, 2025
a4fb323
Add getTrackingGroups helper
yuriyyakym Jan 13, 2025
690917b
Update useAnalytics identification function
yuriyyakym Jan 13, 2025
4c82e62
Refactor AnalyticsProvider
yuriyyakym Jan 13, 2025
65f3761
Refactor useAnalytics - remove `isTrackingCookieAllowed` condition
yuriyyakym Jan 13, 2025
274f04f
Replace TrackingGroup type with TrackingPermissions
yuriyyakym Jan 14, 2025
a428a95
Replace getTrackingGroups with getTrackingPermissions
yuriyyakym Jan 14, 2025
ad866c9
Refactor injectPrezlyMeta to work based on props and not meta tags
yuriyyakym Jan 14, 2025
c756653
Remove redundant normalizePrezlyMetaPlugin
yuriyyakym Jan 14, 2025
9b5997e
Update TrackingPolicy type (copy from SDK PR for now)
yuriyyakym Jan 14, 2025
b46de16
Update Google Analytics disabling effect
yuriyyakym Jan 14, 2025
bb6587e
De-register segment analytics if another registration is requested
yuriyyakym Jan 14, 2025
1bb6462
Update Consent type
yuriyyakym Jan 14, 2025
b9132ac
Update useAnalytics hook
yuriyyakym Jan 14, 2025
a87a914
Update default tracking_policy value
yuriyyakym Jan 14, 2025
1297129
Fix tests
yuriyyakym Jan 15, 2025
fdcc235
Update AnalyticsProvider
yuriyyakym Jan 15, 2025
4636231
Update AnalyticsProvider tests
yuriyyakym Jan 15, 2025
aedaf78
Update sendToPrezly plugin and its tests
yuriyyakym Jan 15, 2025
33d4848
Update useAnalytics to be aware of integrations
yuriyyakym Jan 15, 2025
ac90903
Refactor getTrackingPermissions
yuriyyakym Jan 15, 2025
eec2735
Update AnalyticsProvider
yuriyyakym Jan 15, 2025
23d7c94
Update sendToPrezly plugin type to be `destination`
yuriyyakym Jan 15, 2025
fd1b2cb
Update `useAnalytics` hook
yuriyyakym Jan 15, 2025
c527d9d
Remove unused code
yuriyyakym Jan 15, 2025
25d4d37
Add test checking if Prezly metadata is injected to event
yuriyyakym Jan 15, 2025
f386cf1
Install `plausible-tracker`
yuriyyakym Jan 15, 2025
08415ba
Add sendEventToPlausiblePlugin
yuriyyakym Jan 15, 2025
866533f
Revert PickedNewsroomProperties type
yuriyyakym Jan 15, 2025
b06d5fa
Update tsconfig - do not exclude injectPrezlyMeta
yuriyyakym Jan 15, 2025
2a81bc6
Load plausible plugin
yuriyyakym Jan 15, 2025
0f84adf
Update @prezly/sdk to v23.6.0
yuriyyakym Jan 20, 2025
cf59fb8
Refactor code - add memoization
yuriyyakym Jan 20, 2025
164cb38
Fix getTrackingPermissions condition
yuriyyakym Jan 20, 2025
3327bb7
Inject prezly meta to plausible event
yuriyyakym Jan 20, 2025
fabbf1b
Prevent analytics from being loaded multiple times
yuriyyakym Jan 20, 2025
1122506
Specify constant type and make ts happier
yuriyyakym Jan 21, 2025
22b97b7
Update mock to updated interface
yuriyyakym Jan 21, 2025
e969167
Fix newsroom mock
yuriyyakym Jan 21, 2025
e587eb3
Bring back `isEnabled` prop
yuriyyakym Jan 21, 2025
6556f0d
Make integration overridable in useAnalytics hook
yuriyyakym Jan 21, 2025
44a49ec
Update docs
yuriyyakym Jan 21, 2025
d97d522
Make `isEnabled` prop optional
yuriyyakym Jan 21, 2025
4ed2cca
Update package-lock.json
yuriyyakym Jan 21, 2025
a7cb31c
Update node to v22 in .nvmrc
yuriyyakym Jan 21, 2025
bc0e09c
Get rid of useSyncedRef usage
yuriyyakym Jan 21, 2025
7126ae8
Uninstall @react-hookz/web
yuriyyakym Jan 21, 2025
0e0bc56
Fix CI
yuriyyakym Jan 21, 2025
cc63122
Update package-lock.json
yuriyyakym Jan 21, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
${{ runner.os }}-

- name: Install Node.js dependencies
run: npm ci
run: npm ci --include=optional

- name: Run ESLint
uses: wearerequired/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
${{ runner.os }}-

- name: Install Node.js dependencies
run: npm ci
run: npm ci --include=optional

- name: Run tests
run: npm test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
node-version-file: '.nvmrc'

- run: npm ci
- run: npm ci --include=optional

- run: npm run typecheck
env:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v22
Loading
Loading