# RevCent MCP Guide: `GetTrackingDomain`

AI/MCP-focused guide for retrieving a RevCent Tracking Domain.

This document explains the `GetTrackingDomain` operation, with special emphasis on the fields required to complete Tracking Domain SSL and DNS setup: `a_records`, `ssl.status`, `ssl.cname_records`, and `dns.status`.

---

## Related Documentation

AI/MCP clients should also read these related files:

| Operation / Overview | Link | Why It Matters |
|---|---|---|
| Tracking Domain Overview | `https://revcent.com/documentation/markdown/mcp/operation/OverviewTrackingDomain.md` | Broad context for Tracking Domains, DNS tracking, Track.js, visitor attribution, URL parameter metadata, WooCommerce tracking, and reporting. |
| CreateTrackingDomain | `https://revcent.com/documentation/markdown/mcp/operation/CreateTrackingDomain.md` | Explains creating a Tracking Domain and receiving the original required A records. |
| EditTrackingDomain | `https://revcent.com/documentation/markdown/mcp/operation/EditTrackingDomain.md` | Explains editing name, description, URL Parameter Sets, and legacy URL parameters. |
| InitializeTrackingDomainSSL | `https://revcent.com/documentation/markdown/mcp/operation/InitializeTrackingDomainSSL.md` | Starts SSL setup after A records are added and returns required CNAME records. |
| InitializeTrackingDomainDNS | `https://revcent.com/documentation/markdown/mcp/operation/InitializeTrackingDomainDNS.md` | Completes DNS tracking setup after A records, CNAME records, and issued SSL are ready. |
| GetTrackingDomains | | Lists Tracking Domains when the specific Tracking Domain ID is unknown. |

---

## Operation Summary

Operation:

```text
GetTrackingDomain
```

Title:

```text
Get A Tracking Domain
```

Purpose:

```text
Retrieve the details of a specific Tracking Domain.
```

Use `GetTrackingDomain` to inspect a Tracking Domain's current configuration and setup status.

Most importantly, use it to retrieve or verify the fields needed for SSL and DNS setup:

```text
a_records
ssl.status
ssl.cname_records
dns.status
```

These fields tell the AI/MCP client what DNS records the user must add and which initialization step should happen next.

---

## Why This Operation Matters

A Tracking Domain is not ready immediately after creation.

A complete setup requires:

```text
CreateTrackingDomain
    ↓
Add A records to DNS
    ↓
InitializeTrackingDomainSSL
    ↓
Add CNAME records to DNS
    ↓
Wait until ssl.status = ISSUED
    ↓
InitializeTrackingDomainDNS
    ↓
Confirm dns.status = COMPLETE
```

`GetTrackingDomain` is the status and record-retrieval operation used throughout that setup process.

It answers questions such as:

- What A records should the user add?
- Has SSL been initialized?
- What CNAME records are required for SSL?
- Has SSL been issued?
- Is DNS setup waiting on SSL?
- Has DNS initialization started?
- Is the Tracking Domain DNS-ready?
- What root domain is associated with the Tracking Domain?
- What URL Parameter Sets or URL parameters are associated with the domain?

---

## Input Schema

`GetTrackingDomain` requires one field:

| Field | Type | Required | Description |
|---|---:|---:|---|
| `tracking_domain_id` | string | Yes | 20-character Tracking Domain ID. |

Example:

```json
{
  "tracking_domain_id": "TTTTTTTTTTTTTTTTTTTT"
}
```

---

## Output Schema Overview

The output can include:

| Field | Type | Purpose |
|---|---:|---|
| `api_call_id` | string | 20-character API call ID. |
| `api_call_unix` | integer | Unix timestamp when the API call was initiated. |
| `code` | integer | API response code. `1` indicates success. |
| `created_date_unix` | integer | Tracking Domain creation timestamp. |
| `updated_date_unix` | integer | Tracking Domain last updated timestamp. |
| `id` | string | 20-character Tracking Domain ID. |
| `name` | string | User-friendly Tracking Domain name. |
| `description` | string | Tracking Domain description. |
| `enabled` | boolean | Whether the Tracking Domain is currently enabled. |
| `domain` | string | Root domain associated with the Tracking Domain. Cannot be modified after creation. |
| `url_parameter_sets` | array[string] | Associated reusable URL Parameter Set IDs. |
| `url_parameters` | array[object] | Legacy/manual URL parameters saved directly on the Tracking Domain. |
| `a_records` | array[object] | A records required for DNS setup and SSL initialization. |
| `ssl` | object | SSL status and CNAME record information. |
| `dns` | object | DNS tracking status information. |

