October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Track Button Clicks Without Cookies: Three Practical Setups

Measure button clicks with named events in Plausible or Matomo without analytics cookies—and understand why cookie-free tracking may still require privacy and consent review.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can measure button clicks without analytics cookies by sending a named event to an analytics tool configured not to use those cookies. Plausible offers a low-code CSS-class method and a JavaScript method; Matomo supports event tracking alongside a disableCookies() setting. Cookie-free tracking is still tracking, so disabling cookies alone does not settle whether consent is required.

Choose how the click should be recorded

Start by deciding what you need to learn: a total count of clicks, a comparison between button placements, or a record of an action already known to your server. Give the event a stable, descriptive name, such as Button Click, and use only the details needed to answer that question.

As an Amazon Associate I earn from qualifying purchases.

Approach Setup Useful when
Plausible CSS class Add a documented class to the button and create a matching custom event goal. You want a low-code way to count a button interaction.
Plausible JavaScript Call the event function, optionally with a small set of properties. You need conditional or dynamic event behavior.
Matomo JavaScript Disable analytics cookies and send a named event through the tracker. You use Matomo and want its event and privacy controls.
Plausible Events API Send the event from a server that already knows the action occurred. The server-side action is the reliable place to record the event.

These are implementation choices, not a universal ranking: the right fit depends on how your site is built, what reporting you need, and how you configure data collection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Track a button with Plausible

Use a CSS class for a straightforward click

Plausible documents a class-based method for marking an element as an event. Add the class to the button:

<button class="plausible-event-name=Button+Click">Sign up</button>

The plus sign represents a space, so the event name is Button Click. Then create a custom event goal with that same name in the site’s Plausible settings. Sending an event does not, by itself, create a goal metric in the dashboard. Check the rendered button if a site builder modifies or normalizes class names. See Plausible’s custom event goal documentation.

Use JavaScript when behavior is conditional

For a click that depends on application logic, call Plausible’s event function when the relevant action occurs:

plausible('Button Click')

You can add a broad placement property to distinguish otherwise identical buttons:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
plausible('Button Click', { props: { placement: 'header' } })

As with the class method, configure a matching custom event goal to report the event as a goal. Keep properties useful and non-identifying; a placement such as header can answer where clicks happen, while a visitor’s name, email address, or form contents do not belong in an event name or property. See Plausible’s event setup guide and its custom event properties guidance.

Track an event in Matomo without analytics cookies

Matomo documents disabling cookies before page tracking and supports event tracking for clicks. A simplified tracker sequence is:

_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['trackEvent', 'Button', 'Click', 'Sign up']);

Here, Button is the event category, Click is the action, and Sign up is the label. Choose consistent values that help interpret reports, and test that the event appears in the Matomo reporting view you use. Matomo explains that disabling cookies does not stop JavaScript tracking: its cookieless configuration guide covers the setting, while its event-tracking guide describes event reports.

When server-side event delivery makes sense

If your server already records the action—for example, a successful server-handled signup—you can consider sending the event through Plausible’s Events API. This can be a better fit than relying on a browser click when the action only counts after server-side confirmation. It is not automatically privacy-exempt: consider what data is sent and retained. Plausible’s documentation identifies the User-Agent and X-Forwarded-For headers as important to unique visitor counting, so header handling affects how those counts work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep cookie settings separate from consent settings

“No cookies” does not mean “no tracking.” Matomo’s disableCookies() option disables its analytics cookies, but JavaScript tracking can continue and send data. Matomo documents separate consent controls: requireConsent prevents tracking requests and cookie use until consent, while requireCookieConsent allows tracking requests but withholds cookies until cookie consent. Those controls address different behaviors; choose based on the site’s obligations and intended collection. See Matomo’s tracking consent documentation.

Cookie-free operation is not a blanket consent exemption. Matomo’s guidance says the rules that apply can depend on jurisdiction and whether personal data is processed; its consent FAQ discusses that distinction. The European Data Protection Board’s 2021 statement describes audience-measurement derogations as limited: they concern low-level analytics needed to analyze the requested service and provide statistics to its operator, without singling out or profiling users. Check the rules that apply to your visitors and implementation rather than treating cookie settings as a legal determination. Read the EDPB statement.

Verify the implementation before relying on the numbers

  1. Define the event. Pick a name that describes the action, and decide whether you need a placement property or another minimal, non-identifying detail.
  2. Configure the reporting destination. In Plausible, create the custom event goal with the exact event name; in Matomo, choose consistent event category, action, and label values.
  3. Apply the intended privacy settings. Confirm the analytics-cookie and consent behavior you want; do not assume that disabling cookies prevents tracking requests.
  4. Trigger a test click. Check that the event reaches the analytics report and that it is attributed to the expected event or goal.
  5. Check the collected fields. Ensure event names and properties contain no personal details, and review server-side headers and retained data if using an Events API.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.