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
Feature Request: Conditionally SDK Integration for Web #92
Comments
Hello @chandrabezzo , For such cases like using different secrets per environment/build I would suggest flutter_dotenv and dedicated .env files per environment. Is this an approach that could be of conveniance to you? |
Hey @chandrabezzo, can you kidnly confirm if you are satisfied with our suggestion in the previous message? |
Hey @chandrabezzo, I just realized that there is an issue with our documentation which directs you to get the JS SDK installation snippet from the JS SDK docs. There it includes the SDK initialization as well and it needs you to declare the write key and the data plane URL in index.html itself. But we already had a way to pass the write key, and data plane URL from the dart side, you can just remove the load call in the JS SDK installation code snippet you are using in your index.html similar to our example here |
@chandrabezzo, can you confirm updating the code snippet in the index.html helped solving your issue? |
Hi @desusai7 thanks for the confirm. So, for the latest version we doesn't need to add write key and data plane url via index.html |
Is your feature request related to a problem? Please describe.
Clear ways to install sdk for web. When we use several write key for environments case like staging, preview, and production. If we declare directly to index.html file we can't change value conditionally every build.
Describe the solution you'd like
How about to build js file from rudderstack SDK then call the file under index.html.
Describe alternatives you've considered
Another approach to send from dart side or command line to js side like flutter base href.
The text was updated successfully, but these errors were encountered: