Beacon - Installation
Installing beacon.li
To get started with beacon.li and incorporate it into your project, you'll need to follow these simple steps for installation.
Prerequisites
Before you proceed, ensure that you have Node.js and npm (Node Package Manager) installed on your system. If you haven't already, you can download them from nodejs.org.
Installation
Once you have Node.js and npm set up, open your terminal or command prompt and execute the following command to install Beacon.li:
npm install @beacon.li/bar
OR
yarn add @beacon.li/bar
OR
If you want to use a <script> tag instead, you can use the below code snippet which will import and load the beacon bar directly without npm package.
<script>
(function(b,e,a,c,o,n) {b[c] = {orgId:n, open:()=>{b[c].opened=true}};
var s = e.createElement(a);
s.src='https://cdn.beacon.li/sdk/latest.js';s.async=true;s.type='module';
var d = e.createElement(o);
d.id='beacon-user';
e.body.appendChild(d);
e.head.appendChild(s);
})(window, document, 'script', 'BeaconBar', 'div','ORG_ID');
</script>
This code will fetch the latest version of beacon.li and add it as a dependency to your project.
That's it! You're now ready to start using beacon.li in your project. If you encounter any issues during installation or have questions about how to use beacon.li, refer to our comprehensive documentation or reach out to our [email protected] for assistance.
Please note that you may need to refer to the below two steps as well, for robust integration and a better experience to your users.
Native Routing in BeaconImplementing Content Security Policy (CSP) for Beacon IntegrationLast updated