1. Manager task: Where to find your Userlane Snippet
You can copy your userlane Snippet from your Userlane Dashboard in the My Account - Snippet section. Copy your Snippet and send it to your engineers.
The Snippet is going to make Userlane visible for your end users. You can simply set all Chapters to private or switch Userlane off in the Userlane Dashboard to make sure that none of your users sees Userlane before the go-live.
2. Dev task: Implementing the basic snippet parts
The load function loads userlane in your application. The initialize command executes Userlane and is needed for the Userlane Assistant to appear.
// load Userlane
// identify your user (see Chapter 3. below)
// initialize Command
Make sure that the initialize command contains your account’s property ID that can be found in the Userlane Dashboard Snippet.
The initialize command executes Userlane. Therefore, all the commands you want to use additionally should be called before ‘init’.
3. Dev task: Pass additional user information in your Code Snippet.
We recommend you to pass the user ID in your snippet with the identify command so that userlane can save the status of a user anonymously.
// Pass the user ID without any Custom User Attributes
Additionally, you can pass Custom User Attributes within this command. This allows applying user-based segmentation in the Userlane Dashboard later. This article provides more info on how a Snippet with passed custom data attributes looks like.
// Pass a Custom User Attribute (data types: number, string, datetime, array, boolean)
Good to know
- You need to load and initialize Userlane to make it visible in your application. Any other commands are optional. However, we recommend passing the user ID in the identify command as well. If this command is not used Userlane will generate a random user ID and will save it in a cookie.
- If you pass any additional commands in the snippet, make sure they are called before the initialize command. The initialize command will confirm the passed user information. Therefore, with every reload, the passed user information refresh.
- Userlane Snippet: How to install & how to adjust it
- Userlane Snippet vs Broswer Extension: How to use it?
- How to segment your userlanes / chapters
- How to implement custom Attributes into your code
Do you need more info?
Contact us via our Intercom Chat or write us a message at email@example.com