Exemplo n.º 1
0
 def test_screen(self):
     analytics.screen('userId')
     analytics.flush()
Exemplo 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))
Exemplo n.º 3
0
 def test_screen(self):
     analytics.screen('userId')
     analytics.flush()
Exemplo n.º 4
0
 def test_screen(self):
     analytics.screen('distinct_id')
     analytics.flush()
Exemplo 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:
Exemplo 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))