---
title: analyticsTargetsDelete - GraphQL Admin
description: >-
  Deletes one or more [analytics
  targets](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget).

  Accepts a list of target IDs and returns the IDs that were successfully
  deleted. If any ID

  is not found, a user error is returned for that ID while the remaining valid
  targets are still deleted.


  Use
  [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetCreate)

  to create new targets, or

  [`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetUpdate)

  to modify existing ones.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetsDelete
  md: >-
    https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetsDelete.md
api_name: admin
api_type: graphql
type: mutation
---

# analytics​Targets​Delete

mutation

Requires `write_reports` access scope.

Deletes one or more [analytics targets](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget). Accepts a list of target IDs and returns the IDs that were successfully deleted. If any ID is not found, a user error is returned for that ID while the remaining valid targets are still deleted.

Use [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetCreate) to create new targets, or [`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetUpdate) to modify existing ones.

## Arguments

* ids

  [\[ID!\]!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

  required

  The IDs of the analytics targets to delete.

***

## Analytics​Targets​Delete​Payload returns

* deleted​Ids

  [\[ID!\]](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

  The IDs of the deleted analytics targets.

* user​Errors

  [\[Analytics​Targets​Delete​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTargetsDeleteUserError)

  non-null

  The list of errors that occurred from executing the mutation.

***

## Examples

* ### analyticsTargetsDelete reference
