Skip to content

Migrate html5 plugin to new media plugin - #1344

Merged
Greg Leonard (greg-el) merged 1 commit into
release/4.0.0from
migrate-html5-plugin-to-new-media-plugin
Oct 8, 2024
Merged

Migrate html5 plugin to new media plugin#1344
Greg Leonard (greg-el) merged 1 commit into
release/4.0.0from
migrate-html5-plugin-to-new-media-plugin

Conversation

@greg-el

@greg-el Greg Leonard (greg-el) commented Sep 24, 2024

Copy link
Copy Markdown
Contributor

This PR refactors the tracking for the HTML media plugin to use the Snowplow Media Tracking plugin. I've also copied the DynamicContext changes to the Media plugin present in the YouTube PR to send the HTML entities.

API Changes:

  • The id arg in the config passed by the user has been renamed video to be consistent with other media trackers, and avoid any confusion with id in the Media plugin
  • It now accepts either a string (HTML id) or a HTMLMediaElement.

@bundlemon

bundlemon Bot commented Sep 24, 2024

Copy link
Copy Markdown

BundleMon

Files added (6)
Status Path Size Limits
trackers/javascript-tracker/dist/sp.js
+24.24KB 30KB / +10%
libraries/browser-tracker-core/dist/index.mod
ule.js
+23.41KB 25KB / +10%
libraries/tracker-core/dist/index.module.js
+19.12KB 20KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+17.24KB 20KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+17.18KB 20KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.49KB 5KB / +10%

Total files change +104.68KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

@greg-el
Greg Leonard (greg-el) force-pushed the migrate-html5-plugin-to-new-media-plugin branch 2 times, most recently from 4ed9f55 to 612b066 Compare September 25, 2024 12:36
@greg-el
Greg Leonard (greg-el) marked this pull request as ready for review September 25, 2024 14:27
@greg-el
Greg Leonard (greg-el) force-pushed the migrate-html5-plugin-to-new-media-plugin branch from 612b066 to 36c1910 Compare September 25, 2024 14:44
Comment thread plugins/browser-plugin-media-tracking/src/player.ts Outdated
Comment thread plugins/browser-plugin-media-tracking/src/player.ts Outdated
Comment thread plugins/browser-plugin-media-tracking/src/player.ts Outdated
Comment thread plugins/browser-plugin-media-tracking/src/api.ts Outdated
Comment thread plugins/browser-plugin-media-tracking/src/api.ts
@greg-el
Greg Leonard (greg-el) force-pushed the migrate-html5-plugin-to-new-media-plugin branch 2 times, most recently from 771d6bf to b55683b Compare October 7, 2024 15:19
Comment thread trackers/javascript-tracker/test/pages/media/tracking.html Outdated
Comment thread plugins/browser-plugin-media-tracking/src/api.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Once we fix the integration tests and validate that things work, I am happy to approve this! The code looks great!

Comment thread plugins/browser-plugin-media-tracking/src/api.ts Outdated
Comment thread trackers/javascript-tracker/test/pages/media/tracking.html Outdated
@greg-el
Greg Leonard (greg-el) force-pushed the migrate-html5-plugin-to-new-media-plugin branch from 74f6c44 to b51a4c1 Compare October 8, 2024 10:23

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, nice work! 👍

Just one more comment about the default capture events – either remove the defaults or add ping events there.

Comment thread plugins/browser-plugin-media-tracking/src/helperFunctions.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants