Skip to content
Docs menu · WordPress plugin

Install — Web

Install the AnyReplay WordPress Plugin

Install the AnyReplay plugin for WordPress: paste the project key under Settings, mask form fields, wait for consent through the WP Consent API and skip admins.

The plugin adds the AnyReplay recorder to every front-end page of your site and gives you a settings screen instead of code. It prints the same script as the script tag, loaded asynchronously, and nothing at all until a valid project key is saved. The admin area is never recorded.

Install and connect

  1. Install the plugin

    In WordPress open Plugins → Add New, search for AnyReplay Session Replay, then install and activate it.

  2. Paste your project key

    Open Settings → AnyReplay, paste the key from your project's setup page in AnyReplay and save. A key in the wrong format is refused with a message, and the old value is kept.

  3. Visit your site

    Open the site in a private window and click through a few pages. The setup page in AnyReplay switches to Connected when the first events arrive.

What to enter

SettingValue
Project keyYOUR_PROJECT_KEY
Ingest URLhttps://in.anyreplay.com
Mask form fieldsOn (the default)

The other settings are Mask editors too, a sample rate from 0 to 1, a monthly session cap, and Skip administrators, which is on by default so your own visits do not fill the session list. Mask form fields is on by default; keep it on for a WooCommerce shop or any site with account forms, and turn it off only to see what visitors type; passwords, one-time codes and payment card fields are masked whatever you choose. See masking, sampling and session caps.

Turn on Wait for consent and the recorder starts with requireConsent: true. If a consent plugin that supports the WP Consent API is active, the plugin does the rest: recording starts once the visitor allows the statistics category and stops, with AnyReplay's stored ids removed, if they withdraw it. With another consent tool, call anyreplay('consent', true) from its "accepted" callback on every page load. See consent.

Hooks for developers

FilterWhat it changes
anyreplay_should_recordReturn false to skip recording on a page.
anyreplay_init_optionsThe options passed to init; any browser SDK option can be added.
anyreplay_require_consentWait for consent without the setting, for consent tools outside the WP Consent API.
anyreplay_consent_categoryThe WP Consent API category that allows recording; statistics by default.
anyreplay_cdn_urlWhere the recorder is loaded from, for a self-hosted install.

Caching and optimisation plugins

Plugins that delay, defer or combine JavaScript can hold the recorder back. If the setup page stays on waiting, exclude ar.min.js and the inline AnyReplay script from those features and clear the cache. If a security plugin sends a Content Security Policy, allow the AnyReplay hosts as in Content Security Policy.

Uninstalling

Deactivating the plugin stops recording at once. Deleting it from the Plugins screen also removes its settings. Recordings already sent stay in your AnyReplay project until its retention period ends or you delete them there.