Tracking WooCommerce events
If you would like to capture data for events like purchases, add to cart, checkouts, etc, you can do so using our events feature. Here’s how:Adding event code to your site
- Install and activate the Code Snippets WordPress plugin (if you don’t already have it)
- In your WordPress admin, go to Snippets → Add New
- Select the Functions (PHP) tab, then paste in any or all of the examples below
- Click Save changes and activate.
- Test your setup by completing a test order. On the thank you page, check your Fathom dashboard to confirm the event fired with the correct value.
Replace the sample event names in the code examples with names that make sense for you