---

# Critical Fields for SSL and DNS Setup

The following fields are the most important for completing setup:

```text
a_records
ssl.status
ssl.cname_records
dns.status
```

AI/MCP should retrieve and interpret these fields before deciding the next setup step.

---

## `a_records`

`a_records` is an array of A records that must be added to the user's DNS provider.

These records are originally returned by `CreateTrackingDomain`, but they can be retrieved again at any time with `GetTrackingDomain`.

Purpose:

```text
A records are required to initialize SSL and route traffic for RevCent tracking endpoints.
```

Possible A record names include:

```text
rctrk
portal
rcacp
```

Each A record includes:

| Field | Meaning |
|---|---|
| `name` | DNS host/name, such as `rctrk`, `portal`, or `rcacp`. |
| `value` | DNS A record value/target returned by RevCent. |

Example shape:

```json
{
  "a_records": [
    {
      "name": "rctrk",
      "value": "000.000.000.000"
    },
    {
      "name": "portal",
      "value": "000.000.000.000"
    },
    {
      "name": "rcacp",
      "value": "000.000.000.000"
    }
  ]
}
```

The actual `value` must come from the API response.

Do not invent A record values.

---

## How to Use `a_records`

Use `a_records` when:

- the user lost the DNS records from the original `CreateTrackingDomain` response,
- the user asks what A records to add,
- SSL has not been initialized yet,
- SSL initialization fails because A records may be missing,
- DNS initialization fails because A records may be missing,
- AI/MCP needs to verify setup instructions.

Recommended user-facing DNS instructions:

| DNS Provider Field | Value |
|---|---|
| Type | `A` |
| Name / Host | `name` from `a_records` |
| Value / Points To | `value` from `a_records` |
| TTL | Default or automatic is usually fine unless the user has a reason to change it. |

Important:

```text
The user must add the exact A records returned by RevCent.
```

Some DNS providers automatically append the root domain. If the root domain is `example.com` and the record name is `rctrk`, the full hostname is usually:

```text
rctrk.example.com
```

In many DNS providers, the user enters only:

```text
rctrk
```

not:

```text
rctrk.example.com
```

unless the DNS provider requires the full hostname.

---

## `ssl`

The `ssl` object contains SSL status and SSL validation DNS records.

Important fields:

```text
ssl.status
ssl.cname_records
```

SSL is required before DNS tracking setup can be completed.

---

## `ssl.status`

`ssl.status` indicates the current SSL state for the Tracking Domain.

Possible values:

| Status | Meaning | Correct AI/MCP Action |
|---|---|---|
| `NOT_INITIALIZED` | SSL setup has not started. | Make sure A records are added, then run `InitializeTrackingDomainSSL`. |
| `PENDING_VALIDATION` | SSL setup has started and RevCent is waiting for CNAME validation. | Show/verify `ssl.cname_records`; user must add CNAME records and wait for DNS propagation. |
| `VALIDATION_TIMED_OUT` | CNAME validation timed out. | Verify CNAME records and use reset/retry process where available. |
| `ISSUED` | SSL certificate was successfully issued. | Proceed to `InitializeTrackingDomainDNS` if DNS is not complete. |
| `FAILED` | SSL issuance failed. | Verify A/CNAME records and use reset/retry process where available. |

The key transition is:

```text
ssl.status = ISSUED
```

DNS initialization should only happen after SSL is issued.

---

## `ssl.cname_records`

`ssl.cname_records` is an array of CNAME records required for SSL issuance.

