analytics.js-integrations icon indicating copy to clipboard operation
analytics.js-integrations copied to clipboard

feat(optimizely): Expose Edge API to track Edge experiments

Open patrickshih-optimizely opened this issue 4 years ago • 22 comments

What does this PR do? Wraps all push calls with a conditional, which if window.optimizelyEdge (the edge API) exists on a page, it'll push to window.optimizelyEdge instead of window.optimizely.

PR is built on top of https://github.com/segmentio/analytics.js-integrations/pull/481, as there would be much more unnecessary complications to add Edge to the current master. However, one can still view the differences here.

Are there breaking changes in this PR? No, we still track and push to window.optimizely in Web.

Any background context you want to provide? Allows Performance Edge customers to track Performance Edge experiments now.

Is there parity with the server-side/android/iOS integration components (if applicable)? N/A

Does this require a new integration setting? If so, please explain how the new setting works N/A

Links to helpful docs and other external resources

patrickshih-optimizely avatar Jun 24 '20 22:06 patrickshih-optimizely

What does this PR do? Wraps all push calls with a conditional, which if window.optimizelyEdge (the edge API) exists on a page, it'll push to window.optimizelyEdge instead of window.optimizely.

PR is still WIP, blocked on #481

Are there breaking changes in this PR? No, we still track and push to window.optimizely in Web.

Any background context you want to provide? Allows Performance Edge customers to track Performance Edge experiments now.

Is there parity with the server-side/android/iOS integration components (if applicable)? N/A

Does this require a new integration setting? If so, please explain how the new setting works N/A

Links to helpful docs and other external resources

patrickshih-optimizely avatar Jul 10 '20 19:07 patrickshih-optimizely

@patrickshih-optimizely I'm going to work on getting this merged and released. Can you rebase on #481? I hit some merge conflicts and I think you'd be best positioned to resolve them. Thanks!

tysonmote avatar Aug 10 '20 20:08 tysonmote

@tysonmote Yes, I'll get to rebasing, thanks for the heads up!

patrickshih-optimizely avatar Aug 10 '20 20:08 patrickshih-optimizely

@tysonmote, I rebased and cleaned up the code to make it more aligned with #481's changes! I asked a question that I was wondering you may might have some understanding on.

patrickshih-optimizely avatar Aug 18 '20 20:08 patrickshih-optimizely

Hey Optimizely team, quick FYI that our CI is failing with error An unexpected error occurred: "https://optimizely.jfrog.io/optimizely/api/npm/npm/sinon/-/sinon-9.0.2.tgz: Request failed \"401 Unauthorized\"". when attempting to install this dependency. Is there a publicly-accessible version of the dep we could use for these proposed changes? Thank you! @nchilada @patrickshih-optimizely

brennan avatar Sep 21 '20 20:09 brennan

Hey @nchilada @patrickshih-optimizely, just wanted to follow up here. It looks as if a number of modules are now imported from Optimizely private jfrog. Curious your thoughts on the best path forward. I can simply replace the imported modules with the corresponding public packages. Thanks!

brennan avatar Sep 22 '20 16:09 brennan

Hi @brennan, there are some recent updates from Optimizely which requires some update in this PR. Sorry for not communicating this earlier; I'll be working on updating this PR this sprint (until 10/2). Once I finish making the changes, I'll ping you in this PR for next steps.

As for the modules imported via private jfrog, I'm not sure if there's another way forward. Seems like your idea with using corresponding public packages would work 👍

patrickshih-optimizely avatar Sep 22 '20 18:09 patrickshih-optimizely

@brennan, I've updated this PR to reflect the most up-to-date use for Optimizely Edge. This is ready to be reviewed and merged.

I'm also curious if there are any updates with #481, since this PR is build on top of #481. Will #481 be merged first? Heads up @nchilada has since left Optimizely, so if there are any info or questions originally directed to him or Optimizely, please tag me!

patrickshih-optimizely avatar Sep 23 '20 22:09 patrickshih-optimizely

@brennan, any updates on getting this PR in?

patrickshih-optimizely avatar Sep 28 '20 18:09 patrickshih-optimizely

Hey @patrickshih-optimizely. Thanks for following up! I'll take a closer look at this PR today. Note, we're releasing to a limited pool of customers only to validate the PR, then will release to a wider audience.

brennan avatar Sep 29 '20 16:09 brennan

Hi @brennan, let me know if there's any more updates or aspects of this PR that I can address! We're hoping to get this in soon.

patrickshih-optimizely avatar Oct 06 '20 19:10 patrickshih-optimizely

Hey @patrickshih-optimizely, and apologies for the delay. I should have time to look this over this week. Note that we're not planning on a general release, however, until a few customers are able to beta test. A few have already agreed to do so.

brennan avatar Oct 07 '20 02:10 brennan

Great, that sounds good. Thanks @brennan !

patrickshih-optimizely avatar Oct 07 '20 19:10 patrickshih-optimizely

@patrickshih-optimizely Are you able to look into reverting the yarn.lock changes introduced that reference Optimizely private packages stored on jfrog, or alternatively giving me access? Unfortunately, I'm not able to change any dependencies in ths project without getting a 401 Unauthorized because I don't have access. Thanks!

brennan avatar Oct 07 '20 23:10 brennan

Hi @brennan, I reverted the yarn.lock file, but kept the dependencies we added in integrations/optimizely/packages.json. Perhaps installing packages locally will work now. Let me know if there's anything else I need to do.

patrickshih-optimizely avatar Oct 07 '20 23:10 patrickshih-optimizely

Hey @brennan, I understand that y'all will have customers beta this branch first before release. I was wondering if you could let me know what that timeline may look like (for example, details about # of customers, or how long a beta may last). Also, are there other ways of communication that would be more appropriate for updates?

patrickshih-optimizely avatar Oct 15 '20 20:10 patrickshih-optimizely

Hey @patrickshih-optimizely ! I'm a PM at Segment, and I want to follow up on our work to support the Edge API. We had one customer who was really keen to use it, but they have had a change in team leadership - and in priority. I am checking with our Customer Success Managers to see if there are other customers who are interested in testing out a beta integration. Until we can find a customer willing to try it out and provide feedback, we are on pause.

jenskene avatar Oct 16 '20 21:10 jenskene

Hi @jenskene ! I'm the PM from the Optimizely side and curious as to which customer declined the beta? I have a few customers who have raised this in the past so I can definitely reach out to them as well. Thanks!

meiluo7 avatar Oct 16 '20 21:10 meiluo7

@meiluo7, @patrickshih-optimizely and @nchilada — Thank you for your patience! We have a customer who is going to test Optimizely Edge, and we want to merge this PR in our next sprint, approx May 3, 2021. I know it has been a while, so let us know if anything has changed. We are also to merge https://github.com/segmentio/analytics.js-integrations/pull/481. Thank you!

jenskene avatar Apr 21 '21 22:04 jenskene

thank you for the update @jenskene! I looked over this PR and everything looks good.

We were wondering what the plan is for the customer to test this integration, and if there's any way for us to correspond with the customer and Segment. Specifically, if any questions or concerns come up, is there a better way for us to communicate?

patrickshih-optimizely avatar Apr 27 '21 22:04 patrickshih-optimizely

hi @jenskene! any updates on merging this PR? Thanks!

patrickshih-optimizely avatar May 06 '21 21:05 patrickshih-optimizely

Hi @jenskene! would love to hear any updates on whether this PR will be merged within your sprint. Thank you!

patrickshih-optimizely avatar May 13 '21 21:05 patrickshih-optimizely