import base64


def get_tracking_id(cycle_id, target_id):
    """
    Get url to embed into template.

    Base64 encodes cycle id with the target id.
    """
    data = f"{cycle_id}_{target_id}"
    urlsafe_bytes = base64.urlsafe_b64encode(data.encode("utf-8"))
    return str(urlsafe_bytes, "utf-8")