These records become available after `InitializeTrackingDomainSSL` is run.

Purpose:

```text
CNAME records prove domain control and allow RevCent to issue SSL for the Tracking Domain.
```

Each CNAME record includes:

| Field | Meaning |
|---|---|
| `name` | CNAME record host/name. |
| `value` | CNAME target/value. |

Example shape:

```json
{
  "ssl": {
    "status": "PENDING_VALIDATION",
    "cname_records": [
      {
        "name": "example-cname-name",
        "value": "example-cname-target"
      }
    ]
  }
}
```

The user must add each CNAME record exactly as returned.

Do not modify CNAME names or values.

---

## How to Use `ssl.cname_records`

Use `ssl.cname_records` when:

- SSL status is `PENDING_VALIDATION`,
- the user asks what CNAME records to add,
- SSL validation timed out,
- SSL failed and records need verification,
- AI/MCP needs to re-display CNAME records after initialization.

Recommended user-facing DNS instructions:

| DNS Provider Field | Value |
|---|---|
| Type | `CNAME` |
| Name / Host | `name` from `ssl.cname_records` |
| Value / Target / Points To | `value` from `ssl.cname_records` |
| TTL | Default or automatic is usually fine unless the user has a reason to change it. |

Important:

```text
CNAME records are required for SSL issuance.
```

Do not proceed to DNS initialization while SSL is still `PENDING_VALIDATION`.

---

## `dns`

The `dns` object contains DNS tracking setup status.

Important field:

```text
dns.status
```

This tells AI/MCP whether DNS tracking has been initialized and completed.

---

## `dns.status`

Possible values:

| Status | Meaning | Correct AI/MCP Action |
|---|---|---|
| `AWAITING_SSL` | DNS setup is waiting for SSL status `ISSUED`. | Finish SSL setup first. Check `ssl.status` and CNAME records. |
| `NOT_INITIALIZED` | DNS setup has not started. | If `ssl.status = ISSUED`, run `InitializeTrackingDomainDNS`. |
| `PENDING` | DNS initialization is in progress. | Wait/check again with `GetTrackingDomain`. |
| `COMPLETE` | DNS tracking setup is complete and ready to use. | Tracking Domain is DNS-ready. |

The key completion state is:

```text
dns.status = COMPLETE
```

A Tracking Domain is ready only when:

```text
ssl.status = ISSUED
dns.status = COMPLETE
```

---

# Using GetTrackingDomain to Determine the Next Setup Step

AI/MCP should use the returned SSL/DNS fields to decide what to do next.

## Case 1: A Records Need to Be Added

If the domain was recently created or SSL has not been initialized:

```text
Show a_records to the user.
Tell the user to add each A record to DNS.
After confirmation, run InitializeTrackingDomainSSL.
```

Signals:

```text
ssl.status = NOT_INITIALIZED
```

and A records are present.

---

## Case 2: SSL Has Not Started

If:

```text
ssl.status = NOT_INITIALIZED
```

Then:

```text
1. Confirm A records have been added.
2. Run InitializeTrackingDomainSSL.
```

Do not run `InitializeTrackingDomainDNS` yet.

---

## Case 3: CNAME Records Need to Be Added

If:

```text
ssl.status = PENDING_VALIDATION
```

Then:

```text
1. Retrieve ssl.cname_records.
2. Show CNAME records to user.
3. Tell user to add them to DNS.
4. Wait for DNS propagation.
5. Use GetTrackingDomain again to check ssl.status.
```

Do not run DNS initialization yet.

---

## Case 4: SSL Is Issued But DNS Is Not Initialized

If:

```text
ssl.status = ISSUED
dns.status = NOT_INITIALIZED
```

Then:

```text
Run InitializeTrackingDomainDNS.
```

This is the correct point to complete DNS tracking setup.

---

## Case 5: DNS Is Waiting on SSL

If:

```text
dns.status = AWAITING_SSL
```

Then:

```text
Do not initialize DNS yet.
Check ssl.status.
If SSL is not issued, complete SSL setup first.
```

---

## Case 6: DNS Is Pending

If:

