     
     internal func addAnalyticsMetadataToRequest() {
         
-        Logger.internalLogger.debug("Recording request analytics")
+        Analytics.logger.debug("Network request outbound")
         
         // The analytics server needs this ID to match each request with its corresponding response
         self.trackingId = NSUUID().UUIDString

    
    internal func logInboundResponse(response: Response, url: String) {
        
        let endTime = NSDate.timeIntervalSinceReferenceDate()
        let roundTripTime = endTime - startTime
        let bytesSent = self.requestBody?.length ?? 0
        
        var responseAnalytics: [String: AnyObject] = [:]
        responseAnalytics["$category"] = "network"
        responseAnalytics["$url"] = url
        responseAnalytics["$trackingId"] = self.trackingId
        responseAnalytics["$outboundTimestamp"] = startTime
        responseAnalytics["$inboundTimestamp"] = endTime
        responseAnalytics["$duration"] = roundTripTime
        responseAnalytics["$statusCode"] = response.statusCode
        responseAnalytics["$bytesSent"] = bytesSent
        
        if (response.responseText != nil && !response.responseText!.isEmpty) {
            responseAnalytics["$bytesReceived"] = response.responseText?.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)
        }
        Analytics.logger.analytics(responseAnalytics)
    }
    
    

            deviceId = device.identifierForVendor?.UUIDString as String
            model = device.modelName
        #endif
        
        // All of this data will go in a header for the request
        var requestMetadata: [String: String] = [:]
        
        requestMetadata["os"] = "ios"
        requestMetadata["brand"] = "Apple"
        requestMetadata["osVersion"] = osVersion
        requestMetadata["model"] = model
        requestMetadata["deviceID"] = deviceId
        requestMetadata["mfpAppName"] = "" // TODO: Get from Analytics or Logger initializer
        requestMetadata["appStoreLabel"] = NSBundle.mainBundle().infoDictionary?["CFBundleName"] as? String ?? ""
        requestMetadata["appStoreId"] = NSBundle.mainBundle().bundleIdentifier ?? ""
        requestMetadata["appVersionCode"] = NSBundle.mainBundle().objectForInfoDictionaryKey(kCFBundleVersionKey as String) as? String ?? ""
        requestMetadata["appVersionDisplay"] = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") as? String ?? ""

        do {
            let requestMetadataJson = try NSJSONSerialization.dataWithJSONObject(requestMetadata, options: [])
            let requestMetadataString = String(data: requestMetadataJson, encoding: NSUTF8StringEncoding)
            if requestMetadataString != nil {
                self.headers["x-mfp-analytics-metadata"] = requestMetadataString
            }
            Analytics.logger.analytics(requestMetadata)
        }
        catch let error {
            Analytics.logger.error("Failed to append analytics metadata to request. Error: \(error)")
