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

Fix multiple link click events tracked for a single tracker in case multiple trackers are initialized on the page (close #1384) #1385

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

matus-tomlein
Copy link
Contributor

Issue #1384

Since the v4 release, in case multiple trackers were initialized on the same page, link click tracking tracked multiple events on each tracker for each link click.

For instance, in case 3 trackers were initialized and link click tracking was enabled, each link click would result in 3 events on each tracker.

This PR fixes the problem by qualifying which tracker should be used in the trackLinkClick function call from the click handler.

…ultiple trackers are initialized on the page (close #1384)
Copy link

bundlemon bot commented Nov 20, 2024

BundleMon

Files added (6)
Status Path Size Limits
trackers/javascript-tracker/dist/sp.js
+24.46KB 30KB / +10%
libraries/browser-tracker-core/dist/index.mod
ule.js
+23.48KB 25KB / +10%
libraries/tracker-core/dist/index.module.js
+19.42KB 20KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+17.37KB 20KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+17.31KB 20KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.49KB 5KB / +10%

Total files change +105.54KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

Copy link
Contributor

@jethron jethron left a comment

Choose a reason for hiding this comment

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

Oops, my bad... :(

Good find, LGTM!

@matus-tomlein matus-tomlein changed the base branch from master to release/4.0.4 November 21, 2024 06:54
@matus-tomlein matus-tomlein merged commit 9954f79 into release/4.0.4 Nov 21, 2024
3 checks passed
@matus-tomlein matus-tomlein deleted the issue/1384-link_click_fix branch November 21, 2024 06:55
matus-tomlein added a commit that referenced this pull request Nov 21, 2024
…ultiple trackers are initialized on the page (close #1384)

PR #1385
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