# Tracking

*Article Topics:* [*NATS Admin*](/getting-started/common-topics/nats-admin.md)

## What is track?

NATS uses **track** to handle primary tracking for inbound affiliate traffic. This can usually be found in affiliate linkcodes, such as the following example:

```
https://<link_domain>/track/xxxxxxx
```

In the above link, NATS will replace *\<link\_domain>* with the actual link domain for your site and replace *xxxxxxx* with the proper affiliate NATS Code. This can be seen in the following image:

![](/files/OznS3tIKpRlRLcvcQgkE)

## How does track Work?

As visitors hit the track link, or linkcode, NATS will perform its tracking, cookie, and session procedures before redirecting the visitor to their original destination tour URL from the [Sites Admin](/nats-admin/sites.md). The NATSCode itself, or the Link Domain (if no NATS Code is present) will be used by NATS to match a link domain or site ID to the correct tour URL.

By default, NATS uses 301 (permanent) redirects for all track links. This means that when a visitor clicks a tracking link they are redirected to the destination tour URL with an HTTP Status Code 301, and search engines will more likely index the **landing pages** over the tracking URL. This will help with SEO performance since the pages will retain any link equity.&#x20;

Learn more on the [Permanent vs Temporary Track Redirect Links](/using-nats/nats-admin-features/linkcodes/permanent-vs-temporary-track-redirect-links.md) article.&#x20;

#### Same Surfer Hits Different Track Links?

If the same visitors hits more than one track link, also known as linkcode, NATS will use the tracking information for the most recent affiliate. For example:

* A visitor passes through the tracking link for **affiliate 1**, and NATS creates a cookie and starts tracking for **affiliate 1**. If the same visitors then travel through a tracking link for **affiliate 2**, NATS begins tracking for **affiliate 2**, forgetting about **affiliate 1**.

The only exception to this is In-House affiliates. In-house affiliates will not override the old affiliate's NATSCode, so the old affiliate's code will be used. Continuing from the above example:

* If **affiliate 3** is an In-House affiliate and the visitor goes through the tracking link for **affiliate 3**, NATS will ignore tracking for this affiliate and will continue to use the previous tracking information for **affiliate 2**.

You can mark an affiliate as In-House through the [Affiliate Admin Settings](/nats-admin/affiliates/further-reading/affiliate-admin-settings.md).

## What is strack?

**strack** is a feature in NATS that allows for affiliates to maintain credit when a visitor is redirected from one site to another. **strack** replaces the site ID and program ID in the linkcode.

### strack Formatting

`https://<linkdomain>/strack/<nats_code>/<site_id_or_shortname>:<tour_id_or_shortname>/<program_id_or_shortname>/<track_flag>/<optional_subdirectory_path>/`

* **linkdomain** - The Link Domain of the origin site in NATS, which will typically be in a form such as 'tour.example.com' or 'join.example.com', where 'example.com' is the domain of your main tour or content site.
* **nats\_code** - The NATScode from your affiliate or the default NATScode for the origin site/tour. Typically, when implementing an strack link on a PHP-enabled site, this is defined using the following in-line PHP 'if' statement -- `<?=(!empty($_REQUEST['nats']) && !preg_match('/[\'\"<>()\\\+\[\]]/', $_REQUEST['nats']))?$_REQUEST['nats']:xxxxxx?>` -- which, after replacing 'xxxxxx' with the default NATScode for the origin site/tour, translates to "If there is a value for the NATScode set in either GET, POST, or COOKIE, use it. Otherwise, use the default NATScode."
* **site\_id\_or\_shortname** - The Site ID or shortname of the destination site. If you do not want to direct traffic to a new site, set this value to '0'.
* **tour\_id\_or\_shortname** - The Tour ID or shortname of the destination tour. If you do not want to direct traffic to a new tour, set this value to '0'. If you direct traffic to a new tour, please ensure that the correct Site ID for this tour is also defined in your strack URL.
* **program\_id\_or\_shortname** - The Program ID or shortname of the destination program. Switching programs can be useful for things such as special offer links. If you do not want to direct traffic to a new program, set this value to '0'.
* **track\_flag** - Records a new hit on the destination tour and resets the tracking cookie if set to '1'. If the track\_flag field is not set, or if it is set to '0', this hit will not be recorded.
* **optional\_subdirectory\_path** - Specifies the path to a script, document, or subdirectory that is appended to the URL after the tracking redirect. For example, if the URL of your destination site is set in the Default Tour settings to '[www.example.com](http://www.example.com)' and you set the subdirectory path in your strack link to '/tour1/videos', the URL after the visitor has been redirected will be '[www.example.com/tour1/videos](http://www.example.com/tour1/videos)'.

## What is qtrack?&#x20;

Qualified Join Page Hits, or qtrack, is an additional statistic in NATS used in many ways.&#x20;

For example, if you had a multi-page tour and wanted to see how many visitors clicked through to the last (join) page, you could put a qualified link at the second to last page which would redirect to the last page.&#x20;

This Qualified Click Link would then only measure the traffic that goes to the final page of your tour, allowing you to record this in your Reporting as a "Qualified" Data Point and classify it as good traffic.&#x20;

For more information on Reporting, visit our [Reporting ](/nats-admin/reporting.md)page.

### Setting Up a Qualified Link

Qualified Click Links can be located in the [Linkcodes ](/using-nats/nats-admin-features/linkcodes.md)section of the [Site Overview](/nats-admin/sites/site-management/site-overview.md)

<figure><img src="/files/E0f0MzjkmZJqceDjLmtU" alt=""><figcaption></figcaption></figure>

Copy this link to the page you would like it to appear on (in our example it would be the second to last tour page), and replace the original link with the Qualified Click Link. Once you have done this, replace the *page.html* at the end of the Qualified Click Link with the name of the page you have put the link on.

Once this is done you will be able to track certain page hits, such as pre-join page hits as qualified hits and classify them in your statistics page appropriately.

NATS also offers a shortcut alternative to the standard Qualified Click Link. To do tracking of click-through stats without the specific link, you can add \&qualify=1 to the end of the pre-join page link. This will function similarly to a Qualified Click Link, as it will track how many viewers clicked through that particular link, allowing you to classify them however you wish.

## Related Articles

{% content-ref url="/pages/uQooIYFSesigosWG0NLv" %}
[Linkcodes](/using-nats/nats-admin-features/linkcodes.md)
{% endcontent-ref %}

{% content-ref url="/pages/hN86ugXxHgsecxtroEqI" %}
[Permanent vs Temporary Track Redirect Links](/using-nats/nats-admin-features/linkcodes/permanent-vs-temporary-track-redirect-links.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toomuchmedia.com/using-nats/nats-admin-features/linkcodes/tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
