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(posthog): disable autocapture and track pageview on location change #529

Merged

Conversation

beawar
Copy link
Contributor

@beawar beawar commented Oct 11, 2024

  • Disable autocapture to not send any event anymore.
  • Disable autocapture of pageview in favor of TrackerPageView, which sends a $pageview event each time the location change.
  • Move the TrackerProvider under the Router in order to receive updates on the location.
  • Keep autocapture of pageleave enable.
  • Configure PostHog client to use POSTHOG_API_HOST env variable if set, and fallback to stat.zextrsa.tools. This configuration allows using a different PostHog instance in development. Be aware that the host env is not set in Jenkins, meaning that for the packages build through it only the key will be set, while the host will always use the fallback.
  • Move each component/hook in a specific file, under the tracker folder.

Refs: SHELL-251

@beawar beawar self-assigned this Oct 11, 2024
@beawar beawar requested review from a team as code owners October 11, 2024 12:39
@beawar beawar changed the title feat: disable autocapture and track pageview on location change feat(posthog): disable autocapture and track pageview on location change Oct 11, 2024

This comment has been minimized.

1 similar comment

This comment has been minimized.

Copy link

Passed

Analysis Details

0 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage 100.00% Coverage (65.20% Estimated after merge)
  • Duplications 0.00% Duplicated Code (0.00% Estimated after merge)

Project ID: carbonio-shell-ui

View in SonarQube

@beawar beawar merged commit c951174 into devel Oct 18, 2024
3 checks passed
@beawar beawar deleted the SHELL-251-reduce-number-of-events-tracked-with-autocapture branch October 18, 2024 07:18
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.

3 participants