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

feat: send additional Sift events on Android #8991

Merged
merged 5 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions patches/sift-react-native+0.1.8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/node_modules/sift-react-native/lib/typescript/src/index.d.ts b/node_modules/sift-react-native/lib/typescript/src/index.d.ts
index e6bcb83..6582ec8 100644
--- a/node_modules/sift-react-native/lib/typescript/src/index.d.ts
+++ b/node_modules/sift-react-native/lib/typescript/src/index.d.ts
@@ -1,6 +1,7 @@
declare type SiftReactNativeType = {
setSiftConfig(accountId: string, beaconKey: string, disallowCollectingLocationData: boolean, serverUrlFormat: string): void;
setUserId(userId: string): void;
+ setPageName(pageName: String): void;
unsetUserId(): void;
upload(): void;
};
mdole marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 0 additions & 3 deletions src/app/system/navigation/ModalStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export const ModalStack: React.FC = ({ children }) => {
useEffect(() => {
if (trackSiftAndroid) {
const initialRouteName = routeNameRef.current
mdole marked this conversation as resolved.
Show resolved Hide resolved
// Expect error becuase their typing doesn't include setPageName, but it's there
// @ts-expect-error
SiftReactNative.setPageName(`screen_${initialRouteName}`)
SiftReactNative.upload()
}
Expand Down Expand Up @@ -75,7 +73,6 @@ export const ModalStack: React.FC = ({ children }) => {
})

if (trackSiftAndroid) {
// @ts-expect-error
SiftReactNative.setPageName(`screen_${currentRoute.name}`)
SiftReactNative.upload()
}
Expand Down