Difference between revisions of "NATS4 track and strack"

From TMM Wiki
Jump to navigationJump to search
m (removed duplicate links, color-coded affiliate track examples)
 
(20 intermediate revisions by 5 users not shown)
Line 3: Line 3:
 
}}
 
}}
  
This article explains the purpose and usage of the strack feature.
+
== What is track? ==
 
+
[[NATS]] uses ''track'' to handle primary tracking for in-bound affiliate traffic. This can usually be found in affiliate [[NATS4 LinkCodes|linkcodes]], such as the following example:
== What is Track? ==
 
In NATS, primary tracking for in-bound affiliate traffic is handled by
 
the ''track'' feature, usually found in affiliate link codes:
 
  
 
<pre>
 
<pre>
Line 13: Line 10:
 
</pre>
 
</pre>
  
In the above link, NATS replaces ''<link_domain>'' with the actual
+
In the above link, NATS will replace ''<link_domain>'' with the actual link domain for your site and replace ''xxxxxxx'' with the proper affiliate [[NATS4 NATSCode|NATSCode]]. This can be seen in the following image:
link domain for the site and replaces ''xxxxxx'' with the affiliate NATS
+
 
code. See the example in figure 1.1.
+
[[File:Members_linkcodes_example.jpg|450 px|Figure 1.1 An Example link code using the standard track feature]]
 +
 
 +
== How Does track Work? ==
 +
As [[Ct#Surfer|surfers]] hit the track link, or linkcode, NATS will perform its tracking, cookie, and session procedures before redirecting the surfer to their original destination tour URL from the [[NATS4 Sites Admin|sites admin]]. The NATSCode itself, or the [[Link Domain]] (if no NATSCode is present) will be used by NATS to match a link domain or site ID to the correct tour URL.
  
[[Image:Members_linkcodes_example.jpg|thumb|center|600px|Figure 1.1  An Example link code using the standard track feature]]
+
=== Same Surfer Hits Different Track Links? ===
  
As surfers hit track, NATS performs its tracking, cookie, and session
+
If the same surfer hits more than one track link, also known as linkcode, NATS will use the tracking information for the most recent affiliate. For example:
procedures, before redirecting the surfer to their destination tour URL
+
 
from the sites admin. The NATS code itself or the link domain (if no
+
*A surfer passes through the tracking link for '''<span style="color:red">affiliate 1</span>''', and NATS creates a cookie and starts tracking for '''<span style="color:red">affiliate 1</span>'''. If the same surfer then travels through a tracking link for '''<span style="color:blue">affiliate 2</span>''', NATS begins tracking for '''<span style="color:blue">affiliate 2</span>''', forgetting about '''<span style="color:red">affiliate 1</span>'''.
NATS code is present) are used by NATS to match a link domain or site id
+
 
to the correct tour URL.
+
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 '''<span style="color:green">affiliate 3</span>''' is an In-House affiliate and the surfer goes through the tracking link for '''<span style="color:green">affiliate 3</span>''', NATS will ignore tracking for this affiliate and will continue to use the previous tracking information for '''<span style="color:blue">affiliate 2</span>'''.
 +
 
 +
You can mark an affiliate as In-House through the [[NATS4 Affiliate Admin Settings|Affiliate Admin Settings]].
  
 
== What is strack? ==
 
== What is strack? ==
In contrast, strack replaces one site ID or program ID with another site
+
In contrast to ''track'', ''strack'' replaces one site ID or program ID with another site or program ID. If you need to provide links from one NATS site to another, for example, you can use ''/strack/'' to replace the default site ID in the NATS code with a new site ID for the other site. This also serves the purpose of preserving relevant affiliate information, as well as ensuring that affiliates get credit for any sales that have been made.
or program ID. For example, if you need to provide links from one NATS
 
site to another, you can use ''/strack/'' to replace the site ID in the
 
NATS code with the new site ID for the other site -- while preserving
 
affiliate information and ensuring affiliates get credit for any sales.
 
  
 
== strack Formatting ==
 
== strack Formatting ==
Line 37: Line 37:
 
</pre>
 
</pre>
  
* ''linkdomain'' is the link domain of the site in NATS, usually something like tour.example.com or join.example.com, where example.com is the domain of your main tour or content site
+
* '''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'' is the NATS code from your affiliate or the default NATS code for the site.  Normally this is available to you on a PHP-enabled site by usage of this in-line PHP if statement -- <code><?=$_REQUEST[nats]?$_REQUEST[nats]:xxxxxx?></code> -- which translates to ''if there is a value for nats set in either GET, POST, or Cookie, use that value. Otherwise, use the default value provided (which is different for every site)''
+
 
* ''site_id_or_shortname'' is the ID number or shortname of the desired site. This is the target site and may be different than the site currently being visited. You may use a value of 0 to indicate that you do not wish to override the site ID number with a new one
+
* '''nats_code''' - The NATScode from your affiliate or the default NATScode for the origin site/tourTypically, when implementing an strack link on a PHP-enabled site, this is defined using the following in-line PHP 'if' statement -- <code><?=(!empty($_REQUEST['nats']) && !preg_match('/[\'\"<>()\\\+\[\]]/', $_REQUEST['nats']))?$_REQUEST['nats']:xxxxxx?></code> -- 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."
* ''tour_id_or_shortname'' is the ID number of shortname of the desired tour. This is the target tour and may be different than the site currently being visited. You will need to have the siteid set to the site that this tour is available on.
+
 
* ''program_id_or_shortname'' is the ID number or shortname of the desired program. You can use this to switch one program to another.  Switching programs is useful for special offer links. If you do not wish to change the program, set this value to 0
+
* '''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'.
* ''track_flag'' when set to 1, counts this hit as a new hit and resets the tracking cookie
+
 
* ''optional_subdirectory_path'' specifies a path to a specific script, document, or subdirectory that is added onto the end of the URL after the tracking redirect. For example, if your sites main tour URL in the NATS sites admin is www.example.com and you pass in /tour1/videos, it will add /tour1/videos to end of the URL after redirecting
+
* '''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 [[NATS4_Tour_Setup|Default Tour]] settings to 'www.example.com' and you set the subdirectory path in your strack link to '/tour1/videos', the URL after the surfer has been redirected will be 'www.example.com/tour1/videos'.
  
 
[[Category:DHUPDATE]]
 
[[Category:DHUPDATE]]

Latest revision as of 21:04, 21 August 2019

NATS 4
Reporting Admin
The Reporting Admin
track and strack
Fraud Reports
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers

What is track?

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

http://<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 NATSCode. This can be seen in the following image:

Figure 1.1 An Example link code using the standard track feature

How Does track Work?

As surfers hit the track link, or linkcode, NATS will perform its tracking, cookie, and session procedures before redirecting the surfer to their original destination tour URL from the sites admin. The NATSCode itself, or the Link Domain (if no NATSCode is present) will be used by NATS to match a link domain or site ID to the correct tour URL.

Same Surfer Hits Different Track Links?

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

  • A surfer passes through the tracking link for affiliate 1, and NATS creates a cookie and starts tracking for affiliate 1. If the same surfer then travels 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 surfer 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.

What is strack?

In contrast to track, strack replaces one site ID or program ID with another site or program ID. If you need to provide links from one NATS site to another, for example, you can use /strack/ to replace the default site ID in the NATS code with a new site ID for the other site. This also serves the purpose of preserving relevant affiliate information, as well as ensuring that affiliates get credit for any sales that have been made.

strack Formatting

http://<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' and you set the subdirectory path in your strack link to '/tour1/videos', the URL after the surfer has been redirected will be 'www.example.com/tour1/videos'.