To integrate your Tally forms with Plausible Analytics you need a custom domain. Forms hosted on a custom domain have access to a code injection box in which you can paste the Plausible tracking code.
- Create a custom domain
- Find the code injection box (either on form or domain level).
- Find your Plausible Analytics tracking script code. It will look something like this (your exact code will be shown on the JavaScript snippet page)
- Paste the tracking script into the code injection box in Tally
<script defer data-domain="<yourdomain.com>" src="https://plausible.io/js/script.js"></script> <script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
This will automatically track form visits. If you would like to track form submissions, multi-page form views, you will need to use Plausible’s custom event goals.
Custom event goals
You can learn how to setup custom event goals with Plausible in their help center. What can you use custom events for?
Multi-page forms
If you want to track which page the respondent reached for drop-off analytics, for example.
<script> window.addEventListener('Tally.FormPageView', function (e) { // This is the form page which the respondent just viewed const page = e.detail.page; // Form page view event plausible('<my-event-name>', { props: { page } }); }); </script>
Form submissions
If you want to track when the respondent submitted the form.
<script> window.addEventListener('Tally.FormSubmitted', function (e) { // This is the form data const formData = e.detail; // Form submitted event plausible('<my-event-name>'); }); </script>