PHP SDK

Plugie Insights PHP SDK

The library a WordPress plugin ships to report installation state, feature usage and lifecycle events to Plugie Insights — only after the site owner has opted in.

Package: plugie/insights-sdk · Namespace: Plugie\Insights · PHP 7.4+ · Licence GPL-2.0-or-later · Source: sdk/php/

Everything below is read from the SDK’s own source and its tests. Where the SDK refuses to do something, that refusal is a tested property, not a convention.

What it does, in one paragraph

You call Insights::init() once with your plugin id. The SDK registers its WordPress hooks, and from then on measures whatever you tell it to measure. Nothing leaves the site until you call consent()->grant() after the owner ticks your opt-in. Once granted, it registers the installation on first contact, sends one snapshot per collection interval (weekly by default; the server can change it to daily), and sends lifecycle events on activation, deactivation and uninstall. Every public method is wrapped so that an exception, a timeout or a malformed response is recorded in errors() and never surfaces in your plugin.