A one line script to set up Google Analytics and Segment tracking for all events on your website. Setup is a single copy & paste.
First make sure you've installed either Google Analytics or Segment on your site's <head>
tag. See:
- Google Analytics Install Instructions
- Segment Install Instructions - only follow step 1, Discern will do the rest.
Once you've installed either Google Analytics or Segment on your site's <head>
tag, then:
Paste the following lines below the Google Analytics / Segment tag and above the closing </head>
tag on the webpage where you wish to track events.
Note that you would have to place it on every page you want to track (same as with Google Analytics / Segment).
<script src="https://cdn.jsdelivr.net/gh/urimerhav/discern-js/js/discern.js"></script>
<script>const discern = new Discern();</script>
That's it! All important events will now be automatically tracked and sent to your analytics solution. Note this may take up to 24 hours while Discern analyzes user behavior to determine what events are important enough to track.
Important events on your website will be tracked with meaningful names. Still, if you want to edit the event names, or disable some of them, you may do so at the discern dashboard