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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendBeacon support for tracking events? #759

Closed
joshunger opened this issue May 17, 2022 · 22 comments
Closed

sendBeacon support for tracking events? #759

joshunger opened this issue May 17, 2022 · 22 comments

Comments

@joshunger
Copy link

joshunger commented May 17, 2022

馃憢 Is there support for sendBeacon to send tracking events?

Reference: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon

We are missing events sometimes when we navigate quickly after calling track. We switched out Amplitude calls to sendBeacon which fixed the issue on our analytics side and we'd like to do the same thing with Optimizely.

@ruettenm
Copy link

ruettenm commented Jan 4, 2023

We also have the same issues. Could you please please give feedback here?

Other Companys like Google use sendBeacon already for event tracking. It's exactly meant for your use case.

It's intended to be used for sending analytics data to a web server, and avoids some of the problems with legacy techniques for sending analytics, such as the use of [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest).

@mikechu-optimizely
Copy link
Contributor

Woah. Sorry for the delay in acknowledging. Let me discuss this during today's Standup/Planning and get some initial thoughts, especially from the primary devs and product owners.

@mikechu-optimizely
Copy link
Contributor

The primary devs think this is definitely something to run a spike to research the efficiency, reliability, and how to implement sendBeaon into the browser context.

The product team thinks this can fit into a QY1 or QY2 initiative.

A Jira item is being created to prioritize.

@ruettenm
Copy link

ruettenm commented Jan 5, 2023

Thanks for the feedback. We are looking forward for it. Unit you release the feature we will implement a workaround on our side using sendBeaon to call our server and send the metrics from it.

Do you inform us here in the ticket about the progress of the sendBeaon implementation?

Best regards
Matthias

@mikechu-optimizely
Copy link
Contributor

I'll put a note in the Jira item to update this Issue upon milestone progress.

@iamstarkov
Copy link

@mikechu-optimizely how is the progress? I filed ticket on this matter https://feedback.optimizely.com/ideas/ODPI-I-22

@mikechu-optimizely
Copy link
Contributor

@iamstarkov, Sorry for the delay in replying. I'll link up the feedback item to the internal engineering Jira ticket (FSSDK-8752) for this.

@russell-loube-optimizely This ticket is ready for pointing. Can you run this through your Product prioritization and see where it fits?

@russell-loube-optimizely

@mikechu-optimizely , thanks for the tag. Yes, let's discuss this as a team which has been long overdue.

We'll provide any updates here.

@mikechu-optimizely
Copy link
Contributor

We are going to move forward with updating the SDK to leverage sendBeacon for sending track & Advanced Audience Targeting (AAT; ODP) events.

@russell-loube-optimizely will have the Product team take this GH Issue and Aha (feedback item) and add it to their prioritization. From there, we can give an ETA.

@adamhouten
Copy link

@mikechu-optimizely Apologies for the prod, but we've been finding the same issue as above. Is there a fresh update that I can bring back to my team?

Cheers!

@mikechu-optimizely
Copy link
Contributor

No troubles for the poke 馃憟 馃榿

I still see the Jira ticket (FSSDK-8752) in the "ready for story pointing" hopper. It's been approved and just needs to be pulled into a sprint plan after assigning the points and a dev resource to do the work.

I'll add another note to the ticket, ping @russell-loube-optimizely and the product team, and also mention it at our next stand-up. ...see if we can push the gas pedal a little more. I've put on my calendar to update this thread 24 July in the afternoon.

@mikechu-optimizely
Copy link
Contributor

The ticket has been moved into this sprint as a spike first.

We're looking into fetch's keepalive as a solution for both browser and node contexts allowing us to implement more quickly. Using fetch() appears to be a good candidate to replace sendBeacon().

@raju-opti

@russell-loube-optimizely

Firefox doesn't support keep alive, so we'll be evaluating implementation with sendBeacon where needed.

@mikechu-optimizely
Copy link
Contributor

Yikes. Our research was completed back on the 4th of this month.

I've requested that a development ticket to be created off the Spike and prioritized into a coming sprint. Our product team will be setting when to pull the work into a near-term sprint.

@mikechu-optimizely
Copy link
Contributor

Product has created ticket FSSDK-9605 which is set for async pointing.

@mikechu-optimizely
Copy link
Contributor

Async story points applied. We have a planning meeting today. I'll push to get this added to our next sprint.

cc @russell-loube-optimizely

@mikechu-optimizely
Copy link
Contributor

Ticket FSSDK-9605 is in the active sprint.

@mikechu-optimizely
Copy link
Contributor

This #866 is out there under review now. We'll have it merged in the next few days.

@mikechu-optimizely
Copy link
Contributor

We'd love any feedback you all have @joshunger @ruettenm @iamstarkov @adamhouten

@mikechu-optimizely
Copy link
Contributor

PR #866 passed code review and implementation testing.

@raju-opti & I are hammering an e2e automation test that's not happy....

@mikechu-optimizely
Copy link
Contributor

mikechu-optimizely commented Oct 4, 2023

Looking for last 馃憤 from senior architect, then we'll merge #866

Good comments from @alexparish

@mikechu-optimizely
Copy link
Contributor

PR #866 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants