You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're batching POST requests in batches of 10 and then using a beacon config to send them. One of the issues with QAing this setup is that there's a lag between tracking the event and the event appearing in the snowplow debug panel (since no network request has gone out yet, we need to wait until there's been multiple-of-10 events tracked before we can debug our events. This often results in me sending a bunch of dummy events to hit that multiple-of-10 number.)
I was thinking this feature could add events that are "queued" (perhaps in "outline" text formatting, a gray background, or some similar visual indication that they haven't been sent yet) to the events list on the left. I haven't developed much in Chrome extensions, but with a bit of preliminary digging it looks like this would mean overriding localstorage from a content script within the window, and then communicating changes to localstorage to the extension (where they'd then have to be parsed and displayed)
Then, when the event actually goes out in a network request, we can match its event ID and then mark the event as resolved by changing its styling to match events that have been sent
(I was actually thinking of taking a shot at implementation if I can budget some hours towards it this week)
Thanks - love the plugin! It's been a life-saver for testing our snowplow setup.
The text was updated successfully, but these errors were encountered:
ScottyMJacobson
changed the title
Displaying Queued Events?
Displaying Queued Events? (feature request)
Mar 12, 2019
Good use case! This will be quite a bit more work than #24 but should be pretty doable. Talking to the content pages will probably require more permissions which I'm not too keen on, but a PR is welcome.
You'll also be tied to the data structure used for the queue in localStorage but the JS tracker doesn't move fast enough for that to really be an issue.
Rather than dummy events, you could also just be running snowplow("flushBuffer"); which should force them all at once no matter how many there are. A simpler change would just add a Toolbar button to call that on the content page, if you don't mind clicking a bit more often. :)
Hi all!
We're batching POST requests in batches of 10 and then using a
beacon
config to send them. One of the issues with QAing this setup is that there's a lag between tracking the event and the event appearing in thesnowplow
debug panel (since no network request has gone out yet, we need to wait until there's been multiple-of-10 events tracked before we can debug our events. This often results in me sending a bunch of dummy events to hit that multiple-of-10 number.)I was thinking this feature could add events that are "queued" (perhaps in "outline" text formatting, a gray background, or some similar visual indication that they haven't been sent yet) to the events list on the left. I haven't developed much in Chrome extensions, but with a bit of preliminary digging it looks like this would mean overriding localstorage from a content script within the window, and then communicating changes to localstorage to the extension (where they'd then have to be parsed and displayed)
Then, when the event actually goes out in a network request, we can match its event ID and then mark the event as resolved by changing its styling to match events that have been sent
(I was actually thinking of taking a shot at implementation if I can budget some hours towards it this week)
Thanks - love the plugin! It's been a life-saver for testing our snowplow setup.
The text was updated successfully, but these errors were encountered: