Links
🏅

How to get started?

🧋 Bubble.io Plugin

We're not recommending calling any Natively 'Get Value' API in such events as "Page Is Loaded", "User is logged in" or any similar. Sometimes they can be called before Natively was injected into your website, and cause a value empty state.
First of all, you need to add a plugin to your bubble app. To do this, go to the Plugins tab and search for Natively:
Click Install:
If you are planning to use a Push Notifications feature in your app fill out onesignal_appId & onesignal_apiKey fields:
You can find these values on your OneSignal app page:

mode (headers) - Optional

Possible values:
  • "debug" - show errors in the console or display error alerts (For debugging purposes)
  • "preview" - To test the app in a Preview mode (For now, only Push Notifications feature requires this)
"preview" should be enabled only if you're testing the app in a Preview Mode; otherwise, Push Notifications will not work inside your app.

🛠 JavaScript SDK

Put the following code in your website header (between <head></head> tags)
1
<script async onload="nativelyOnLoad()" src="https://cdn.jsdelivr.net/npm/[email protected]/natively-frontend.min.js"></script>
You can specify an SDK version by replacing version number 2.0.0
To turn on Debug mode, please insert the following code after SDK import:
1
<script async onload="nativelyOnLoad()" src="https://cdn.jsdelivr.net/npm/[email protected]/natively-frontend.min.js"></script>
2
<script>
3
function nativelyOnLoad() {
4
window.natively.setDebug(true); // To see errors
5
}
6
</script>
Debug mode which enables native alerts with errors. It's can be very useful while you developing a website.