function checkAnalyticsDataSend(event, Eventparams, forceSend) {
        var result         = new $.Deferred(),
            isHDTracking   = prefs.get("healthDataTracking"),
            isEventDataAlreadySent;

        if (isHDTracking) {
            isEventDataAlreadySent = HealthLogger.analyticsEventMap.get(Eventparams.eventName);
            HealthLogger.analyticsEventMap.set(Eventparams.eventName, true);
            if (!isEventDataAlreadySent || forceSend) {
                sendAnalyticsDataToServer(Eventparams)
                    .done(function () {
                        HealthLogger.analyticsEventMap.set(Eventparams.eventName, true);
                        result.resolve();
                    }).fail(function () {
                        HealthLogger.analyticsEventMap.set(Eventparams.eventName, false);
                        result.reject();
                    });
            } else {
                result.reject();
            }
        } else {
            result.reject();
        }

        return result.promise();
    }
Check if the Analytic Data is to be sent to the server.
If the user has enabled tracking, Analytic Data will be sent once per session
Send Analytic Data to the server if the Data associated with the given Event is not yet sent in this session.
We are sending the data as soon as the user triggers the event.
The data will be sent to the server only after the notification dialog
for opt-out/in is closed.
@param{Object} event event object
@param{Object} Eventparams Object Containg Data to be sent to Server
@param{boolean} forceSend Flag for sending analytics data for testing purpose