# 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
###############################################################################
# Universal Analytics for Python
# Copyright (c) 2013, Analytics Pros
#
# This project is free software, distributed under the BSD license.
# Analytics Pros offers consulting and integration services if your firm needs
# assistance in strategy, implementation, or auditing existing work.
###############################################################################

try:
except ImportError:

try:
except ImportError:




def generate_uuid(basedata = None):
    """ Provides a _random_ UUID with no input, or a UUID4-format MD5 checksum of any input data provided """
    if basedata is None:
        return str(uuid.uuid4())

# 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

###############################################################################
# Universal Analytics for Python
# Copyright (c) 2013, Analytics Pros
#
# This project is free software, distributed under the BSD license.
# Analytics Pros offers consulting and integration services if your firm needs
# assistance in strategy, implementation, or auditing existing work.
###############################################################################

try:
except ImportError:

try:
except ImportError:




def generate_uuid(basedata = None):
    """ Provides a _random_ UUID with no input, or a UUID4-format MD5 checksum of any input data provided """
    if basedata is None:
        return str(uuid.uuid4())

    elif isinstance(basedata, compat_basestring):