Skip to content

Events / collect API

How pageviews and custom events get to PureMetrix: from the snippet in the browser, or over HTTP from your server. This API only sends data in — it does not read stats.

Browser

  • Default: the script loads after the page and sends data to https://collect.puremetrix.org (or to your /px proxy).
  • Your own events: puremetrix('event_name'), for example for goals.

HTTP

Server-side integrations (for example WooCommerce purchases) send a POST request to the collect event endpoint, together with your site’s public key. To read totals, use the Stats API (Business and Enterprise).

Related