# RevCent MCP Operation: `CreateTrackingDomain`

This document explains the `CreateTrackingDomain` MCP operation and the full process required to make a RevCent Tracking Domain DNS-ready.

A tracking domain is not ready immediately after it is created. Creating the tracking domain is only the first step. The complete setup requires adding DNS A records, initializing SSL, adding DNS CNAME records, and initializing DNS tracking.

Sources:
- RevCent Tracking Domain Overview — `https://revcent.com/documentation/markdown/mcp/operation/OverviewTrackingDomain.md`
- RevCent MCP/API schema for `CreateTrackingDomain`
- RevCent MCP/API schema for `GetTrackingDomain`
- RevCent MCP/API schema for `InitializeTrackingDomainSSL`
- RevCent MCP/API schema for `InitializeTrackingDomainDNS`

---

---

# Read the Tracking Domain Overview First

Before creating, initializing, troubleshooting, or deeply configuring Tracking Domains, AI/MCP should read the Tracking Domain overview:

```text
https://revcent.com/documentation/markdown/mcp/operation/OverviewTrackingDomain.md
```

The overview explains Tracking Domains as a whole, including:

```text
What Tracking Domains are.
How RevCent DNS tracking works.
Why root domains are required.
How tracking domains support Track.js, visitor tracking, conversion tracking, URL parameter capture, metadata, campaign attribution, affiliate attribution, and BigQuery reporting.
How DNS readiness works.
How URL Parameter Sets relate to tracking domains.
How website tracking script installation or WooCommerce plugin DNS tracking fits into the overall setup.
Common setup caveats and troubleshooting patterns.
```

This operation file is focused on the `CreateTrackingDomain` operation and the DNS-ready setup process. The overview provides the broader conceptual context AI/MCP should understand before making tracking-domain setup decisions.

## Operation Summary

`CreateTrackingDomain` creates a new RevCent Tracking Domain and returns:

- A unique 20-character `tracking_domain_id`
- A list of required DNS A records

After the tracking domain is created, the returned A records must be added to the domain's DNS provider. After that, SSL must be initialized, CNAME records must be added, and DNS initialization must be completed.

High-level process:

1. Call `CreateTrackingDomain`.
2. Add returned A records to the domain DNS.
3. Call `InitializeTrackingDomainSSL`.
4. Add returned CNAME records to the domain DNS.
5. Call `InitializeTrackingDomainDNS`.
6. Confirm the tracking domain is DNS-ready.

---

# What Is a Tracking Domain?

A RevCent Tracking Domain is a root domain configured for RevCent DNS tracking.

Tracking domains are used to support:

- First-party visitor tracking
- RevCent Track.js
- Conversion tracking
- Visitor-to-sale attribution
- URL parameter tracking
- Metadata capture
- Campaign and affiliate attribution
- More accurate ecommerce conversion reporting

A properly configured tracking domain allows RevCent to associate visitor sessions, URL parameters, and later purchases/conversions.

---

# Important Domain Rules

## Use the Root Domain

The `domain` value should be the root domain.

Correct:

```text
example.com
```

Incorrect:

```text
www.example.com
```

Incorrect:

```text
shop.example.com
```

The schema states that only requests from the root domain will be tracked, and the domain cannot be modified once the tracking domain is created.

---

## The User Must Own and Control DNS

Before creating a tracking domain, confirm the user owns the domain or has access to modify DNS records.

The setup requires adding:

- A records
- CNAME records

If the user cannot edit DNS, the tracking domain cannot be completed.

---

## The Domain Cannot Be Changed Later

Once the tracking domain is created, the `domain` cannot be modified.

If the wrong domain is used, the correct fix is usually to create a new tracking domain for the correct root domain.

---

# Required Input

`CreateTrackingDomain` has one schema-required field:

| Field | Type | Required | Description |
|---|---:|---:|---|
| `name` | string | Yes | Unique tracking-domain name. |

Additional fields:

| Field | Type | Required | Description |
|---|---:|---:|---|
| `description` | string | No, but recommended | Description of the tracking domain purpose. |
| `domain` | string | Not marked required by schema, but required for practical setup | Root domain associated with the tracking domain, such as `example.com`. |

Important:

Even though `domain` is not marked as required in the schema, MCP should treat it as required for real tracking-domain setup because DNS tracking cannot be meaningfully configured without knowing the domain.

