1. A method of detecting keepalives being used by a mobile application on a mobile device, comprising:monitoring a plurality of data transfers over a network to and from the mobile application;
analyzing one or more characteristics of a data transfer to identify a pattern indicating that the data transfer may include a keepalive,
wherein the characteristics of the data transfer include the amount of time elapsed between the data transfer and a previous data transfer, and the pattern is identified based on a variance in the amount of time elapsed between the data transfer and previous data transfers being less than a threshold;
detecting a keepalive based on the identified pattern;
maintaining a record of the detected keepalives;
reporting the detected keepalives to a server; and
performing keepalive optimization based on the detected keepalives.