Installation
We support two different ways to install OneRoute Embed on your website. The first is a standard installation and will work for most websites. The second is for a single-page app.
First, you need to ensure that you are on a Business plan to use this.
Standard Installation
If you have a web app with multiple pages where each one triggers a new page refresh then you will most likely need the basic JavaScript method. This means you will not need to create separate actions that trigger when the Embed will appear. The page refresh itself is enough to trigger the action. To set up the basic JavaScript, you will only need to follow these steps.
How to Install
To get the Embed to appear on your web app, you need to set the element you want it to show within.
Then, copy and paste the snippet below before the </body>
tag.
You can find your API_KEY and FIRM_ID on your OneRoute Dashboard > Settings > Account Settings > API Keys & Webhooks.
Single Page App
If you have a single-page app, then you can get OneRoute Embed installed on your page. So let's waste no time and get you chatting with your customers.
How to Install
To get the Embed to appear on your web app, you need to set the element on the page/component you want it to show within.
Then, copy and paste the snippet below into the page on-mount function (useEffect, componentDidMount, ngAfterViewInit, mounted, etc).
You can find your API_KEY and FIRM_ID on your OneRoute Dashboard > Settings > Account Settings > API Keys & Webhooks.
This is an example of how it'll look after a successful installation.
Last updated