---

## Recommended Request

```json
{
  "name": "Main Store Tracking",
  "description": "Tracks visitors and conversions for example.com.",
  "domain": "example.com"
}
```

---

# Field Details

## `name`

The user-friendly name for the tracking domain.

Requirements:

- Must be unique from other tracking-domain names.

Recommended naming patterns:

```text
Main Store Tracking
Example.com Tracking
Primary Ecommerce Domain
US Store Tracking
Brand Name - Conversion Tracking
```

Avoid vague names:

```text
Test
Domain
Tracking 1
New Tracking
```

---

## `description`

A description is highly recommended.

Include:

- The domain being tracked
- Store or brand name
- Whether the domain is production or test
- Intended traffic sources
- Whether it is used for checkout, landing pages, or customer portal
- Any special attribution setup

Example:

```text
Production tracking domain for example.com. Used for RevCent Track.js, visitor attribution, URL parameter metadata, and conversion tracking for Google Ads, Meta Ads, affiliates, and email campaigns.
```

---

## `domain`

The root domain.

Correct examples:

```text
example.com
mybrand.com
storebrand.io
```

Do not include:

- `https://`
- `http://`
- path
- query string
- `www`
- subdomain

Incorrect examples:

```text
https://example.com
http://example.com
www.example.com
shop.example.com
example.com/products
example.com?utm_source=google
```

Before creating:

- Confirm the root domain.
- Confirm the user owns it.
- Confirm the user can edit DNS.
- Confirm the user understands it cannot be modified after creation.

---

# Output

A successful response includes:

```json
{
  "api_call_id": "XXXXXXXXXXXXXXXXXXXX",
  "api_call_unix": 1740000000,
  "code": 1,
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY",
  "a_records": [
    {
      "name": "rctrk",
      "value": "..."
    }
  ],
  "result": "..."
}
```

Output fields:

| Field | Description |
|---|---|
| `api_call_id` | 20-character API call ID. |
| `api_call_unix` | Unix timestamp when the API call was initiated. |
| `code` | API response code. `1` indicates success. |
| `tracking_domain_id` | 20-character tracking domain ID. |
| `a_records` | DNS A records the user must add. |
| `result` | Human-readable result message. |

---

# Full DNS-Ready Setup Process

Creating the tracking domain does **not** make it ready.

A tracking domain is DNS-ready only after:

1. The tracking domain exists.
2. A records are added to DNS.
3. SSL initialization has been started.
4. CNAME records are added to DNS.
5. SSL status becomes `ISSUED`.
6. DNS initialization completes.
7. DNS status becomes `COMPLETE`.

---

## Step 1: Create the Tracking Domain

Call `CreateTrackingDomain`.

Request:

```json
{
  "name": "Main Store Tracking",
  "description": "Tracks visitors and conversions for example.com.",
  "domain": "example.com"
}
```

Save the returned:

```text
tracking_domain_id
a_records
```

The `tracking_domain_id` is needed for all follow-up operations.

---

## Step 2: Add A Records to DNS

After creating the tracking domain, the response includes `a_records`.

These records must be added to the DNS provider for the root domain.

Example shape:

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

The exact records and values must come from the API response.

Do not make up record values.

---

## A Record Purpose

A records route RevCent tracking-related hostnames to the correct RevCent tracking infrastructure.

The schema describes A records as records required to:

- Initialize SSL
- Route traffic for tracking endpoints
- Support DNS tracking setup

Possible A record names include:

```text
rctrk
portal
rcacp
```

The exact record list comes from the tracking domain response.

---

## How to Enter A Records

The user must add each A record to their DNS provider.

Common DNS provider fields:

| DNS Provider Field | Value to Use |
|---|---|
| Type | `A` |
| Name / Host | The `name` value from the API response, such as `rctrk` |
| Value / Points to | The `value` from the API response |
| TTL | Default or automatic is usually fine unless the user has a reason to change it |

Important DNS provider behavior:

Some DNS providers automatically append the root domain.

For domain:

```text
example.com
```

and A record name:

```text
rctrk
```

the full hostname becomes:

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

If the DNS provider asks for host/name, usually enter:

```text
rctrk
```

not:

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

unless the DNS provider specifically requires the full hostname.

---

## Step 3: Verify / Retrieve A Records if Needed

If the A records were lost or need to be shown again, call `GetTrackingDomain`.

Request:

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

Look for:

```json
"a_records": [
  {
    "name": "rctrk",
    "value": "..."
  }
]
```

Use `GetTrackingDomain` any time the MCP needs to re-display the DNS records or check current setup status.

---

## Step 4: Initialize SSL

After the A records have been added to DNS, call `InitializeTrackingDomainSSL`.

Request:

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

Important:

- Do not call this before the A records are added.
- RevCent expects the required A records to exist in DNS first.
- DNS propagation may take time.
- If initialization fails or validation is delayed, check the A records.

Successful response includes:

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY",
  "a_records": [
    {
      "name": "rctrk",
      "value": "..."
    }
  ],
  "ssl": {
    "status": "PENDING_VALIDATION",
    "cname_records": [
      {
        "name": "...",
        "value": "..."
      }
    ]
  },
  "result": "..."
}
```

The critical next output is:

```text
ssl.cname_records
```

---

## Step 5: Add CNAME Records to DNS

`InitializeTrackingDomainSSL` returns CNAME records that must be added to DNS.

Example shape:

```json
[
  {
    "name": "...",
    "value": "..."
  }
]
```

Add each CNAME record to the DNS provider.

Common DNS provider fields:

| DNS Provider Field | Value to Use |
|---|---|
| Type | `CNAME` |
| Name / Host | The `name` from `ssl.cname_records` |
| Value / Target / Points to | The `value` from `ssl.cname_records` |
| TTL | Default or automatic is usually fine |

Important:

- CNAME records are essential for SSL issuance.
- Do not alter record names.
- Do not alter record values.
- Some DNS providers automatically append the root domain.
- DNS propagation can take time.

---

## CNAME Record Purpose

CNAME records are used to validate SSL certificate issuance.

The SSL certificate is required before DNS tracking can be completed.

Without the CNAME records:

- SSL may remain `PENDING_VALIDATION`
- SSL may become `VALIDATION_TIMED_OUT`
- DNS initialization cannot complete

---

## Step 6: Check SSL Status

Call `GetTrackingDomain` to inspect SSL status.

Request:

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

Look for:

```json
"ssl": {
  "status": "ISSUED"
}
```

SSL status values:

| Status | Meaning | MCP Guidance |
|---|---|---|
| `NOT_INITIALIZED` | SSL setup has not started. | Call `InitializeTrackingDomainSSL` after A records are added. |
| `PENDING_VALIDATION` | RevCent is waiting for CNAME verification. | Confirm CNAME records were added correctly and wait for DNS propagation. |
| `VALIDATION_TIMED_OUT` | CNAME verification timed out. | Verify CNAME records, then retry or reset if available. |
| `ISSUED` | SSL certificate was issued. | Proceed to `InitializeTrackingDomainDNS`. |
| `FAILED` | SSL issuance failed. | Verify DNS records and use reset/retry process if available. |

Do not proceed to DNS initialization until SSL is issued.

---

## Step 7: Initialize DNS

After:

- A records are added
- SSL is initialized
- CNAME records are added
- SSL is issued

call `InitializeTrackingDomainDNS`.

Request:

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

RevCent verifies the required DNS records before completing DNS initialization.

If records are missing, RevCent returns an error.

If all required records are present and SSL is issued, RevCent completes DNS initialization and the tracking domain becomes ready for use.

---

## Step 8: Check DNS Status

Call `GetTrackingDomain`.

Request:

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

Look for:

```json
"dns": {
  "status": "COMPLETE"
}
```

DNS status values:

| Status | Meaning | MCP Guidance |
|---|---|---|
| `AWAITING_SSL` | DNS setup is waiting for SSL status `ISSUED`. | Check SSL status and CNAME records. |
| `NOT_INITIALIZED` | DNS setup has not started. | Call `InitializeTrackingDomainDNS` after SSL is issued. |
| `PENDING` | DNS initialization is in progress. | Wait and check again. |
| `COMPLETE` | DNS tracking setup is complete and ready to use. | Tracking domain is DNS-ready. |

---

# DNS-Ready Definition

A tracking domain is DNS-ready when:

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

The MCP should not describe a tracking domain as ready until both conditions are true.

---

# End-to-End MCP Workflow

Use this workflow when the user asks to create a tracking domain:

0. Read the Tracking Domain overview for overall understanding before creating or configuring the tracking domain.
1. Ask for the root domain.
2. Confirm the user owns the domain and can edit DNS.
3. Confirm the domain is root only, not `www` or another subdomain.
4. Choose a clear tracking-domain name and description.
5. Call `CreateTrackingDomain`.
6. Save the `tracking_domain_id`.
7. Display the returned A records to the user.
8. Instruct the user to add A records to DNS.
9. After the user confirms A records are added, call `InitializeTrackingDomainSSL`.
10. Display the returned CNAME records to the user.
11. Instruct the user to add CNAME records to DNS.
12. Use `GetTrackingDomain` to check SSL status.
13. When `ssl.status = ISSUED`, call `InitializeTrackingDomainDNS`.
14. Use `GetTrackingDomain` to verify `dns.status = COMPLETE`.
15. Tell the user the tracking domain is DNS-ready only after DNS status is complete.
16. Create or select a URL Parameter Set for the URL parameters RevCent should save.
17. Associate the URL Parameter Set with the tracking domain.
18. Confirm the website has the RevCent tracking script installed, or if it is WooCommerce, confirm DNS tracking is enabled in the RevCent plugin so the script is automatically included.
19. Continue with visitor ID setup as needed.
20. Test that configured URL parameters are saved as metadata.

---

# MCP User-Facing DNS Record Guidance

When showing DNS records to the user, display them clearly as tables.

## A Records Table Format

| Type | Name / Host | Value / Points To |
|---|---|---|
| A | `rctrk` | `<value from API>` |
| A | `portal` | `<value from API>` |
| A | `rcacp` | `<value from API>` |

## CNAME Records Table Format

| Type | Name / Host | Value / Target |
|---|---|---|
| CNAME | `<name from API>` | `<value from API>` |

MCP should always remind the user:

```text
Use the exact values returned by RevCent. Do not edit or shorten the record values unless your DNS provider specifically requires a different display format.
```

---

# Common DNS Provider Notes

## Root Domain Appending

Many DNS providers automatically append the root domain.

If RevCent gives:

```text
name = rctrk
domain = example.com
```

the final hostname is:

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

The DNS provider may want only:

```text
rctrk
```

If the provider asks for the full host, use:

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

The user may need to check their DNS provider's UI conventions.

---

## Proxy / CDN Settings

Some DNS providers, such as Cloudflare, may offer proxied DNS records.

For validation and tracking setup, DNS records often need to resolve exactly as expected.

MCP should advise:

- Use DNS-only mode if the provider offers proxying and validation fails.
- Avoid modifying record targets.
- Avoid CNAME flattening unless required and confirmed compatible.
- Wait for DNS propagation.

---

## TTL

Default TTL or automatic TTL is usually acceptable.

Lower TTL can be useful during setup, but is not required unless the user has a specific DNS-management reason.

---

# Troubleshooting

## `InitializeTrackingDomainSSL` Fails

Check:

- Did the user add all A records?
- Were A record names entered correctly?
- Were A record values entered exactly?
- Did the DNS provider append the root domain automatically?
- Is the domain correct?
- Has DNS propagated?
- Is the user editing the correct DNS zone?

---

## SSL Stays `PENDING_VALIDATION`

Check:

- Did the user add all CNAME records?
- Were CNAME record names entered correctly?
- Were CNAME values entered exactly?
- Has DNS propagated?
- Is the DNS provider proxying records?
- Did the DNS provider require a different host/name format?

---

## SSL Is `VALIDATION_TIMED_OUT`

Check CNAME records carefully.

Likely issues:

- Missing CNAME records
- Incorrect CNAME names
- Incorrect CNAME values
- DNS provider formatting issue
- DNS propagation delay
- Wrong DNS zone

After correcting DNS, retry or use reset/retry process if available.

---

## DNS Status Is `AWAITING_SSL`

DNS initialization cannot complete until SSL is issued.

Check:

```text
ssl.status
```

If SSL is not `ISSUED`, resolve SSL first.

---

## `InitializeTrackingDomainDNS` Returns Missing Records Error

Check:

- A records still exist.
- CNAME records still exist.
- SSL status is `ISSUED`.
- DNS records are in the correct DNS zone.
- DNS propagation has completed.
- DNS proxying is not hiding expected records.

---

---

# URL Parameter Set Requirement for DNS Tracking

After a tracking domain is created and made DNS-ready, MCP should also tell the user to create and associate a URL Parameter Set with the tracking domain.

This is important because the DNS tracking domain can track visitors, but RevCent needs URL parameter configuration in order to know which URL parameters should be saved as metadata for those visitors and resulting conversions.

In other words:

```text
DNS tracking domain = enables visitor/conversion tracking infrastructure
URL parameter set = tells RevCent which URL parameters to save as metadata
```

Without a URL Parameter Set or manually configured `url_parameters`, important attribution values may not be saved.

---

## Why URL Parameter Sets Matter

A tracking domain is commonly used to preserve marketing attribution.

Example landing URL:

```text
https://example.com/?utm_source=google&utm_campaign=spring_sale&gclid=abc123&affiliate_id=aff_001
```

For RevCent to save these values, the tracking domain must know which parameters to capture.

A URL Parameter Set can tell RevCent to save:

| URL Parameter | Saved Metadata Name | Example Value |
|---|---|---|
| `utm_source` | `utm_source` | `google` |
| `utm_campaign` | `utm_campaign` | `spring_sale` |
| `gclid` | `gclid` | `abc123` |
| `affiliate_id` | `affiliate_id` | `aff_001` |

This makes later reporting possible, such as:

- Revenue by `utm_source`
- Sales by `utm_campaign`
- Conversions by `gclid`
- Refunds by `affiliate_id`
- Chargebacks by traffic source
- BigQuery reporting by metadata

---

## MCP Guidance

When creating a tracking domain, MCP should not stop after DNS setup.

MCP should also ask:

```text
Which URL parameters should RevCent save for this tracking domain?

MCP should not provide a default list of recommended parameters unless the user explicitly asks for examples. The user is expected to know which URL parameters their traffic sources use.

```

The user should provide the exact URL parameters to include in the URL Parameter Set.

MCP should not guess or recommend default parameters. It should ask the user which parameters their site, ads, affiliates, or tracking links actually use, then guide the user to create a URL Parameter Set and associate that set with the tracking domain.

---

## Recommended URL Parameter Set Workflow

After the tracking domain is created, MCP should:

1. Ask which exact URL parameters the user wants RevCent to save.
2. Confirm those parameters are actually used by the user’s site, ads, affiliates, or tracking links.
3. Create a URL Parameter Set for those user-provided parameters, if one does not already exist.
4. Associate the URL Parameter Set with the tracking domain.
5. Confirm the tracking domain has the URL Parameter Set attached.
6. Explain that future visitors with those configured URL parameters can have those values saved as metadata.
7. Remind the user that URL parameter metadata is useful for RevCent reporting, BigQuery, AI workflows, attribution, refunds, chargebacks, and campaign analysis.

---

## URL Parameter Sets vs Manual `url_parameters`

The `GetTrackingDomain` schema supports both:

| Method | Best Use |
|---|---|
| `url_parameter_sets` | Recommended for shared URL parameter configuration across one or more tracking domains. |
| `url_parameters` | Manual tracking-domain-specific parameters for one domain only. |

MCP should generally recommend URL Parameter Sets because they are easier to manage and reuse across multiple tracking domains.

Use manual `url_parameters` only when the parameters apply to one tracking domain and do not need to be reused elsewhere.

---

## Example URL Parameter Set Concept

The following is only an example of the structure. The user should provide the actual URL parameters their domain uses:

```json
[
  {
    "url_parameter": "utm_source",
    "metadata_name": "utm_source",
    "days": 30
  },
  {
    "url_parameter": "utm_medium",
    "metadata_name": "utm_medium",
    "days": 30
  },
  {
    "url_parameter": "utm_campaign",
    "metadata_name": "utm_campaign",
    "days": 30
  },
  {
    "url_parameter": "gclid",
    "metadata_name": "gclid",
    "days": 30
  },
  {
    "url_parameter": "affiliate_id",
    "metadata_name": "affiliate_id",
    "days": 30
  },
  {
    "url_parameter": "sub_id",
    "metadata_name": "sub_id",
    "days": 30
  }
]
```

Recommended practice:

- Use the same `metadata_name` as the `url_parameter` unless the business has a clear naming standard.
- Use descriptive names.
- Avoid short ambiguous names like `a`, `s`, `c`, or `x`.
- Use consistent parameter names across all tracking domains.
- Use `days: 30` unless the business needs a shorter or longer attribution window.

---

## Add URL Parameter Set to the Overall Setup Lifecycle

The full setup should be treated as:

1. Create the tracking domain.
2. Add returned A records to DNS.
3. Initialize SSL.
4. Add returned CNAME records to DNS.
5. Initialize DNS.
6. Confirm `ssl.status = ISSUED`.
7. Confirm `dns.status = COMPLETE`.
8. Create or select a URL Parameter Set.
9. Associate the URL Parameter Set with the tracking domain.
10. Install/configure the RevCent tracking script on the website, or if the site is WooCommerce, enable DNS tracking in the RevCent plugin so the script is automatically included.
11. Confirm visitor ID is passed into checkout/sale creation.
12. Test with a landing URL that contains the configured URL parameters.

Example test URL:

```text
https://example.com/?utm_source=test&utm_campaign=tracking_test&affiliate_id=test_affiliate
```

Then confirm those values are saved as metadata for the visitor and resulting conversion.


---

# Website Tracking Script Requirement

Making the tracking domain DNS-ready is only part of the setup.

The website that the tracking domain is for must also have RevCent tracking installed so visitors can actually be tracked.

In most cases, this means the website needs the RevCent tracking script added to the site pages where visitor tracking should occur.

Without the tracking script or plugin-based tracking enabled:

- DNS records may be correct.
- SSL may be issued.
- DNS status may be complete.
- But RevCent may still not track visitors or conversions correctly because the website is not sending visitor tracking data.

---

## Non-WooCommerce / Custom Websites

For non-WooCommerce websites, custom sites, landing pages, funnels, or manually built ecommerce flows, the user should add the RevCent tracking script to the website footer.

The required footer snippet is:

```html
<script async type="text/javascript" src="https://rctrk.domain.com/trk.js"></script>
```

Replace `domain.com` with the tracking domain root domain.

Example for:

```text
example.com
```

Use:

```html
<script async type="text/javascript" src="https://rctrk.example.com/trk.js"></script>
```

The script should be included on pages where visitor tracking and attribution matter, such as:

- Landing pages
- Product pages
- Checkout entry pages
- Funnel pages
- Campaign pages
- Pages receiving paid traffic
- Pages receiving affiliate traffic
- Pages that need visitor-to-conversion attribution

Important:

- The script should be placed in the website footer.
- The script should load before the visitor converts.
- The tracking domain DNS setup must be complete so `https://rctrk.<domain>/trk.js` resolves correctly.
- The conversion or checkout flow must preserve/pass the RevCent visitor ID when needed.
- URL parameters must be present on the landing URL and configured through the tracking domain’s URL Parameter Set or manual `url_parameters`.
- The script and DNS tracking work together; DNS setup alone is not enough.

