Skip to content
padams edited this page Dec 2, 2026 · 3 revisions
  1. Install and activate Open Web Analytics from Plugins > Add New.
  2. Go to OWA > Settings. A new install shows only the OWA Server Endpoint and Check.
  3. Enter your OWA server's URL (its OWA_PUBLIC_URL) and click Check. Check finds OWA at that URL and detects the version it runs, and that version's settings appear. The URL becomes the one OWA answers at, after any redirect, with a trailing /. Without https:// or http://, https is tried first, then http. If OWA is not found there, the page says so under the field.
  4. Enter the credentials:
    • 1.x: the API Key (OWA: Settings > Users > Edit) and the Secret Auth Key (OWA_AUTH_KEY in the server's owa-config.php).
    • 2.x: an Application Password (OWA: My Preferences > Application Passwords). A read-only password is enough.
  5. Save Changes appears once the credentials are entered. Save. The Observation Profile list appears once OWA accepts the credentials. If OWA refuses them, the page shows OWA's error instead.
  6. Select the Observation Profile to track and save again. The plugin stores its site ID. In 1.x the field is labeled Website ID.

The tag is added once Enable OWA is on and the endpoint and Observation Profile are saved. Notices at the top of the settings page list what is still missing.

Setup starts with the OWA server's URL and Check

Settings for OWA 2.x

With 2.x, Configure this Observation Profile's tracking tag in OWA opens the Observation Profile's tracker options on the OWA server.

How the version is detected

The plugin asks the OWA server for one of OWA 2.x's REST routes, without credentials. An answer only OWA 2.x gives means 2.x. Any other answer means 1.x. When the server does not answer at all (a network error, a timeout or a server error), the version found at that URL before is kept, and the page says the server did not answer.

The plugin checks:

  • when you click Check or Check again,
  • when a changed endpoint is saved,
  • once a day, when an administrator opens an admin page,
  • on the first admin page load after the plugin is updated.

When the version changes, the site's tag changes with it, and cached pages are purged (see Page Caches).

When the OWA server is upgraded from 1.x to 2.x

The next check finds 2.x. Tracking continues with the 2.x tag and the same site ID. If no application password is saved, the dashboard, the Plugins screen and OWA > Settings ask for one. The notice goes away when you save a password or dismiss it. The 1.x keys stay saved.

Requirements

  • WordPress 5.2+, PHP 8.2+.

  • OWA 1.14 or later.

  • The theme calls wp_head().

  • 2.x over http: application passwords are sent only over https. To use an http OWA server, turn off Application Passwords Need HTTPS on the server and add this to a must-use plugin or the theme:

    add_filter( 'owa_wp_sdk_config', fn( $config ) => [ 'allow_insecure_app_password' => true ] + $config );

Clone this wiki locally