DOCS

Goals and events

A goal is an action you care about, such as a signup, a purchase or a contact form. You send it as a named event, and Varde counts how many visitors complete it and where they came from.

Send an event

Call varde() with a short name when the action is complete:

varde('signup')

Use lowercase names with underscores, like newsletter_signup or book_call. The same name always adds up to the same goal.

Add details (props)

You can attach up to 20 small properties. Keys are cut at 64 characters and values at 200. Never put personal data like email addresses or names in props.

varde('purchase', { props: { plan: 'pro', interval: 'year' } })

Run code after the event is sent

Useful when the action navigates away, like a form that redirects:

varde('signup', { callback: () => form.submit() })

Calls made before the script loads

The script loads with defer. If your code might call varde() before that, add this one-line queue above the script tag. Queued calls are sent as soon as the script loads.

<script>window.varde=window.varde||function(){(varde.q=varde.q||[]).push(arguments)}</script>

Automatic events

Add data-auto-events to the script tag to count common clicks without writing code:

<script defer data-site="YOUR_SITE_ID" data-auto-events src="https://vardeanalytics.com/js/script.js"></script>
EventSent when someone clicksProps
outboundA link to another websiteurl
downloadA link to a file (pdf, zip, csv, docx, mp4 and other common types) or a link with a download attributeurl
emailA mailto: linkurl
phoneA tel: linkurl

Show a goal on the dashboard

Events are recorded as soon as you send them. To see one as a goal, open Goals → Add goal and enter the same event name. The dashboard then shows conversions, conversion rate and which sources and pages drive it. Goals are on the Pro plan; see pricing.