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

  defines a merchant's goal for a specific metric over a date range. For
  example, a merchant

  can set a target of $50,000 in total sales for a quarter, or 1,000 orders in a
  month.


  Provide the target attributes through the `input` argument. The target's
  currency is set to

  the shop's currency. A target is uniquely identified by the combination of
  `metric`, `startDate`,

  `endDate`, and `filters` — attempting to create a duplicate returns a user
  error.


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

  to modify an existing 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/analyticsTargetCreate
  md: >-
    https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetCreate.md
api_name: admin
api_type: graphql
type: mutation
---

# analytics​Target​Create

mutation

Requires `write_reports` access scope.

Creates an [analytics target](https://shopify.dev/docs/api/admin-graphql/latest/objects/AnalyticsTarget) that defines a merchant's goal for a specific metric over a date range. For example, a merchant can set a target of $50,000 in total sales for a quarter, or 1,000 orders in a month.

Provide the target attributes through the `input` argument. The target's currency is set to the shop's currency. A target is uniquely identified by the combination of `metric`, `startDate`, `endDate`, and `filters` — attempting to create a duplicate returns a user error.

Use [`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetUpdate) to modify an existing target, or [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/analyticsTargetsDelete) to remove targets.

## Arguments

* input

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

  required

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

***

## Analytics​Target​Create​Payload returns

* analytics​Target

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

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

* user​Errors

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

  non-null

  The list of errors that occurred from executing the mutation.

***

## Examples

* ### analyticsTargetCreate reference
