Quickstart
Follow these instructions to quickly implement a Datopus web tracker with default configuration.
Getting started with sending events using the JavaScript tracker is very similar to other web analytics vendors like Google Analytics, Adobe Analytics, etc.
The process involves the following high level steps:
Adding the code snippet
Add the code snippet below to your site, to all the pages you’d like to track.
Place the code snippet directly into your codebase. Typically this will be wrapped with <script>
and placed into the <head>
element of your page or in a similar suitable location if using a Single Page Application framework.
Configuring a tracker
Configure an instance of the tracker by calling newTracker
with your desired properties.
where ‘www.tracked_domain.com
’ is your domain name.
Tip for B2B: instead of hardcoding a domain name, obtain it from a browser variable window.location.hostname
.
Using the tracker
Tracker allows to track events automatically and manually. For auto-tracking it’s enough to just add [data-ds-feature=name]
attribute to a HTML element representing a single feature.
Explore these articles to find more about auto-tracking and manual-tracking.