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

Filtering query parameters / post processing #1392

Open
drphrozen opened this issue Nov 25, 2024 · 2 comments
Open

Filtering query parameters / post processing #1392

drphrozen opened this issue Nov 25, 2024 · 2 comments
Labels
type:enhancement New features or improvements to existing features.

Comments

@drphrozen
Copy link

Is your feature request related to a problem? Please describe.
Filtering query params to ensure compliancy across multiple solutions.
We have multiple teams implementing the same tracker across multiple subdomains and would like to have some guardrails in place for all of these.

Describe the solution you'd like
We want to be able to process URLs from a central position (when events/context are being added, fx).
This could be scoped to allow post processing of any events or contexts.

Describe alternatives you've considered

  • plugin with afterTrack implementation, mutating the Payload
  • customFetch - mutating the Request with regexes
  • implementing a custom PayloadBuilder - thanks to this we could manipulate the payload directly when it’s build - this is an optimal solution because we wouldn’t have to traverse the payload object twice - once when creating it and once when we want to filter and update query params in our events
  • implementing custom Emitter - similar to option one, but tied directly to a tracker implementation and configuration

Additional context
The solution should also be aware of the context (fx. which namespace is this running for?)

@drphrozen drphrozen added the type:enhancement New features or improvements to existing features. label Nov 25, 2024
@drphrozen
Copy link
Author

This would not directly help the url added in trackPageView since its being exposed in the url base field. But maybe post processing could happen both for event, context and "payload".

@miike
Copy link
Contributor

miike commented Nov 25, 2024

I'm not 100% clear on what the functionality here would be.

Is it to modify (remove, modify, transform?) just the url component of the payload or all fields? Generally we would steer the governance layer to be in the dataLayer (or something similar) which then makes it easier to perform things like automated tests and scans rather than the logic being within the tracker itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New features or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

2 participants