-
Notifications
You must be signed in to change notification settings - Fork 14
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: introduce plugin system to offset non-essenial logic #348
base: main
Are you sure you want to change the base?
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
This PR will trigger a minor release when merged. |
This is a first draft that brings the code down to ~12.5kB. |
@@ -64,99 +111,6 @@ function processQueue() { | |||
} | |||
} | |||
|
|||
function addCWVTracking() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to cwv.js
}, 2000); // wait for delayed | ||
} | ||
|
||
function addNavigationTracking() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to navigation.js
@@ -211,8 +165,6 @@ function getIntersectionObsever(checkpoint) { | |||
if (!window.IntersectionObserver) { | |||
return null; | |||
} | |||
activateBlocksMO(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved down addTrackingFromConfig
@@ -251,28 +203,6 @@ function addViewMediaTracking(parent) { | |||
} | |||
} | |||
|
|||
function addFormTracking(parent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to form.js
import { | ||
addAdsParametersTracking, | ||
addCookieConsentTracking, | ||
addEmailParameterTracking, | ||
addUTMParametersTracking, | ||
} from './martech.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to martech.js
& onetrust.js
Let's make that a non-goal:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good start. I wonder if we can make the CWS plugin more elegant, so that it does not need to load two files after another. Maybe rollup the dependency.
I tried a few ways to include the web-vitals lib directly in the So unless we stop cleaning up the output files in rollup, I think we'll be stuck having to load this separately |
…king all resources, not just same host
# [2.29.0](v2.28.0...v2.29.0) (2025-01-15) ### Features * **loadresource:** add `allresources` feature flag that enables tracking all resources, not just same host ([7c536d7](7c536d7))
the target field was until now unused. this change uses it for the status code and in turn tracks all errored resources as `missingresource`
# [2.30.0](v2.29.0...v2.30.0) (2025-01-15) ### Features * **missingresource:** report all resource error with http status code ([e238136](e238136))
# [2.31.0-beta.1](v2.30.0...v2.31.0-beta.1) (2025-01-16) ### Features * handle pre-rendering ([bb11187](bb11187))
This reverts commit bb11187.
# [2.31.0-beta.2](v2.31.0-beta.1...v2.31.0-beta.2) (2025-01-16) ### Reverts * Revert "feat: handle pre-rendering" ([6471af5](6471af5))
# [2.31.0-beta.3](v2.31.0-beta.2...v2.31.0-beta.3) (2025-01-16) ### Bug Fixes * bugs and failing tests ([5c9adbc](5c9adbc)) * cross-browser compatibility ([1c21afd](1c21afd)) * set proper url base for plugins ([9726dc8](9726dc8)) * use proper fully qualified URLs for plugin path to avoid CORS ([c73eb31](c73eb31)) ### Features * allow external extension via window.RUM_PLUGINS ([4613b00](4613b00)) * inline web-vitals.js ([7d89e9f](7d89e9f)) * introduce minimal plugin system to offset non-essenial logic ([8642557](8642557)) * introduce minimal plugin system to offset non-essenial logic ([6066f0b](6066f0b))
# [2.31.0-beta.4](v2.31.0-beta.3...v2.31.0-beta.4) (2025-01-16) ### Bug Fixes * plugin path resolution ([f464652](f464652))
# [2.31.0-beta.5](v2.31.0-beta.4...v2.31.0-beta.5) (2025-01-17) ### Bug Fixes * just forcing a release ([84ab687](84ab687))
|
||
export default function addVideoTracking({ context }) { | ||
context.querySelectorAll('video').forEach(() => { | ||
// TODO: Add video tracking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an empty placeholder for now
As discussed over Slack, we want to introduce a plugin system to offset some of the non-essential logic and reduce the core library's overall file size.
At a high level, we want:
Test Url: https://rum-plugin-system--helix-website--adobe.aem.live/?rum=on
PR against helix website: adobe/helix-website#754