Examples
This section contains interactive examples demonstrating how Beacon can be installed or configured in various scenarios.
Each of these examples illustrate:
- Adding the beacon to a web page through
installation, which allows you to adjust configuration** into thebeacon.jsfile. - Once the beacon is installed, it will start based on your configuration and will collect users, sessions, page views, and events through use
trackersandtags. - As events are collected, they currently are logged to the browser, but you could extend to send it to the transporting API of choice.
Inline Installation
These examples show you the simplest way to install the beacon. You just need to add a simple script tag on your page
| Example | Description | Identity | Trackers |
|---|---|---|---|
| Out Of The Box | Start here for the easiest and most privacy conscious option. | noPii (default), which means there is no user or session identification | page (uses page tracker by default if empty) |
| With Trackers | Using inline tracker, but with added options | session | page, click, form |
| With User Identity | Using inline tracker, but with added options | user | page, click, form |
| With User And Session Identity | Using inline tracker, but with added options | user & session | page, click, form |
| With Custom Events | Builds on the previous example by providing markup that enhances page and click trackers | user & session | page, click, form |
Snippet Installation
These examples allow you to further configure the beacon with more detailed options, which uses a more complex but still easy to use configuration
| Example | Description | Identity | Trackers |
|---|---|---|---|
| With Trackers | A simple installation with selected trackers. | noPii (default), which means there is no user or session identification | page, click, form |
| Custom Tags | An illustration of how to use tags to create a similar experience to trackers | noPii (default), which means there is no user or session identification | none |