class PostHog::FieldParser
def parse_for_alias(fields)
In addition to the common fields, alias accepts:
def parse_for_alias(fields) common = parse_common_fields(fields) distinct_id = common[:distinct_id] # must both be set and move to properties alias_field = fields[:alias] check_presence! alias_field, 'alias' common.merge( { type: 'alias', event: '$create_alias', distinct_id: distinct_id, properties: { distinct_id: distinct_id, alias: alias_field }.merge( common[:properties] || {} ) } ) end