示例#1
0
def delete_account_user_link(account_id, account_user_link_id):
    """Deletes the user link for the account."""
    client = AnalyticsAdminServiceClient()
    client.delete_user_link(
        DeleteUserLinkRequest(
            name=f"accounts/{account_id}/userLinks/{account_user_link_id}"))
    print("User link deleted")
def delete_property_user_link(property_id, property_user_link_id):
    """Deletes the user link from the Google Analytics 4 property."""
    client = AnalyticsAdminServiceClient()
    client.delete_user_link(
        DeleteUserLinkRequest(
            name=f"properties/{property_id}/userLinks/{property_user_link_id}")
    )
    print("User link deleted")