# 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

# Enhanced Ecommerce
Tracker.alias(str, 'pa')  # Product action
Tracker.alias(str, 'tcc')  # Coupon code
Tracker.alias(compat_unicode, 'pal')  # Product action list
Tracker.alias(int, 'cos')  # Checkout step
Tracker.alias(str, 'col')  # Checkout step option

Tracker.alias(str, 'promoa')  # Promotion action

for product_index in range(1, MAX_EC_PRODUCTS):
    Tracker.alias(str, 'pr{0}id'.format(product_index))  # Product SKU
    Tracker.alias(compat_unicode, 'pr{0}nm'.format(product_index))  # Product name
    Tracker.alias(compat_unicode, 'pr{0}br'.format(product_index))  # Product brand
    Tracker.alias(compat_unicode, 'pr{0}ca'.format(product_index))  # Product category
    Tracker.alias(compat_unicode, 'pr{0}va'.format(product_index))  # Product variant
    Tracker.alias(str, 'pr{0}pr'.format(product_index))  # Product price
    Tracker.alias(int, 'pr{0}qt'.format(product_index))  # Product quantity
    Tracker.alias(str, 'pr{0}cc'.format(product_index))  # Product coupon code
    Tracker.alias(int, 'pr{0}ps'.format(product_index))  # Product position

    for custom_index in range(MAX_CUSTOM_DEFINITIONS):
        Tracker.alias(str, 'pr{0}cd{1}'.format(product_index, custom_index))  # Product custom dimension
        Tracker.alias(int, 'pr{0}cm{1}'.format(product_index, custom_index))  # Product custom metric

    for list_index in range(1, MAX_EC_LISTS):
        Tracker.alias(str, 'il{0}pi{1}id'.format(list_index, product_index))  # Product impression SKU
        Tracker.alias(compat_unicode, 'il{0}pi{1}nm'.format(list_index, product_index))  # Product impression name
        Tracker.alias(compat_unicode, 'il{0}pi{1}br'.format(list_index, product_index))  # Product impression brand
        Tracker.alias(compat_unicode, 'il{0}pi{1}ca'.format(list_index, product_index))  # Product impression category

# 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


# Enhanced Ecommerce
Tracker.alias(str, 'pa')  # Product action
Tracker.alias(str, 'tcc')  # Coupon code
Tracker.alias(compat_unicode, 'pal')  # Product action list
Tracker.alias(int, 'cos')  # Checkout step
Tracker.alias(str, 'col')  # Checkout step option

Tracker.alias(str, 'promoa')  # Promotion action

for product_index in range(1, MAX_EC_PRODUCTS):
    Tracker.alias(str, 'pr{0}id'.format(product_index))  # Product SKU
    Tracker.alias(compat_unicode, 'pr{0}nm'.format(product_index))  # Product name
    Tracker.alias(compat_unicode, 'pr{0}br'.format(product_index))  # Product brand
    Tracker.alias(compat_unicode, 'pr{0}ca'.format(product_index))  # Product category
    Tracker.alias(compat_unicode, 'pr{0}va'.format(product_index))  # Product variant
    Tracker.alias(str, 'pr{0}pr'.format(product_index))  # Product price
    Tracker.alias(int, 'pr{0}qt'.format(product_index))  # Product quantity
    Tracker.alias(str, 'pr{0}cc'.format(product_index))  # Product coupon code
    Tracker.alias(int, 'pr{0}ps'.format(product_index))  # Product position

    for custom_index in range(MAX_CUSTOM_DEFINITIONS):
        Tracker.alias(str, 'pr{0}cd{1}'.format(product_index, custom_index))  # Product custom dimension
        Tracker.alias(int, 'pr{0}cm{1}'.format(product_index, custom_index))  # Product custom metric

    for list_index in range(1, MAX_EC_LISTS):
        Tracker.alias(str, 'il{0}pi{1}id'.format(list_index, product_index))  # Product impression SKU
        Tracker.alias(compat_unicode, 'il{0}pi{1}nm'.format(list_index, product_index))  # Product impression name
        Tracker.alias(compat_unicode, 'il{0}pi{1}br'.format(list_index, product_index))  # Product impression brand
        Tracker.alias(compat_unicode, 'il{0}pi{1}ca'.format(list_index, product_index))  # Product impression category

        Tracker.alias(compat_unicode, 'il{0}pi{1}va'.format(list_index, product_index))  # Product impression variant