Start free

Custom events and conversion rates

Count sign-ups, button clicks or anything else with qs('Signup') or a data-qs-event attribute.

Events & revenueFeature page: Custom events and conversion rates
Custom events and conversion rates: example screenshotCustom events and conversion rates: example screenshot
Example screenshot with made-up data, not a real customer’s numbers.

What it does

Events with visitors, counts and conversion rate on your dashboard, with an optional property such as the plan name.

Why it matters

Pageviews can’t see a form being sent or a video being played. Events can.

How to use it

  1. Swap /js/script.js for /js/events.js (it counts pageviews too).
  2. Call qs('Signup') in your code, or add data-qs-event="Signup" to a link or button.
  3. Add data-qs-prop for one short property, such as the plan.
  4. Make the event a goal in 🎯 Goals to see its conversion rate.
HTML
<script data-host="https://quietstats.co.uk" data-dnt="true"  src="https://quietstats.co.uk/js/events.js" id="YOUR_SITE_ID" async defer></script>
<button data-qs-event="Signup" data-qs-prop="pricing">Start free</button>

Replace YOUR_SITE_ID with the ID shown on your site’s Manage page.

How it works

How a custom event is recorded1. Your page loads /js/events.js instead of /js/script.js (it sends pageviews too). 2. Your code calls qs('Signup'), or someone clicks an element with data-qs-event="Signup". 3. events.js sends the event name, one optional property and the page address. 4. The collector trims the name (60 characters) and property (100). (otherwise: Looks like an email or phone/card number: dropped) 5. One row with the name, property, page and the daily visitor code. 6. Shown on the Events card, and usable as an event goal and a funnel step.1Your page loads /js/events.jsinstead of /js/script.js (itsends pageviews too).2Your code calls qs('Signup'),or someone clicks an elementwith data-qs-event="Signup".3events.js sends the eventname, one optional propertyand the page address.4The collector trims the name(60 characters) and property(100).Looks like anemail orphone/cardnumber: dropped5One row with the name,property, page and the dailyvisitor code.6Shown on the Events card, andusable as an event goal and afunnel step.
Event rows are kept apart from pageviews, so events never change your visitor or pageview counts.

Privacy

Limits

Plans

Every plan, including Free. quietstats is free during launch: the Free plan covers 1 site and 5,000 pageviews a month, and no card is needed. See pricing.

Questions

Do I lose anything by switching scripts?

No. events.js does everything script.js does, plus events. It is 2,344 bytes uncompressed; script.js is about 476 bytes to download (845 bytes uncompressed).

Related