API version: unstable
API version: 2021-07 Release candidate
API version: 2021-04 Latest
API version: 2021-01
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

ScriptTag object

Version unstable

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • cache (Boolean!)

    Whether the Shopify CDN can cache and serve the script tag. If true, then the script will be cached and served by the CDN. The cache expires 15 minutes after the script tag is successfully returned. If false, then the script will be served as is.

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2021-07 (Release candidate)

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • cache (Boolean!)

    Whether the Shopify CDN can cache and serve the script tag. If true, then the script will be cached and served by the CDN. The cache expires 15 minutes after the script tag is successfully returned. If false, then the script will be served as is.

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2021-04 (Latest)

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • cache (Boolean!)

    Whether the Shopify CDN can cache and serve the script tag. If true, then the script will be cached and served by the CDN. The cache expires 15 minutes after the script tag is successfully returned. If false, then the script will be served as is.

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2021-01

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2020-10

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2020-07

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2020-04 (Unsupported)

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2020-01 (Unsupported)

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2019-10 (Unsupported)

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2019-07 (Unsupported)

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Version 2019-04 (Unsupported)

A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout.

Required access

read_script_tags access scope.

Fields

  • createdAt (DateTime!)

    The date and time when the script tag was created.

  • displayScope (ScriptTagDisplayScope!)

    The page or pages on the online store that the script should be included.

  • id (ID!)

    Globally unique identifier.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • src (URL!)

    The URL to the remote script.

  • updatedAt (DateTime!)

    The date and time when the script tag was last updated.

Types that return ScriptTag

Mutations for ScriptTag

Implements

Samples