---

## WooCommerce / RevCent Plugin Websites

If the user is running WooCommerce with the RevCent plugin, the tracking script is automatically included by the plugin as long as DNS tracking is enabled in the RevCent plugin settings.

In that case, the user generally does not need to manually paste the tracking script into the WooCommerce site.

For WooCommerce, MCP should tell the user to verify:

1. The RevCent plugin is installed.
2. The RevCent plugin is connected/configured.
3. DNS tracking is enabled in the RevCent plugin.
4. The tracking domain DNS setup is complete.
5. The URL Parameter Set is associated with the tracking domain.
6. Test traffic includes the expected URL parameters.
7. Conversions are checked to confirm visitor attribution and metadata are being saved.

Important:

```text
WooCommerce + RevCent plugin + DNS tracking enabled = tracking script automatically included.
```

But if DNS tracking is not enabled in the plugin, the user should not assume tracking is active.

---

## MCP Guidance

After the tracking domain reaches:

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

MCP should still remind the user:

```text
Now make sure the website has RevCent tracking installed. If this is a WooCommerce site using the RevCent plugin, enable DNS tracking in the plugin so the tracking script is automatically included. If this is not WooCommerce, add the RevCent tracking script to the site footer manually: `<script async type="text/javascript" src="https://rctrk.domain.com/trk.js"></script>`, replacing `domain.com` with the tracking domain root domain.
```

