# Path: resources/lib/compat.py



    from urllib.request import urlopen, build_opener, install_opener, Request, HTTPSHandler, URLError, HTTPError
    from urllib2 import urlopen, build_opener, install_opener, Request, HTTPSHandler, URLError, HTTPError
    from urllib.parse import urlencode
    from urllib import urlencode
from resources.lib.compat import itername, compat_unicode, compat_basestring
import random
import datetime
import time
import uuid
import hashlib
import socket
        self.params[ 'cid' ] = client_id

        self.hash_client_id = hash_client_id

        if user_id is not None:
            self.params[ 'uid' ] = user_id


    def set_timestamp(self, data):
        """ Interpret time-related options, apply queue-time parameter as needed """
        if 'hittime' in data: # an absolute timestamp
            data['qt'] = self.hittime(timestamp = data.pop('hittime', None))
        if 'hitage' in data: # a relative age (in seconds)
            data['qt'] = self.hittime(age = data.pop('hitage', None))


    def send(self, hittype, *args, **data):
        """ Transmit HTTP requests to Google Analytics using the measurement protocol """

        if hittype not in self.valid_hittypes:
            raise KeyError('Unsupported Universal Analytics Hit Type: {0}'.format(repr(hittype)))

        self.set_timestamp(data)
        self.consume_options(data, hittype, args)

        for item in args: # process dictionary-object arguments of transcient data
            if isinstance(item, dict):
                for key, val in self.payload(item):
                    data[ key ] = val


# Path: resources/lib/compat.py



# Path: resources/lib/UniversalAnalytics/Tracker.py
    from urllib.request import urlopen, build_opener, install_opener, Request, HTTPSHandler, URLError, HTTPError
    from urllib2 import urlopen, build_opener, install_opener, Request, HTTPSHandler, URLError, HTTPError
    from urllib.parse import urlencode
    from urllib import urlencode
from resources.lib.compat import itername, compat_unicode, compat_basestring
import random
import datetime
import time
import uuid
import hashlib
import socket

        self.params[ 'cid' ] = client_id

        self.hash_client_id = hash_client_id

        if user_id is not None:
            self.params[ 'uid' ] = user_id


    def set_timestamp(self, data):
        """ Interpret time-related options, apply queue-time parameter as needed """
        if 'hittime' in data: # an absolute timestamp
            data['qt'] = self.hittime(timestamp = data.pop('hittime', None))
        if 'hitage' in data: # a relative age (in seconds)
            data['qt'] = self.hittime(age = data.pop('hitage', None))


    def send(self, hittype, *args, **data):
        """ Transmit HTTP requests to Google Analytics using the measurement protocol """

        if hittype not in self.valid_hittypes:
            raise KeyError('Unsupported Universal Analytics Hit Type: {0}'.format(repr(hittype)))

        self.set_timestamp(data)
        self.consume_options(data, hittype, args)

        for item in args: # process dictionary-object arguments of transcient data
            if isinstance(item, dict):
                for key, val in self.payload(item):
                    data[ key ] = val


        for k, v in getattr(self.params, itername)(): # update only absent parameters