def _get_user_id(data):
    """
    Get user ID which this event is generated by.
    Event payload schema highly depends on event type.

    :param data: event payload
    :type data: dict

    :rtype: non empty string or None
    """
    for key in ['user', 'user_id']:
        user = data.get(key)
        if user:
            return user
    return None