Autotrack
Autotrack is the easiest way to get started tracking events with EnaLog. With autotrack you can start tracking page views, button clicks, and link clicks by adding the following script to the end of your HTML file right before the closing body
tag
<!-- EnaLog Autotrack -->
<script
defer
src="https://static.enalog.app/autotrack.min.js"
data-name="enalog"
data-enalog-token="<enalog-api-token-goes-here>"
data-enalog-project="<enalog-project-name-goes-here>"
></script>
<!-- End EnaLog Autotrack -->
You will need to add your EnaLog API token which you can obtain from the EnaLog organisation page to the data-enalog-token
attribute and add your project name which you created in EnaLog in slug format (e.g. landing-page) to the data-enalog-project
attribute.
Autotrack will automatically send events from localhost which will count towards your monthly event allowance. To prevent this you may want to wrap the script above in a production only if statement so that it is only loaded in production.