def get_useful_tags(xlsform):
    """Return the ODK tags from 'survey' to retrieve the value for.

    This function compares each ODK 'name' to a pre-approved list and keeps
    that name if there is a match.

    Args:
        xlsform (pmix.Xlsform): An xlsform (workbook) object

    Returns:
        A list of ODK tags to track in analytics.
    """
    useful_tags = (
        "your_name",
        "name_typed",
        "level1",
        "level2",
        "level3",
        "level4",
        "EA",
        "structure",
        "household",
        "level1_unlinked",
        "level2_unlinked",
        "level3_unlinked",
        "level4_unlinked",
        "EA_unlinked",
        "facility_type",
        "deviceid",
        "start",
        "end",
        "HHQ_result",
        "FRS_result",
        "SDP_result",
    )
    odk_name = set(str(c) for c in xlsform["survey"].column("name"))
    keepers = [t for t in useful_tags if t in odk_name]
    return keepers