This article describes how to implement Userlane for the self-hosting version.
You can download and self-host the Userlane executable file and all content. This allows you to run Userlane completely independent from an internet connection or from behind strict firewalls.
What you need to do as a Userlane Manager
1. Download the Self-Hosting-Package zip file and send it to your developers
Make sure that your set of Guides is ready for the go-live. Sign in to the Userlane Portal (https://family.userlane.com) and go to Settings > Setup. Under Download Userlane for self-hosting, click Download.
The zip file’s size is less than 10MB, which allows a quick download and easy forwarding e.g. via email. You can send it to your developers along with this article.
What you need to do as a developer
1. Unzip and save the zip file
The downloaded zip file contains only .css, .js, .json, .txt and .html files. How exactly the content looks like in detail depends on you and your environment.
Copy the unzipped contents to a location where they are accessible through getting requests. A typical location is the assets folder of the application itself.
2. Test that the files are accessible
Open the userlane.html that was included in the zip in your browser using an HTTP or HTTPS protocol (Note: do not use the “file” protocol that your browser might support). You should see a small page that also contains the snippet for the next step.
3. Get your snippet
If the snippet worked fine in the previous step, use the snippet that is provided by userlane.html. Otherwise, you can manually generate a snippet:
Copy the part of the URL from the beginning until before “userlane.html”.
In the example snippet below you see two URL-parts. Paste the copied URL into those two parts for the placeholder text 'example.com':
For both of those URL-parts and for the init command in the example code below, replace the example property id “31204” with your individual property id (five signs). You find your individual property id in the name of the zip file (e.g. “userlane-app-31204”).
<script>
(function(i,s,o,g,r,a,m){i['UserlaneCommandObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)};a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://example.com/userlane/31204/userlane.js','Userlane');
Userlane('init', 31204, {
enableHybrid: true,
hybridBaseUrl: 'https://example.com/userlane/31204/'
});
</script>
4. Implement the snippet
Place the snippet at the end of the body (just before the '</body>' tag) inside the HTML template of the application so that it is present on every page. It needs to be executed after every page reload. Test the implementation by opening the application. Verify if userlane.js is loaded correctly and if there are no failing XHR requests due to Userlane on the page in the browser’s developer tools. Access the Userlane Assistant by opening your application.
Good to know
This service is only available for customers with a Hybrid Hosting plan. Please get in contact with our account contact for further information.
Please be aware that not all analytics and process-tracking features are available with self-hosting due to the missing connection to the Userlane cloud.
Starting a Userlane via a link works differently with Userlane Self-Hosting. Please reach out to your Customer Success Manager if you’d like to know more.
Every time you apply changes to your property in the Portal or via the Editor (segmentation, new Userlanes, etc.), you will need to download the ZIP file again and implement it in your self-hosting setup.