Add plugin to send requests with user ID to a Kantar FocalMeter endpoint (close #1133) - #1134
Merged
Matus Tomlein (matus-tomlein) merged 5 commits intoJan 16, 2023
Conversation
Matus Tomlein (matus-tomlein)
changed the base branch from
master
to
release/3.8.0
December 22, 2022 14:41
Matus Tomlein (matus-tomlein)
requested a review
from Peter Perlepes (igneel64)
December 22, 2022 14:44
BundleMonFiles added (6)
Total files change +92.34KB 0% Final result: ✅ View report in BundleMon website ➡️ |
Peter Perlepes (igneel64)
force-pushed
the
release/3.8.0
branch
from
January 3, 2023 13:11
d5ce457 to
22845ba
Compare
Matus Tomlein (matus-tomlein)
requested a review
from Paul Boocock (paulboocock)
January 9, 2023 07:55
Matus Tomlein (matus-tomlein)
force-pushed
the
issue/1133-focalmeter
branch
from
January 9, 2023 08:02
fa4fff4 to
18434f6
Compare
| return `sp-fclmtr-${trackerId}`; | ||
| } | ||
|
|
||
| function sendRequest(url: string, userId: string, LOG: Logger, successCallback: () => void): void { |
Contributor
There was a problem hiding this comment.
At some point this should be extracted (just leaving the comment here as a thought moving forward)
Peter Perlepes (igneel64)
approved these changes
Jan 9, 2023
Matus Tomlein (matus-tomlein)
changed the base branch from
master
to
release/3.9.0-beta.1
January 16, 2023 10:57
Matus Tomlein (matus-tomlein)
added a commit
that referenced
this pull request
Jan 17, 2023
Greg Leonard (greg-el)
pushed a commit
that referenced
this pull request
Mar 2, 2023
Matus Tomlein (matus-tomlein)
added a commit
that referenced
this pull request
Mar 28, 2023
Peter Perlepes (igneel64)
pushed a commit
that referenced
this pull request
May 9, 2023
Greg Leonard (greg-el)
pushed a commit
that referenced
this pull request
May 26, 2023
This file contains hidden or 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
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
afterTrackcallback. 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.