MCP should not describe the tracking setup as complete unless both are true:

1. The tracking domain DNS/SSL setup is complete.
2. The website has tracking installed, either manually or through the WooCommerce RevCent plugin with DNS tracking enabled.


# Relationship to Track.js and Conversion Tracking

Making the tracking domain DNS-ready is necessary, but not always sufficient for complete conversion tracking.

After DNS is ready, the user still needs to ensure:

- RevCent Track.js is installed or plugin DNS tracking is enabled.
- Visitor IDs are being generated.
- Visitor IDs are passed into checkout or sale creation.
- URL parameters are configured and saved as metadata.
- Conversion flow preserves visitor identity.
- Test traffic includes actual URL parameters.

The tracking domain infrastructure supports tracking, but the website or store must still use it correctly.

---

# URL Parameters After DNS Setup

Once the domain is DNS-ready, configure URL parameters so visitor attribution data is saved as metadata.

Examples:

```json
[
  {
    "url_parameter": "utm_source",
    "metadata_name": "utm_source",
    "days": 30
  },
  {
    "url_parameter": "utm_campaign",
    "metadata_name": "utm_campaign",
    "days": 30
  },
  {
    "url_parameter": "gclid",
    "metadata_name": "gclid",
    "days": 30
  },
  {
    "url_parameter": "affiliate_id",
    "metadata_name": "affiliate_id",
    "days": 30
  }
]
```

