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

Create analytics service #371

Merged
merged 13 commits into from
Nov 28, 2023
Merged

Create analytics service #371

merged 13 commits into from
Nov 28, 2023

Conversation

Svenstar74
Copy link
Collaborator

@Svenstar74 Svenstar74 commented Nov 21, 2023

Description

The analytics service will be used to post analytics event to the backend.

Changes Made

  • create AnalyticsService and IAnalyticsEvent
  • define all necessary events in 'events.ts'
  • post the events in places where necessary
  • react on screen change to update the screen name in the analytics service

Checklist

  • I have tested this code.
  • I have updated the documentation.
  • I don't add technical debt with this pr.

@Svenstar74 Svenstar74 requested a review from epixieme November 21, 2023 22:29
Copy link

github-actions bot commented Nov 21, 2023

🚀 Expo preview is ready!

  • Project → climate-mind
  • Platforms → android, ios
  • Runtime Version → exposdk:49.0.0
  • More info

Learn more about 𝝠 Expo Github Action

@epixieme
Copy link
Collaborator

This looks awesome. Looking through the PR I have noticed the following.

  1. Is this still needed in the analytics service file? setSessionId(sessionId: string) {
    this._sessionId = sessionId;
    }
    I can't see it being called anywhere.

  2. Do you need NavigationContainerRef in the App component as its unused at the moment?

  3. The package.json file has a downgraded version of "react-native-svg": "13.9.0". It was originally higher 14.XXX

@Svenstar74
Copy link
Collaborator Author

@epixieme

  1. The setSessionId is called in the authSlice
  2. You're right, I removed the unused imports
  3. expo complained about it and wanted it to be that version, so we do that for now^^

Copy link
Collaborator

@epixieme epixieme left a comment

Choose a reason for hiding this comment

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

Works and get 201 responses which is correct

@Svenstar74 Svenstar74 merged commit f575adb into main Nov 28, 2023
1 check passed
@Svenstar74 Svenstar74 deleted the create-analytics-service branch November 28, 2023 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants