Start free

How to use Email and phone links, middle-clicks and CSS-class events

An optional add-on that counts clicks on email and phone links, links opened with a middle-click, and events named in a CSS class, for site builders that only let you add classes.

Events & revenueFeature page: Auto-tracking v2: email and phone links, middle-clicks and CSS-class eventsFeature page: Outbound links and file downloads
Email and phone links, middle-clicks and CSS-class events: example screenshotEmail and phone links, middle-clicks and CSS-class events: example screenshot
Example screenshot with made-up data, not a real customer’s numbers.

What it does

autolinks.js sits next to your quietstats tag or goes in the one-file bundle. A click on a mailto: link counts as Email link and a tel: link as Phone link, without the address or number. A middle-click (open in a new tab) on an outbound link or a file download counts as Outbound link or File download, the clicks the events script cannot see. Any element with a class such as qs-event-Signup counts Signup when clicked, with an optional qs-prop-Value class for a label.

Why it matters

For many small businesses an email or a phone call is the conversion. And WordPress blocks, Webflow and Squarespace often let you add a CSS class but not a data attribute, so class-based events make no-code tracking possible.

How to use it

  1. Add the autolinks.js tag after your quietstats tag, or tick Email and phone links in the one-file bundle.
  2. Email link and Phone link events appear on the Events card after the first clicks.
  3. For a button you can only style, add class qs-event-Name (+ for spaces) and optionally qs-prop-Label.
  4. Turn any of them into a goal on the Goals card.

How it works

What autolinks.js counts1. A click on the page. 2. Element with data-qs-event? (otherwise: Yes: left to the events script.) 3. Class qs-event-Name: that event (with qs-prop-Label if set). 4. mailto: or tel: link: Email link or Phone link, without the address. 5. Middle-click on an outbound link or file: Outbound link (host) or File download (path).1A click on the page.2Element with data-qs-event?Yes: left to theevents script.3Class qs-event-Name: thatevent (with qs-prop-Label ifset).4mailto: or tel: link: Emaillink or Phone link, withoutthe address.5Middle-click on an outboundlink or file: Outbound link(host) or File download(path).
From src/tracker.autolinks.src.js (served as /js/autolinks.js). script.js is unchanged.

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 need the events script too?

No. autolinks.js sends its own events. Add events.js as well if you also want data-qs-event, goals from code or left-click outbound tracking.

Is the email address stored?

No. Only the words Email link or Phone link and the page are sent.

Why middle-clicks?

People often open links in a new tab with the middle button. Browsers do not report those as normal clicks, so they were missed before.

Set it up

Show the install snippet
HTML
<script data-host="https://quietstats.co.uk" data-site="YOUR_SITE_ID" data-dnt="true" src="https://quietstats.co.uk/js/autolinks.js" async defer></script>
<a class="wp-block-button__link qs-event-Book+a+table" href="/book">Book a table</a>

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

Related

Feature page: Auto-tracking v2: email and phone links, middle-clicks and CSS-class events → What it is, why it matters, privacy and how other tools do it.

Guides on this topic

All website analytics guides →

Related features

Browse all 448 features →

Explore quietstats

See your traffic (119)

Live visitors and live eventsTrend charts, headline cards and any date rangeCompare any two date rangesWorld map, countries and regionsDevices, browsers, operating systems and screens

Sources and campaigns (63)

Sources and channelsAI search referralsUTM campaignsSearch keywords from Google Search ConsoleShort links

Behaviour and content (80)

Top pagesPage transitionsScroll depth and engaged timeClick mapVisitor journeys

Goals, events and conversions (83)

Goals and funnelsCustom events and conversion ratesRevenue cards and revenue by sourceEngagement goalsA/B tests with your own tags and a plain-English confidence note

Reports, sharing and alerts (44)

Alerts inbox and rulesReport snapshotsPassword-protected snapshotsOptional public stats pageAnonymous benchmarks against similar sites

Data in and out (42)

CSV and Excel downloadsStats APIImport from Plausible or GA4API playgroundTSV and XML export for every report

Privacy and performance (17)

Zero cookies, privacy built inUnder 1 KB script and single-page appsPages never countedPrivacy proof page and badge for your siteSigned-in sessions

Why quietstats

Why quietstatsPricingLive demoStart free

Compare

quietstats comparedFeature comparisonvs Google Analyticsvs Plausiblevs Fathom Analyticsvs Simple Analyticsvs Umamivs Matomovs Cloudflare Web Analyticsvs GoatCountervs Piwik PROvs PostHogvs Microsoft Clarityvs Pirsch Analyticsvs MixpanelGoogle Analytics alternatives

Learn

Website analytics guidesMetrics handbookAnalytics glossaryPlaybooksGDPR and cookie-free analyticsInstall on SquarespaceInstall on WixInstall on GhostInstall on Google Tag ManagerBlog

Playbooks and tools

Script size calculatorCookie banner checkerPlaybook: Local businessPlaybook: Online shopPlaybook: Blog or publisherPlaybook: SaaS or appPlaybook: Charity or community groupPlaybook: Agency with clientsUTM link checkerConversion rate calculatorCookie banner traffic-loss calculator