```text
dns.status = PENDING
```

Then:

```text
DNS initialization is in progress.
Use GetTrackingDomain again later to check for COMPLETE.
```

---

## Case 7: Tracking Domain Is Ready

If:

```text
ssl.status = ISSUED
dns.status = COMPLETE
```

Then:

```text
Tracking Domain is DNS-ready.
```

At this point, next steps are usually:

- configure Track.js,
- configure WooCommerce/plugin tracking,
- verify visitor tracking,
- test URL parameter metadata capture,
- test sale/conversion attribution,
- use BigQuery for reporting.

---

# Full Setup Flow Using GetTrackingDomain

Recommended AI/MCP flow:

```text
1. CreateTrackingDomain returns tracking_domain_id and a_records.
2. User adds A records to DNS.
3. GetTrackingDomain verifies current a_records and ssl.status.
4. If ssl.status = NOT_INITIALIZED:
       run InitializeTrackingDomainSSL.
5. InitializeTrackingDomainSSL returns ssl.cname_records.
6. User adds CNAME records to DNS.
7. GetTrackingDomain checks ssl.status.
8. If ssl.status = ISSUED:
       run InitializeTrackingDomainDNS.
9. GetTrackingDomain checks dns.status.
10. If dns.status = COMPLETE:
       Tracking Domain is DNS-ready.
```

---

## Tracking Domain Ready Definition

A Tracking Domain is ready for use only when both conditions are true:

```text
ssl.status = ISSUED
dns.status = COMPLETE
```

Do not describe a Tracking Domain as ready when:

- SSL is `NOT_INITIALIZED`,
- SSL is `PENDING_VALIDATION`,
- SSL is `VALIDATION_TIMED_OUT`,
- SSL is `FAILED`,
- DNS is `AWAITING_SSL`,
- DNS is `NOT_INITIALIZED`,
- DNS is `PENDING`.

---

## Root Domain Field

The output includes:

```text
domain
```

This is the root domain associated with the Tracking Domain.

Important:

```text
The root domain cannot be modified once a Tracking Domain is created.
```

If the wrong root domain was used, the usual fix is:

```text
Create a new Tracking Domain for the correct root domain.
```

Do not use `EditTrackingDomain` to change `domain`; that field is not editable.

---

## Enabled Field

The output includes:

```text
enabled
```

This indicates whether the Tracking Domain is currently enabled.

Enabled state is separate from DNS readiness.

A domain can have DNS records/status data while still being disabled, or it can be enabled while still not fully DNS-ready.

AI/MCP should evaluate both:

```text
enabled
ssl.status
dns.status
```

when explaining the domain's operational state.

---

## URL Parameter Sets

The output includes:

```text
url_parameter_sets
```

This is an array of URL Parameter Set IDs associated with the Tracking Domain.

URL Parameter Sets are the recommended method for managing URL parameter capture.

Why they matter:

- reusable across multiple Tracking Domains,
- easier to maintain,
- better organization,
- consistent metadata naming,
- simpler AI/MCP reasoning,
- better reporting consistency.

Use `EditTrackingDomain` to modify associated URL Parameter Sets.

---

## Legacy URL Parameters

The output can include:

```text
url_parameters
```

This is a manual/legacy way to add URL parameters directly to a Tracking Domain.

Each item can include:

| Field | Meaning |
|---|---|
| `url_parameter` | Query parameter to save, such as `utm_source`. |
| `metadata_name` | Metadata name to save value as. If empty, URL parameter name is used. |
| `default_value` | Optional default value to save instead of the actual URL value. |
| `days` | Number of days to persist the parameter for the visitor. Defaults to 30 if omitted. |

Preferred approach:

```text
Use URL Parameter Sets instead of domain-specific url_parameters where possible.
```

Use `GetTrackingDomain` to inspect existing URL parameter configuration before editing.

---

## Example Response Fields to Extract for Setup

When the user is trying to complete SSL/DNS, AI/MCP should extract and present:

```text
domain
a_records[].name
a_records[].value
ssl.status
ssl.cname_records[].name
ssl.cname_records[].value
dns.status
```

