-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 the Osano snippet #16365
Add the Osano snippet #16365
Conversation
@@ -13,6 +13,12 @@ | |||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | |||
<link rel="stylesheet" href="%PUBLIC_URL%/index.css"> | |||
<title>Airbyte</title> | |||
<% if (process.env.REACT_APP_OSANO) { %> | |||
<style> | |||
.osano-cm-widget { display: none; } |
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.
ℹ️ This is the official way to hide their widget (cookie button on the bottom of the page): https://docs.osano.com/hiding-the-cookie-widget
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.
Confirmed network request made
However document.querySelector(".osano-cm-widget");
is returning nothing. Is that expected?
@krishnaglick yes That's currently expected. The widget would only show up once we activate the modal (i.e. it's not longer in just discovering mode). |
What
Part of https://github.com/airbytehq/airbyte-cloud/issues/2426 (Step 1)
Adds the Osano snippet to the code. At the moment this is configured only as "Scanning" in the Osano UI to collect which scripts exist.
In a separate step later we'll need to activate it to block in the UI as well as adding a link to the UI to open the drawer for users who want to open it (since we hide the default widget button).
How
I've used an environment variable to inject that directly into the index.html, since the Osano script should load as early as possible to prevent all further scripts from loading, unless the user gave consent to them.
This currently requires though to have that parameter available at build time. Thus if we'd later only want to enable that in Cloud we'll need to either move this into index.tsx and use the window.CLOUD parameter or need to build the frontend for each environment. Since the latter is anyway our plan I already added that, and try to move forward with Infra and the Config Provider refactoring, that we can actually move the FE to be build separate for each environment until we want to enable this (it's anyway not clear right now if we want to enable that only in CLoud or also in OSS).