Skip to content

WordPress ​

A bundled plugin provides a [retentionplay] shortcode. The legacy [playflow] shortcode remains supported. Source: integrations/wordpress/playflow/.

Install ​

  1. Copy the playflow folder to wp-content/plugins/playflow/ (or zip and upload via the WP admin).
  2. Activate RetentionPlay Widget in WP Admin -> Plugins.
  3. Set Settings -> RetentionPlay -> API base URL (for example https://api.example.com).

Use the shortcode ​

text
[retentionplay project_id="proj_demo" session_token="{{ session_token }}"]
  • project_id (required) — your project tenant id.
  • session_token (optional) — a token issued from your backend via POST /v1/server/session-token for identified play (see the PHP/Python SDK pages), rendered fresh into the page on every load from your own template code — never a value pasted once into post/page content. It expires in about an hour, so a static copy in the shortcode goes stale quickly; omit it entirely for anonymous free-play.

Notes ​

  • Add your WordPress site origin to the project allowed_origins.
  • Switch the game by changing the active template in admin — no WP changes.
  • Never embed API keys or secrets in templates; only project_id and the public API base are safe client-side.

Version 0.3.0 creates unique containers when target is omitted. A supplied target must be a simple unique HTML id (optional leading #). API base allows HTTP(S) with a host, no credentials/query/fragment; invalid configuration renders no loader. Settings are sanitized through registered callbacks. Owner preview is in RetentionPlay admin. Minimal fixture checks and real browser embeds do not replace installation on your WordPress environment.

Internal & integration documentation