Dashboard

WordPress Plugin

sentriq-security is a real, installable WordPress plugin — a thin layer over sentriq/sentriq-php and the Browser SDK, never duplicating either. Configured entirely from wp-admin — no code required for the default setup.

Install

Upload the built plugin ZIP under Plugins → Add New → Upload Plugin, or install from source with Composer for local development:

composer require sentriq/wordpress

Configure

Activate Sentriq Security, then go to Settings → Sentriq and enter your public and secret keys. The Browser SDK is then injected automatically on every page — no template edits needed.

Prefer keeping credentials out of the database entirely? Define them as constants in wp-config.php instead — the settings page shows them as read-only when a constant is present:

define( 'SENTRIQ_PUBLIC_KEY', 'pub_test_...' );
define( 'SENTRIQ_SECRET_KEY', 'sec_test_...' );
define( 'SENTRIQ_WEBHOOK_SECRET', 'whsec_...' );

What gets tracked automatically

Once configured, the plugin tracks these events with no additional code:

  • page_view on every front-end page load
  • login / login_failed / logout on WordPress's own auth hooks
  • signup on new user registration
  • payment on WooCommerce order payment completion (if WooCommerce is active) — order data itself is never read or sent

A logged-in visitor is associated with a stable, non-PII account reference (wordpress:{site_id}:{user_id}) — never their email or display name.

No server-side event ingestion
POST /v1/events is public-key-only, so this plugin never submits an event from PHP. Every event above is submitted by the real Browser SDK running in the visitor's own browser — the same public-key path any other integration on the site already uses. A WordPress hook only ever queues a one-shot signal that influences which event fires on the very next page load.

Consent mode

Three modes, set on the settings page: Always on (default), Require consent, and Disabled. Under Require consent, the Browser SDK does not load until your site calls:

window.sentriqConsent.grant();

Call this from your own cookie-consent banner once a visitor actually consents. This is this plugin's own gate — the Browser SDK has no built-in consent primitive.

Webhook verification

Registers POST /wp-json/sentriq/v1/webhook, which delegates entirely to sentriq/sentriq-php's own signature verification — see Webhooks. Responds 401 on an invalid or stale signature, 400 if headers are missing, 503 if no webhook secret is configured (fails closed).

Diagnostics

The settings page includes a diagnostics table (plugin/PHP SDK/ WordPress versions, key configuration status, WooCommerce status) and a "Check API connectivity" button that verifies your secret key against the real Sentriq API without exposing any raw error detail.

Version compatibility

WordPress >= 6.5 (uses the native Script Modules API to load the Browser SDK). PHP ^8.2. WooCommerce integration is optional and activates automatically if WooCommerce is active.