Jetpack::do_server_side_stat PHP Method

do_server_side_stat() static public method

Runs stats code for a one-off, server-side.
static public do_server_side_stat ( $args ) : boolean
$args array|string The arguments to append to the URL. Should include `x_jetpack-{$group}={$stats}` or whatever we want to store.
return boolean If it worked.
    static function do_server_side_stat($args)
    {
        $response = wp_remote_get(esc_url_raw(self::build_stats_url($args)));
        if (is_wp_error($response)) {
            return false;
        }
        if (200 !== wp_remote_retrieve_response_code($response)) {
            return false;
        }
        return true;
    }
Jetpack