PHPackages                             bitapps/wp-telemetry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bitapps/wp-telemetry

ActiveLibrary

bitapps/wp-telemetry
====================

A simple telemetry library for WordPress.

v0.0.9(1y ago)25.6k↓30.9%3GPL-2.0-or-laterPHPPHP &gt;=5.6

Since Mar 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Bit-Apps-Pro/wp-telemetry)[ Packagist](https://packagist.org/packages/bitapps/wp-telemetry)[ Docs](https://bitapps.pro)[ RSS](/packages/bitapps-wp-telemetry/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

WP Telemetry
============

[](#wp-telemetry)

This package provides a simple way to add telemetry tracking to your WordPress plugin. It sends weekly reports to your server with information about the plugin's usage.

Usage
-----

[](#usage)

### 1. Installation

[](#1-installation)

Install the package using composer:

```
composer require bitapps/wp-telemetry

```

### 2. Create a Telemetry Client

[](#2-create-a-telemetry-client)

Initialize the telemetry client in your plugin's bootstrap file.

```
function initialize_telemetry_client()
{
  TelemetryConfig::setTitle($title);
  TelemetryConfig::setSlug($plugin_slug);
  TelemetryConfig::setPrefix($plugin_prefix);
  TelemetryConfig::setVersion($plugin_version);

  TelemetryConfig::setServerBaseUrl( 'https://api.example.com/' );
  TelemetryConfig::setTermsUrl( 'https://example.com/terms/' ); // (optional)
  TelemetryConfig::setPolicyUrl( 'https://example.com/privacy/' ); // (optional)

  Telemetry::report()->init(); // initialize telemetry tracking
  Telemetry::feedback()->init(); // initialize deactivation feedback survey
}

initialize_telemetry_client();

```

**You are good to go! 👍️**

The telemetry client will start sending data `weekly` to your configured server url.

Configuration
-------------

[](#configuration)

### \# Activate/Deactivate Telemetry Tracking

[](#-activatedeactivate-telemetry-tracking)

You can add a setting in your plugin settings page to allow users to opt-in or opt-out of telemetry tracking. You can use the following methods to change the opt-in/opt-out status.

**⚡️ Opt In :**

```
Telemetry::report()->trackingOptIn();

```

**⚡️ Opt Out :**

```
Telemetry::report()->trackingOptOut();

```

**⚡️ Check if tracking is enabled**

```
Telemetry::report()->isTrackingAllowed();

```

### \# Tracking Report Modify

[](#-tracking-report-modify)

**⚡️ Filter Hook to Add Additional Data :**

This filter allows adding additional data to track information used by the plugin. You can modify the `additional_data` array to include any custom data needed.

```
add_filter($plugin_prefix . 'telemetry_additional_data', 'customize_additional_data', 10, 1);

function customize_additional_data($additional_data)
{
  // Do your stuffs here
  return $additional_data;
}

```

**⚡️ Filter Hook To Modify Telemetry Data :**

This filter allows modifying the telemetry data before sending it to the server. You can modify the `$telemetry_data` array to include any custom data needed.

```
add_filter($plugin_prefix . 'telemetry_data', 'customize_telemetry_data', 10, 1);

function customize_telemetry_data($telemetry_data)
{
  // Do your stuffs here
  return $telemetry_data;
}

```

**⚡️ Add plugin information in tracking data**

```
Telemetry::report()
                ->addPluginData()
                ->init();

```

### \# Deactivation Feedback Survey

[](#-deactivation-feedback-survey)

**⚡️ Filter Hook to Add Deactivate Reasons :**

This filter allows adding additional deactivate reasons to the feedback survey. You can modify the `deactivate_reasons` array to include any custom reasons needed.

```

add_filter($plugin_prefix . 'deactivate_reasons', 'add_deactivate_reasons', 10, 1);

function add_deactivate_reasons($deactivate_reasons)
{
  // example of adding a custom deactivate reason
  $deactivate_reasons[] = [
    'title' => 'What could we have done to improve your experience?',
    'placeholder' => 'Please provide your feedback here',
  ];

  return $deactivate_reasons;
}

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 89.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~38 days

Total

9

Last Release

587d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/287eaff46162d59243dbe681021af1569719ed94209acf697993cfdd018cf2fe?d=identicon)[Bit-Apps-Pro](/maintainers/Bit-Apps-Pro)

---

Top Contributors

[![shuvomohajan](https://avatars.githubusercontent.com/u/34658843?v=4)](https://github.com/shuvomohajan "shuvomohajan (25 commits)")[![jishat](https://avatars.githubusercontent.com/u/48252409?v=4)](https://github.com/jishat "jishat (2 commits)")[![shimulckbt](https://avatars.githubusercontent.com/u/75900067?v=4)](https://github.com/shimulckbt "shimulckbt (1 commits)")

---

Tags

wordpresswptelemetry

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/bitapps-wp-telemetry/health.svg)

```
[![Health](https://phpackages.com/badges/bitapps-wp-telemetry/health.svg)](https://phpackages.com/packages/bitapps-wp-telemetry)
```

###  Alternatives

[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)[balbuf/composer-wp

Manage WordPress core, plugins, and themes with composer.

173.6k](/packages/balbuf-composer-wp)[typisttech/wp-admin-notices

A simplified OOP implementation of the WordPress admin notices

141.2k](/packages/typisttech-wp-admin-notices)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
