|
|
@ -29,6 +29,8 @@ def track_event(category=None, action=None, label=None):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if settings.analytics.visitor:
|
|
|
|
if settings.analytics.visitor:
|
|
|
|
visitor = pickle.loads(base64.b64decode(settings.analytics.visitor))
|
|
|
|
visitor = pickle.loads(base64.b64decode(settings.analytics.visitor))
|
|
|
|
|
|
|
|
if visitor.user_agent is None:
|
|
|
|
|
|
|
|
visitor.user_agent = os.environ.get("SZ_USER_AGENT")
|
|
|
|
if visitor.unique_id > int(0x7fffffff):
|
|
|
|
if visitor.unique_id > int(0x7fffffff):
|
|
|
|
visitor.unique_id = random.randint(0, 0x7fffffff)
|
|
|
|
visitor.unique_id = random.randint(0, 0x7fffffff)
|
|
|
|
except:
|
|
|
|
except:
|
|
|
|