- Print
- DarkLight
- PDF
Cross Domain Visitor Tracking
The Cross Domain Visitor Tracking plugins synchronize visitors' unique IDs between websites on different domains. This allows a visitor's journey from one site to another to be tracked without the use of third party cookies.
This tracking is achieved using a pair of plugins:
- CDT Broadcaster
- CDT Receiver
Visitor information is encoded and placed in the URL query string by the CDT Broadcaster plugin. The CDT Receiver plugin then reads the visitor information on the destination site and creates a Webtrends first party cookie with the same unique ID as the source site. These plugins can also be used to synchronize visitor information between a website and a native mobile app.
CDT Broadcaster
This plugin adds visitor information to links which open native mobile apps specified by appids
or links to specific domains specified by domains
.
Adding the CDT Broadcaster Plugin
An example of including the plugin with your tag:
<script type="text/javascript">
window.webtrendsAsyncInit=function() {
var dcs=new Webtrends.dcs().init({
dcsid: "YOUR_WEBTRENDS_DCSID_HERE",
timezone: YOUR_TIMEZONE_HERE,
plugins: {
cdt_broadcaster: {src: "webtrends.cdt_broadcaster.js", appids: ["id1","id2"], domains: ["domain1", "domain2"]}
}
}).track();
};
(function() {
var s=document.createElement("script"); s.async=true; s.src="webtrends.js";
var s2=document.getElementsByTagName("script")[0]; s2.parentNode.insertBefore(s,s2);
}());
</script>
CDT Broadcaster Plugin Options
src
Required. Specifies the location of the plugin. You can use the hosted version, //s.webtrends.com/js/webtrends.cdt_broadcaster.js, or host it on your server.
domains
One or more domain names, links to which will have visitor information added in the URL query string.
appids
One or more app IDs, links to which will have visitor information added in the URL query string.
paramName
Optional. The name of the URL query parameter, used to pass the visitor information, that will be added to links. The default value is _wt
.
The parameter name specified in the CDT Broadcaster and CDT Receiver configurations must match.
encode
Optional. Indicates whether the plugin should encode the data that is placed in the URL query string. The default value is true
.
The encode option specified in the CDT Broadcaster and CDT Receiver configurations must match.
CDT Receiver
This plugin sets the Webtrends visitor ID to the value sent by the CDT Broadcaster. A new first party cookie is written if this is the visitor's first time to the site. The first party cookie value will be updated for returning visitors.
Adding the CDT Receiver Plugin
An example of including the plugin with your tag:
<script type="text/javascript">
window.webtrendsAsyncInit=function() {
var dcs=new Webtrends.dcs().init({
dcsid: "YOUR_WEBTRENDS_DCSID_HERE",
timezone: YOUR_TIMEZONE_HERE,
plugins: {
cdt_receiver: {src: "webtrends.cdt_receiver.js", acceptDomains: ["domain1", "domain2"]}
}
}).track();
};
(function(){
var s=document.createElement("script"); s.async=true; s.src="webtrends.js";
var s2=document.getElementsByTagName("script")[0]; s2.parentNode.insertBefore(s,s2);
}());
</script>
CDT Receiver Plugin Options
src
Required. Specifies the location of the plugin. You can use the hosted version, //s.webtrends.com/js/webtrends.cdt_receiver.js, or host it on your server.
acceptDomains
One or more domain names, traffic from which will have the URL query string checked for visitor information. If this option is omitted then visitor information can be received from any domain.
paramName
Optional. The name of the URL query parameter, used to pass the visitor information, that will be added to links. The default value is _wt
.
The parameter name specified in the CDT Broadcaster and CDT Receiver configurations must match.
encode
Optional. Indicates whether the visitor information sent from the CDT Broadcaster is encoded. The default value is true
.
The encode option specified in the CDT Broadcaster and CDT Receiver configurations must match.