Skip to main content

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 the beacon.js file.
  • Once the beacon is installed, it will start based on your configuration and will collect users, sessions, page views, and events through use trackers and tags.
  • 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

ExampleDescriptionIdentityTrackers
Out Of The BoxStart here for the easiest and most privacy conscious option.noPii (default), which means there is no user or session identificationpage (uses page tracker by default if empty)
With TrackersUsing inline tracker, but with added optionssessionpage, click, form
With User IdentityUsing inline tracker, but with added optionsuserpage, click, form
With User And Session IdentityUsing inline tracker, but with added optionsuser & sessionpage, click, form
With Custom EventsBuilds on the previous example by providing markup that enhances page and click trackersuser & sessionpage, 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

ExampleDescriptionIdentityTrackers
With TrackersA simple installation with selected trackers.noPii (default), which means there is no user or session identificationpage, click, form
Custom TagsAn illustration of how to use tags to create a similar experience to trackersnoPii (default), which means there is no user or session identificationnone