-
Notifications
You must be signed in to change notification settings - Fork 222
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 plugin to send requests with user ID to a Kantar FocalMeter endpoint (close #1133) #1134
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BundleMonFiles added (6)
Total files change +92.34KB 0% Final result: ✅ View report in BundleMon website ➡️ |
igneel64
force-pushed
the
release/3.8.0
branch
from
January 3, 2023 13:11
d5ce457
to
22845ba
Compare
igneel64
reviewed
Jan 4, 2023
matus-tomlein
force-pushed
the
issue/1133-focalmeter
branch
from
January 9, 2023 08:02
fa4fff4
to
18434f6
Compare
igneel64
reviewed
Jan 9, 2023
igneel64
reviewed
Jan 9, 2023
return `sp-fclmtr-${trackerId}`; | ||
} | ||
|
||
function sendRequest(url: string, userId: string, LOG: Logger, successCallback: () => void): void { |
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.
At some point this should be extracted (just leaving the comment here as a thought moving forward)
igneel64
approved these changes
Jan 9, 2023
matus-tomlein
added a commit
that referenced
this pull request
Jan 17, 2023
greg-el
pushed a commit
that referenced
this pull request
Mar 2, 2023
matus-tomlein
added a commit
that referenced
this pull request
Mar 28, 2023
igneel64
pushed a commit
that referenced
this pull request
May 9, 2023
greg-el
pushed a commit
that referenced
this pull request
May 26, 2023
me-marcel
pushed a commit
to me-marcel/snowplow-javascript-tracker
that referenced
this pull request
Jul 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #1133
Implements a plugin for integration with Kantar FocalMeter system for measuring audience of content using a router on local network.
The solution works by sending an HTTP request with the current domain user ID to a configurable Kantar endpoint. This enables the FocalMeter to associate the traffic from the device with the Snowplow ID.
The request is made from a plugin in the
afterTrack
callback. It checks whether the user ID in the trackerd event changed from the last observed one and if so, it makes the request. The Kantar endpoint to make the request to is passed when creating the plugin.There is also an option to store the last observed user ID in local storage so that the same request doesn't need to be made on each page load. However, I decided to make the local storage disabled by default because I assume that sometimes it is necessary to make the request with the ID multiple times. For example, in case one loads the page in a place where they don't have the Kantar router but then go to a different place with the router, we should make the request in the second place as well.