function prepareRequest(request) {
        request.app_key = Countly.app_key;
        request.device_id = Countly.device_id;
        request.sdk_name = SDK_NAME;
        request.sdk_version = SDK_VERSION;
        if(Countly.check_consent("location")){
            if(Countly.country_code){
                request.country_code = Countly.country_code;
            }
            if(Countly.city){
                request.city = Countly.city;
            }
            if(Countly.ip_address !== null){
                request.ip_address = Countly.ip_address;
            }
        }
        else{
            request.location = "";
        }
            
        request.timestamp = getMsTimestamp();
        var date = new Date();
        request.hour = date.getHours();
        request.dow = date.getDay();
    }
function prepareRequest(request) {
        request.app_key = Countly.app_key;
        request.device_id = Countly.device_id;
        request.sdk_name = SDK_NAME;
        request.sdk_version = SDK_VERSION;
        if(Countly.check_consent("location")){
            if(Countly.country_code){
                request.country_code = Countly.country_code;
            }
            if(Countly.city){
                request.city = Countly.city;
            }
            if(Countly.ip_address !== null){
                request.ip_address = Countly.ip_address;
            }
        }
        else{
            request.location = "";
        }
            
        request.timestamp = getMsTimestamp();
        var date = new Date();
        request.hour = date.getHours();
        request.dow = date.getDay();
    }
function prepareRequest ( request ) { request . app_key = Countly . app_key ; request . device_id = Countly . device_id ; request . sdk_name = SDK_NAME ; request . sdk_version = SDK_VERSION ; if ( Countly . check_consent ( "location" ) ) { if ( Countly . country_code ) { request . country_code = Countly . country_code ; } if ( Countly . city ) { request . city = Countly . city ; } if ( Countly . ip_address !== null ) { request . ip_address = Countly . ip_address ; } } else { request . location = "" ; } request . timestamp = getMsTimestamp ( ) ; var date = new Date ( ) ; request . hour = date . getHours ( ) ; request . dow = date . getDay ( ) ; }
prepare request by adding basic info to it
prepare request by adding basic info to it