# 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
    def alias(cls, typemap, base, *names):
        """ Declare an alternate (humane) name for a measurement protocol parameter """
        cls.parameter_alias[ base ] = (typemap, base)
        for i in names:
            cls.parameter_alias[ i ] = (typemap, base)

    @classmethod
    def coerceParameter(cls, name, value = None):
        if isinstance(name, compat_basestring) and name[0] == '&':
            return name[1:], str(value)
        elif name in cls.parameter_alias:
            typecast, param_name = cls.parameter_alias.get(name)
            return param_name, typecast(value)
        else:
            raise KeyError('Parameter "{0}" is not recognized'.format(name))


    def payload(self, data):
        for key, value in getattr(data, itername)():
            try:
                yield self.coerceParameter(key, value)
            except KeyError:
                continue



    option_sequence = {
        'pageview': [ (compat_basestring, 'dp') ],
        'event': [ (compat_basestring, 'ec'), (compat_basestring, 'ea'), (compat_basestring, 'el'), (int, 'ev') ],
        'social': [ (compat_basestring, 'sn'), (compat_basestring, 'sa'), (compat_basestring, 'st') ],

# 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

    def alias(cls, typemap, base, *names):
        """ Declare an alternate (humane) name for a measurement protocol parameter """
        cls.parameter_alias[ base ] = (typemap, base)
        for i in names:
            cls.parameter_alias[ i ] = (typemap, base)

    @classmethod
    def coerceParameter(cls, name, value = None):
        if isinstance(name, compat_basestring) and name[0] == '&':
            return name[1:], str(value)
        elif name in cls.parameter_alias:
            typecast, param_name = cls.parameter_alias.get(name)
            return param_name, typecast(value)
        else:
            raise KeyError('Parameter "{0}" is not recognized'.format(name))


    def payload(self, data):
        for key, value in getattr(data, itername)():
            try:
                yield self.coerceParameter(key, value)
            except KeyError:
                continue



    option_sequence = {
        'pageview': [ (compat_basestring, 'dp') ],
        'event': [ (compat_basestring, 'ec'), (compat_basestring, 'ea'), (compat_basestring, 'el'), (int, 'ev') ],
        'social': [ (compat_basestring, 'sn'), (compat_basestring, 'sa'), (compat_basestring, 'st') ],

        'timing': [ (compat_basestring, 'utc'), (compat_basestring, 'utv'), (compat_basestring, 'utt'), (compat_basestring, 'utl') ]