Notifal tracks clicks on built-in action buttons automatically. For custom HTML in templates, add the class notifal-track-click to any clickable element you want in analytics.
Full button guide: HTML Builder: Buttons, Close Icon, and Click Tracking.
The class to add
<a href="/sale" class="notifal-track-click">View sale</a>
or
<button type="button" class="notifal-track-click">Spin the wheel</button>
Notifal counts clicks on:
- Elements with
notifal-track-click - Standard links inside the notification
- Native
<button>elements - Elements with
role="button"
Plain text or unmarked custom HTML is not tracked unless you add the class.
Action buttons already tracked
Block Editor, Elementor, and notifal-action-button in HTML Builder get notifal-track-click automatically. You do not need to add it twice.
What gets recorded
Each tracked click stores:
- Notification ID
- Timestamp
- Link URL (when applicable)
- Button metadata (label, action type, tracking ID) for Per-Button Click Analytics (Pro)
Clicks also feed conversion attribution when the visitor later orders. See Order Attribution in WooCommerce.
Custom HTML examples
Secondary text link:
<p>Not ready? <a href="/faq" class="notifal-track-click">Read FAQ</a></p>
Custom styled CTA div:
<div class="my-cta notifal-track-click" role="button" tabindex="0">Claim offer</div>
Use role="button" and keyboard focus for accessibility when the element is not a real <button> or <a>.
What is not tracked by default
- Close icons (tracked as close events via
notifal-close-button) - Clicks outside the notification on the main page
- Elements without the class in pure custom HTML (e.g. a roulette widget unless marked)
Verify tracking
- Publish the notification
- Click your custom button on the front end
- Open On-Page Analytics and refresh
- With Pro, open per-button breakdown to see the click
In this topic
- On-Page Analytics Dashboard
- Understanding Metrics (CTR, Conversions, Revenue)
- Enhanced Analytics (Pro)
- Per-Button Click Analytics (Pro)
- Order Attribution in WooCommerce
- Click Tracking on Custom Buttons (you are here)
- Attribution Window and Conversion Settings