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

Add screen tracking plugin and add support for browser plugins #1394

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

matus-tomlein
Copy link
Contributor

This PR adds a new screen tracking plugin for tracking screen view events. The plugin has full support for screen engagement tracking which means it has the following functionality:

  1. Automatically tracks a screen_end event just before transitioning to a new screen view event.
  2. Attaches a screen_summary context entity to screen_end, application_foreground and application_background events.

It also tracks the screen context entity with all events following a screen view and adds previousName and previousId references to screen view events.

The plugin is included in the React Native tracker. In order to make it compatible with the tracker, I had to add support for browser tracker plugins. By doing this, the tracker is now compatible also with our other browser plugins, such as the e-commerce plugin – I added unit tests for this.

Copy link

bundlemon bot commented Nov 26, 2024

BundleMon

Files added (6)
Status Path Size Limits
trackers/javascript-tracker/dist/sp.js
+24.54KB 30KB / +10%
libraries/browser-tracker-core/dist/index.mod
ule.js
+23.59KB 25KB / +10%
libraries/tracker-core/dist/index.module.js
+19.5KB 20KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+17.44KB 20KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+17.39KB 20KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.49KB 5KB / +10%

Total files change +105.95KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

Copy link

@mscwilson mscwilson left a comment

Choose a reason for hiding this comment

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

lgtm

plugins/browser-plugin-screen-tracking/src/utils.ts Outdated Show resolved Hide resolved
plugins/browser-plugin-screen-tracking/src/api.ts Outdated Show resolved Hide resolved
@matus-tomlein matus-tomlein merged commit 6aafdea into wip/react-native Nov 29, 2024
2 checks passed
@matus-tomlein matus-tomlein deleted the issue/screen-tracking branch November 29, 2024 08:41
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