> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# contextualTrackingDomainCreate

> Register `ctx.<domain>` as the store's Contextual tracking subdomain, as the Redo app's Contextual setup does. Works for a store the app offers Contextual to; if Contextual is off, this also turns it on and installs its tracking pixel, as the app does. Until the subdomain verifies, events go through Contextual's shared endpoint. The subdomain can't be changed afterwards. Returns it as PENDING with the DNS record to add; then call `contextualTrackingDomainVerify`, and Redo also rechecks on its own for a while. CAPABILITY_NOT_ENABLED (403) when the store isn't offered Contextual; BAD_USER_INPUT (400) for a domain that isn't plain: a leading `ctx.`, a port, a path, spaces or a trailing dot; CONFLICT (409) when the store already has a subdomain.

**Required scopes:** [`marketing_settings_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_settings_write)

## Arguments

**domain** `String!` *required*

The store's domain without `ctx.`, like `example.com`. No scheme, path or spaces.

## Returns

**contextualTrackingDomainCreate** `[ContextualTrackingDomain!](/docs/api-reference/v3/reference/marketing/contextual-tracking-domain)` *required*

The store's first-party tracking subdomain for Contextual, `ctx.` plus the store's domain, as the Redo app's Contextual setup shows it. Once registered it can't be changed.

**fields**

**dnsRecords** `[\[ContextualTrackingDomainDnsRecord!\]!](/docs/api-reference/v3/reference/marketing/contextual-tracking-domain-dns-record)` *required*

The records to add at the DNS provider. Redo doesn't report whether each one is published; `status` says whether Contextual verified the subdomain.

**fields**

**name** `String!` *required*

The full hostname to publish the record at, like `ctx.example.com`. Some DNS providers want only `ctx`.

**type** `[ContextualTrackingDomainDnsRecordType!](/docs/api-reference/v3/reference/marketing/contextual-tracking-domain-dns-record-type)` *required*

The record type.

**value** `String!` *required*

The hostname the record points to.

**domain** `String!` *required*

The subdomain, like `ctx.example.com`.

**status** `[ContextualTrackingDomainStatus!](/docs/api-reference/v3/reference/marketing/contextual-tracking-domain-status)` *required*

Whether the subdomain is verified.

## Example

```graphql theme={null}
mutation {
  contextualTrackingDomainCreate(domain: "...") {
    domain
    status
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.