Example extracted setup summary:

```text
Tracking Domain: example.com

A records to add:
- rctrk → <value>
- portal → <value>
- rcacp → <value>

SSL status:
- PENDING_VALIDATION

CNAME records to add:
- <name> → <value>

DNS status:
- AWAITING_SSL
```

Never make up record values. Use only values returned by `GetTrackingDomain` or the relevant initialization operation.

---

## Example Request

```json
{
  "tracking_domain_id": "TTTTTTTTTTTTTTTTTTTT"
}
```

---

## Example AI/MCP Response Pattern

When using `GetTrackingDomain` during setup, AI/MCP should respond with something like:

```text
The Tracking Domain is not ready yet.

A records:
[show records]

SSL status:
PENDING_VALIDATION

CNAME records:
[show records]

Next step:
Add the CNAME records to DNS, then check again until ssl.status becomes ISSUED.
After SSL is issued, run InitializeTrackingDomainDNS.
```

If complete:

```text
The Tracking Domain is DNS-ready.

ssl.status = ISSUED
dns.status = COMPLETE

Next step:
Configure/test Track.js or the WooCommerce tracking integration and verify attribution metadata attaches to Sales.
```

---

## Troubleshooting With GetTrackingDomain

### SSL Is `NOT_INITIALIZED`

Meaning:

```text
SSL setup has not started.
```

Action:

```text
1. Show/confirm A records.
2. Confirm A records are added to DNS.
3. Run InitializeTrackingDomainSSL.
```

---

### SSL Is `PENDING_VALIDATION`

Meaning:

```text
RevCent is waiting for CNAME verification.
```

Action:

```text
1. Show ssl.cname_records.
2. Confirm user added CNAME records.
3. Check DNS provider formatting.
4. Wait for propagation.
5. Run GetTrackingDomain again.
```

---

### SSL Is `VALIDATION_TIMED_OUT`

Meaning:

```text
RevCent timed out while validating CNAME records.
```

Action:

```text
1. Verify CNAME records were added exactly.
2. Verify A records are still correct.
3. Check DNS provider formatting.
4. Use reset/retry flow where available.
```

---

### SSL Is `FAILED`

Meaning:

```text
SSL issuance failed.
```

Action:

```text
1. Verify A records.
2. Verify CNAME records.
3. Confirm domain ownership/DNS control.
4. Use reset/retry process where available.
```

---

### DNS Is `AWAITING_SSL`

Meaning:

```text
DNS initialization is waiting for SSL to be issued.
```

Action:

```text
1. Check ssl.status.
2. Finish SSL setup first.
3. Do not run InitializeTrackingDomainDNS yet.
```

---

### DNS Is `NOT_INITIALIZED`

Meaning:

```text
DNS initialization has not started.
```

Action:

```text
If ssl.status = ISSUED:
    Run InitializeTrackingDomainDNS.
Else:
    Finish SSL setup first.
```

---

### DNS Is `PENDING`

Meaning:

```text
DNS initialization is in progress.
```

Action:

```text
Check again with GetTrackingDomain.
```

---

### DNS Is `COMPLETE`

Meaning:

```text
DNS tracking setup is complete.
```

Action:

```text
Confirm ssl.status = ISSUED.
If both are true, Tracking Domain is ready.
```

---

## What GetTrackingDomain Does Not Do

`GetTrackingDomain` does not:

- create a Tracking Domain,
- edit a Tracking Domain,
- change the root domain,
- add DNS records for the user,
- initialize SSL,
- initialize DNS,
- issue SSL,
- install Track.js,
- configure WooCommerce plugin tracking,
- run attribution reports,
- create URL Parameter Sets.

It is a retrieval and status-check operation.

Use the correct operation for the desired mutation:

| Need | Correct Operation |
|---|---|
| Create Tracking Domain | `CreateTrackingDomain` |
| Edit name/description/parameters | `EditTrackingDomain` |
| Start SSL setup | `InitializeTrackingDomainSSL` |
| Complete DNS setup | `InitializeTrackingDomainDNS` |
| Report on attribution/metadata | `BigQueryRunQuery` |

