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
- REST API – filters not working inside plugin class
- jQuery function didn’t work in my plugin
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Escape when echoed
- Scope for PHP Variables Assigned in functions.php or a plugin
- Plugin exceeds memory limit
- Write to / remove from default .htaccess file from plugin?
- Update Option Error: Notice: Undefined index
- Plugin Development sqlite or WordPress’ database
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- How to generate video out of images via WordPress plugin
- How can I get WordPress to save comments in markdown format?
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- Open Post Thumbnail in New Child Theme File in WordPress
- Where should I save an API key of my user when installing my plugin?
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Redirecting to home page after login as custom role WordPress
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- Self deactivate plugins after an action occurs
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- WP Post Template – Templates in own folder
- Avoid class name collision when using third party libraries in plugins?
- wordpress plugin is not activating from widget
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- Redirection of users away from wp-admin (but not administrators)
- Using a custom plugin to capture input data via Ajax and PHP
- code is working properly in Core PHP but writing coding in WordPress
- 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 modify WCMP 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
- How to output CMB2 select options from repeated groups select elements?
- Access WordPress data from external PHP application.
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- What are the specifics of WordPress development I need to know? [closed]
- Ajax call returning 0
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- WP All Import – Execute Imports
- 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?
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- WordPress get_avatar function not correct working
- Redirect to another page using contact form 7? [closed]
- Setup wp_schedule_event within a custom plugin
- Create a plugin from within WordPress
- Class variables not correct on page
- can’t unzip file
- 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]
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- save_post_product action not firing
- Conditional delete metadata does not works
- How to get the custom field value using SQL query
- Unexpected add action function in WP plugin
- How to create admin setting for this small plugin
- Allow a particular user to access a particular plugin?
- admin_notices show after load completed
- Prevent WordPress from sending set-cookie http header
- Cookie value changes back to previous value after changing
- Change plugin descriptions
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- How use wp_insert_post and add og:custom tags?
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- The Build menu theme is frozen with the wordpress theme
- Problem with checked box on wp car manager plugin
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- How can I translate something in my class constructor of my plugin in WordPress?
- Define global variable in theme file and call that variable in plugin file
- Why is my shortcode not working?
- WordPress rewrite rule depend on meta values not ids
- Rename a folder via HTML POST request
- How to change “Read More” text?
- How to translate to spanish wordpress hardcoded content/files?
- Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin
- update_post_meta is not working for me when I use e.preventDefault for update button
- How can I see $post object in frontend from functions.php?
- Move plugin pages from dashboard to front-end
- working code, not working – Plugin Dev
- SimpleXML is not working with xml response from external api
- How to use Datatable with Ajax when creating plugin on WordPress?
- Getting all woocommerce products from REST API call in plugin