Skip to main content
object

Requires Requires read_analytics_annotations or write_analytics_annotations access scope.

An annotation for a notable event on a shop's analytics timeline.

•DateTime

The date and time when the annotation was created.

•App

The app that created the annotation. Returns null if the annotation wasn't created by an app.

•String

A plain-text description that provides additional context about the annotation. The maximum length is 150 characters for app-created annotations.

•DateTime

The date and time when the annotation ended. Returns null if the annotation is open-ended.

•ID!
non-null

A globally-unique ID.

•AnalyticsAnnotationSource!
non-null

Identifies who or what created this annotation.

•DateTime!
non-null

The date and time when the annotation started.

•String

The title of the annotation. The maximum length is 75 characters for app-created annotations.

•String!
non-null

The type of event represented by the annotation. Refer to the list of supported types.

•DateTime

The date and time when the annotation was last updated.


Was this section helpful?

•mutation

Creates an analytics annotation on the shop. Annotations are notable events that can be overlaid on analytics charts to provide context for changes in metrics. The annotation is attributed to the app that calls the mutation.

Shopify limits how many annotations an app can have for a shop. If the app reaches this limit, then the mutation returns a LIMIT_REACHED error. Delete existing annotations or contact Shopify Support to request a higher limit.

Use analyticsAnnotationUpdate to modify existing annotations or analyticsAnnotationDelete to remove them.

The type field must specify a supported type for app-created annotations. Refer to the list of supported types.

Arguments

•AnalyticsAnnotationCreateInput!
required

The input fields for creating an analytics annotation.


•mutation

Updates an existing analytics annotation. Only the fields provided in the input argument are modified; omitted fields remain unchanged. Setting endedAt to null makes the annotation open-ended.

An app can update only annotations that it created. If an app attempts to update an annotation that it didn't create, then the mutation returns a NOT_FOUND error.

Use analyticsAnnotationCreate to create a new annotation, or analyticsAnnotationDelete to remove it.

If provided, the type field must specify a supported type for app-created annotations. Refer to the list of supported types.

Arguments

•ID!
required

The ID of the analytics annotation to update.

•AnalyticsAnnotationUpdateInput!
required

The input fields for updating the analytics annotation.



Was this section helpful?

•interface

Was this section helpful?