---

## WooCommerce / User Shop Guidance

For WooCommerce/User Shop tracking, `GetTrackingDomain` is useful for confirming whether the store's domain is DNS-ready in RevCent.

A WooCommerce store should have the store's root domain configured and DNS-complete so RevCent can attach visitor/source metadata to Sales and their lifecycle.

Recommended check:

```text
ssl.status = ISSUED
dns.status = COMPLETE
```

If not complete, use the returned `a_records` and `ssl.cname_records` to guide the user through DNS setup.

---

## Reporting Guidance

Do not use `GetTrackingDomain` for reporting.

Use:

```text
BigQueryRunQuery
```

for attribution reports such as:

- revenue by `utm_source`,
- revenue by `utm_campaign`,
- subscriptions by original traffic source,
- refunds by affiliate ID,
- chargebacks by campaign,
- customer lifetime value by ad click ID,
- WooCommerce Sales by source/campaign.

`GetTrackingDomain` retrieves configuration/status. BigQuery reports on resulting tracked data.

---

## Best Practices

1. Use `GetTrackingDomain` immediately after `CreateTrackingDomain` if A records need to be re-shown.
2. Use it before `InitializeTrackingDomainSSL` to confirm A records and SSL status.
3. Use it after `InitializeTrackingDomainSSL` to retrieve or verify CNAME records.
4. Use it after the user adds CNAME records to check `ssl.status`.
5. Use it before `InitializeTrackingDomainDNS` to confirm `ssl.status = ISSUED`.
6. Use it after DNS initialization to confirm `dns.status = COMPLETE`.
7. Never invent A or CNAME record values.
8. Do not call the domain ready until SSL is issued and DNS is complete.
9. Remember the root domain is immutable.
10. Prefer URL Parameter Sets over legacy URL parameters.
11. Use BigQuery for attribution reporting.

---

## Common Mistakes to Avoid

Do not:

- run SSL initialization without confirming A records are added,
- run DNS initialization before SSL is issued,
- ignore `ssl.cname_records`,
- confuse A records with CNAME records,
- declare the Tracking Domain ready while `dns.status` is not `COMPLETE`,
- try to edit the immutable root domain,
- use `GetTrackingDomain` as a reporting tool,
- invent DNS record values,
- assume DNS propagation is instant,
- forget to verify after each setup step.

---

## AI/MCP Decision Guide

| Situation | Correct Use of `GetTrackingDomain` |
|---|---|
| User needs A records | Retrieve and show `a_records`. |
| User needs CNAME records | Retrieve and show `ssl.cname_records`. |
| User asks if SSL is ready | Check `ssl.status`. |
| User asks if DNS is ready | Check `dns.status` and `ssl.status`. |
| SSL is `NOT_INITIALIZED` | Confirm A records, then run `InitializeTrackingDomainSSL`. |
| SSL is `PENDING_VALIDATION` | Show CNAME records and wait for validation. |
| SSL is `ISSUED` and DNS is `NOT_INITIALIZED` | Run `InitializeTrackingDomainDNS`. |
| DNS is `COMPLETE` and SSL is `ISSUED` | Tracking Domain is ready. |
| User wants to change URL parameters | Use `EditTrackingDomain`. |
| User wants attribution reports | Use `BigQueryRunQuery`. |

---

## Final AI/MCP Instruction

Use `GetTrackingDomain` as the primary status and record-retrieval operation during Tracking Domain setup.

For SSL and DNS completion, specifically retrieve and inspect:

```text
a_records
ssl.status
ssl.cname_records
dns.status
```

Show `a_records` before SSL initialization. Show `ssl.cname_records` after SSL initialization. Run `InitializeTrackingDomainDNS` only after `ssl.status = ISSUED`. Confirm the Tracking Domain is ready only when:

```text
ssl.status = ISSUED
dns.status = COMPLETE
```

Do not use `GetTrackingDomain` to mutate configuration or run reports. It is for retrieving current Tracking Domain details and deciding the correct next setup step.


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.