Tracks the distribution of your installable products. The plugin provides an ajax API to accept installation registrations & usage data. Also provides a mechanism for pushing product upgrades to clients. Custom build tags can also be used to track clients with customized products and push custom upgrades to these clients.
Plugin REST API
http://www.yoursite.com/wp-admin/admin-ajax.php
Actions:
regupdate - Adds\Updates a registration record
useapp - Updates product\version usage and registered client use
upgrade - Checks for a product upgrade with a higher version number
Note: Product and Registration records are automatically added\updated via inbound API calls. Only Upgrades are added via the Admin console.
Example (.Net API call to register a client)
Registration
var response =
HttpHelper.Post(URL, new NameValueCollection() {
{ "action", "regupdate" },
{ "sky", SecretKey }, //Secret ID must match ID in your Wordpress|Settings|InstallTracker
{ "product", Product },
{ "ver", Version },
{ "custom", Custom },
{ "trackid", RegID }, //TrackID from previous registration to allow updates, blank for new
{ "key", key }, //GUID generated by your installation (Format: 00000000-0000-0000-0000-000000000000 )
{ "name", name },
{ "email", email },
{ "phone", phone },
{ "contact", contact },
{ "addr", address },
{ "city", city },
{ "state", state },
{ "zipcode", zipcode}
});
var str = System.Text.Encoding.Default.GetString(response);
if (str != null && str.Equals("0")) return false; //Secret key might not match
var outObject = JsonConvert.DeserializeObject(str);
if (outObject.valid == "TRUE")
{
RegID = outObject.regID; //Returned Registration ID for future updates
return true;
}
Usage
var pars = new NameValueCollection() {
{ "action", "useapp" },
{ "sky", SecretKey },
{ "product", Product },
{ "ver", Version },
{ "custom", Custom },
{ "trackid", RegID }, //TrackID from previous registration (optional)
{ "key", key } //GUID generated by your installation (optional)
};
Upgrade
var pars = new NameValueCollection() {
{ "action", "upgrade" },
{ "sky", SecretKey },
{ "product", Product },
{ "ver", Version },
{ "custom", Custom },
};
.Net API wrapper client library is available at
www.kyght.com (
http://www.kyght.com/?page_id=147).
Other client libraries will be available later on GitHub (
https://github.com/kyght/InstallTracker).
.Net client dll Usage
installTrack = new Tracker(\"
http://www.yoursite.com/wp-admin/admin-ajax.php\", \"YourProduct\", \"2.1.16.80\", \"666745\");
* installTrack.Register(String key, String name, String email, String contact, String phone, String address, String city, String state, String zipcode)
* installTrack.Usage(String key, OnTrackerComplete onComplete )
* installTrack.UpgradeAvailable(OnUpgradeAvailable onUpgrade)
* installTrack.Download(String fileurl, String filename, System.ComponentModel.AsyncCompletedEventHandler onComplete, DownloadProgressChangedEventHandler onProgress)