Skip to content

WordPress proxy

The PureMetrix WordPress proxy runs the tracking script and visit data through your own domain, so ad blockers that block known analytics servers are less likely to drop visits.

What you configure

Template reference: adapters/proxy/WordPress plugin.

Finish the plugin setup wizard (Connect → Go live) first. Then open Settings → PureMetrix and enable Same-origin proxy. The plugin serves /px/js and /px/event without editing server configs.

Allowlist /px in security plugins after enabling.

Snippet shape

<script defer data-domain="example.com" data-key="YOUR_PUBLIC_KEY"
  src="https://www.example.com/px/js/script.js"></script>

With the WordPress plugin connected, the tracker is injected for you—you do not paste this snippet by hand. The shape above is what the proxy serves. After enabling proxy, pageviews should appear under app.puremetrix.org.

Troubleshooting

  • 403/404 on /px: a firewall blocks the path or the rewrite is missing.
  • Events are sent but no stats appear: reconnect in the wizard, or check that the domain matches under Settings → PureMetrix and in Site settings in the PureMetrix app.
  • IP address or location wrong: make sure X-Forwarded-For is passed on exactly once.

Related