How do I track button clicks, sign-ups or purchases (custom events)?
Updated
Pick the easiest option for you:
1. Automatic (WordPress plugin)
In WordPress go to Linkdasher Analytics → Event tracking and tick what to track: outbound links, file downloads, email/phone clicks, form submissions, site search, 404 pages, WooCommerce (add to cart, checkout, purchase with order value) and Contact Form 7.
2. A CSS class — no code
Add the class ld-event-signup to any button or link (in WordPress: block → Advanced → Additional CSS class). Each click is recorded as the event signup. Add ld-value-10 to attach a value.
3. Shortcode (WordPress)
[linkdasher_event name="newsletter"]Subscribe[/linkdasher_event], or [linkdasher_event name="thank_you" trigger="view"] on a thank-you page.
4. JavaScript
linkdasher('track', 'signup', { value: 10 });
See results under Site Analytics → Events. Event names can use letters, numbers, - and _.