Esempio n. 1
0
 def test_screen(self):
     analytics.screen('userId')
     analytics.flush()
Esempio n. 2
0
def screen():
    analytics.screen(options.userId,
                     name=options.name,
                     anonymous_id=options.anonymousId,
                     properties=json_hash(options.properties),
                     context=json_hash(options.context))
Esempio n. 3
0
 def test_screen(self):
     analytics.screen('userId')
     analytics.flush()
Esempio n. 4
0
 def test_screen(self):
     analytics.screen('distinct_id')
     analytics.flush()
Esempio n. 5
0
    integrations = arguments["--integrations"]
    if integrations:
        integrations = json.loads(integrations)

    msgType = arguments["--type"]

    if msgType == "track":
        properties =  arguments["--properties"]
        if properties:
            properties = json.loads(properties)
        analytics.track(user_id = userId, anonymous_id=anonymousId, event = arguments["--event"], properties = properties, context = context, integrations = integrations)
    elif msgType == "screen":
        properties =  arguments["--properties"]
        if properties:
            properties = json.loads(properties)
        analytics.screen(user_id = userId, anonymous_id=anonymousId, name = arguments["--name"], properties = properties, context = context, integrations = integrations)
    elif msgType == "page":
        properties =  arguments["--properties"]
        if properties:
            properties = json.loads(properties)
        analytics.page(user_id = userId, anonymous_id=anonymousId, name = arguments["--name"], properties = properties, context = context, integrations = integrations)
    elif msgType == "alias":
        analytics.alias(user_id = userId, previousId=arguments["--previousId"])
    elif msgType == "group":
        traits =  arguments["--traits"]
        if traits:
            traits = json.loads(traits)
        analytics.group(user_id = userId, anonymous_id=anonymousId, group_id = arguments["--groupId"], traits = traits, context = context, integrations = integrations)
    elif msgType == "identify":
        traits =  arguments["--traits"]
        if traits:
Esempio n. 6
0
def screen():
    analytics.screen(options.userId, name = options.name, anonymous_id = options.anonymousId,
            properties = json_hash(options.properties), context = json_hash(options.context))