---
title: analyticsTargetUpdate - GraphQL Admin
description: >-
  Updates an existing [analytics
  target](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget).

  Only the fields provided in the `input` argument are modified; omitted fields
  remain unchanged.

  Setting a nullable field to `null` clears its value.


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

  to create a new target, or

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

  to remove targets.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetUpdate
  md: >-
    https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetUpdate.md
api_name: admin
api_type: graphql
type: mutation
---

# analytics​Target​Update

mutation

Requires `write_reports` access scope.

Updates an existing [analytics target](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget). Only the fields provided in the `input` argument are modified; omitted fields remain unchanged. Setting a nullable field to `null` clears its value.

Use [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetCreate) to create a new target, or [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetsDelete) to remove targets.

## Arguments

* id

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

  required

  The ID of the analytics target to update.

* input

  [Analytics​Target​Update​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/AnalyticsTargetUpdateInput)

  required

  The input fields for updating an [analytics target](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget).

***

## Analytics​Target​Update​Payload returns

* analytics​Target

  [Analytics​Target](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget)

  The updated [analytics target](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget).

* user​Errors

  [\[Analytics​Target​Update​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTargetUpdateUserError)

  non-null

  The list of errors that occurred from executing the mutation.

***

## Examples

* ### analyticsTargetUpdate reference
