Although you might have already managed to solve the problem you faced, here’s few thoughts.
You could use register_activation_hook(), register_deactivation_hook() and register_uninstall_hook() functions to trigger a wp_remote_post() call to your (custom) API endpoint to count the times when your plugin is activated, deactivated or deleted.
If the recieving site, where you keep track of the different counts, happens also to be a WordPress site, then you can find information about adding custom end point from the developers handbook, https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/
As a note on privacy, you might also inform the plugin users that your plugin is doing something like this.
Related Posts:
- wp_remote_get() returns 403 while file_get_contents() does not
- Can’t access 3rd party API, code works on local server but not on wordpress
- Accessing Correct Database to Create REST API Endpoint
- What are the differences between WPINC and ABSPATH?
- Using require_once in a Plugin?
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Scope for PHP Variables Assigned in functions.php or a plugin
- Plugin Development sqlite or WordPress’ database
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- Where should I save an API key of my user when installing my plugin?
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- WP Post Template – Templates in own folder
- wordpress plugin is not activating from widget
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- wp_get_post_terms is difference obj model than the one in rest api response
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Image upload and download from front-end
- Access WordPress data from external PHP application.
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- What are the specifics of WordPress development I need to know? [closed]
- How to replace WordPress Media Upload Window with user’s device window?
- Conditional attributes and logic per product category
- how to do login using woocommerce rest api From android
- How to create a custom post type that contains another custom post type?
- Setup wp_schedule_event within a custom plugin
- Issue running db create table query from static method
- execute function after one completed
- How to make multiple admin pages for one plugin?
- Include a php file from another plugin
- WordPress REST API Plugin Development – Add Custom Endpoint
- Integrating boxtal PHP library into a custom WordPress Plugin
- Save user total active time after login in wordpress [closed]
- Switch from wp-cron to a server cron job
- Why is it important to check for isset and is_array before checking in_array in this example?
- How to add/change (woocommerce) product tab icon
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- I want to generate the pdf and save it in library?
- Calling a save function from a “submit” button
- Wp Debug Enabled True Notices and Warning
- How to call external functions from a PHP script in a WordPress plugin?
- How to write to a separate PHP file in plugin settings
- Create “new pages” within the admin section of plugin
- More gentle way to hook WordPress custom url
- How to display results from a data table with an encrypted user id?
- How to add custom function to pluggable.php
- How to displaying Custom image, text and default image logo from Redux Framework option panel
- Seperate plugin and theme files
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- How to Add text value in Automatically in this conditions?
- Checkbox show / hide output result
- wc_get_template_part doesnt display the content [duplicate]
- save_post_product action not firing
- How to get the custom field value using SQL query
- Unexpected add action function in WP plugin
- admin_notices show after load completed
- Prevent WordPress from sending set-cookie http header
- How use wp_insert_post and add og:custom tags?
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- WordPress rewrite rule depend on meta values not ids
- How to change “Read More” text?
- How can I see $post object in frontend from functions.php?
- Move plugin pages from dashboard to front-end
- is it possible to fetch data from a remote api while admin is writing a new post?
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- Using id to show item
- 500 Internal server error wp_handle_upload_prefilter
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- Generate and send ICS file through WordPress
- Is admin section completely customizable in terms of styling?
- WordPress Admin sub-level menu issue
- Change pricing in Woocommerce based on Category and Product [closed]
- Passing ajax variable to more than one wordpress plugin function
- WordPress environment not loading properly
- WordPress not displaying information on post sent from custom admin form
- Displaying friend’s posts only
- Creating a user ‘add custom field’ section
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Saving an array to get_options
- Doing action based on input from options menu
- Help me with my first very basic plugin
- How use Dynamic hyperlink on each wordpress post?
- My wordpress website admin panel loads very slow, what can i do about that? [closed]
- How to create post comparison in wordpress
- What can I do to customize a widget provided with this plugin? from where have I to start?
- How to add custom html to the Media > Attachment Details modal?
- Displaying Category Feature image on loop
- Is it possible to create post in wordpress using postman?
- How to override plugin function in code snippets WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress
- Use inline callable for hooks and filters