---

# CreateTrackingDomain Example Request

```json
{
  "name": "Main Store Tracking",
  "description": "Production tracking domain for example.com. Used for RevCent Track.js, visitor attribution, URL parameter metadata, and conversion tracking.",
  "domain": "example.com"
}
```

---

# InitializeTrackingDomainSSL Example Request

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

---

# InitializeTrackingDomainDNS Example Request

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

---

# GetTrackingDomain Status Check Example

```json
{
  "tracking_domain_id": "YYYYYYYYYYYYYYYYYYYY"
}
```

Check:

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

---

# Best Practices

0. Read the Tracking Domain overview before creating or deeply configuring a tracking domain.
1. Confirm the domain is the root domain before creation.
2. Confirm the user can edit DNS before creation.
3. Use a clear tracking-domain name.
4. Add a detailed description.
5. Save the `tracking_domain_id`.
6. Display A records immediately after creation.
7. Do not call SSL initialization until A records are added.
8. Display CNAME records immediately after SSL initialization.
9. Do not call DNS initialization until CNAME records are added and SSL is issued.
10. Use `GetTrackingDomain` to check statuses.
11. Do not mark the domain ready until `ssl.status = ISSUED` and `dns.status = COMPLETE`.
12. Use exact DNS record values.
13. Watch for DNS provider root-domain appending.
14. Use DNS-only mode if proxying interferes with validation.
15. After DNS readiness, create or associate a URL Parameter Set so RevCent knows which URL parameters to save.
16. Configure the RevCent tracking script on the website, or for WooCommerce confirm DNS tracking is enabled in the RevCent plugin so the script is automatically included.
17. Confirm visitor ID passing where required.
18. Test that configured URL parameters are saved as metadata.

---

# Quick Reference

| Step | Operation | User Action Required |
|---|---|---|
| 1 | `CreateTrackingDomain` | Provide root domain and name. |
| 2 | None | Add returned A records to DNS. |
| 3 | `InitializeTrackingDomainSSL` | Run after A records are added. |
| 4 | None | Add returned CNAME records to DNS. |
| 5 | `GetTrackingDomain` | Check `ssl.status`. |
| 6 | `InitializeTrackingDomainDNS` | Run after SSL is issued and records are present. |
| 7 | `GetTrackingDomain` | Confirm `dns.status = COMPLETE`. |

---

# Summary

`CreateTrackingDomain` starts the tracking-domain setup process, but it does not complete it.

A tracking domain becomes DNS-ready only after:

```text
A records added
SSL initialized
CNAME records added
SSL issued
DNS initialized
DNS status complete
```

The MCP should guide the user through each step, clearly display the DNS records, verify statuses using `GetTrackingDomain`, and only describe the domain as ready when both SSL and DNS setup are complete.


---

# Overview Reference

AI/MCP should read the Tracking Domain overview for broad conceptual understanding before creating, initializing, troubleshooting, or deeply reviewing Tracking Domains:

```text
https://revcent.com/documentation/markdown/mcp/operation/OverviewTrackingDomain.md
```


---
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.