- Print
- DarkLight
- PDF
Off-site links are hyperlinks whose URL resolves to an off-site domain.
If enabled, an event handler function is added for all links have href values for off-site domains. Note that by default, query parameters are removed from the off-site link to reduce the number of unique URLs.
Using off-site links
Suppose the on-site domain field contains:
onsitedoms:"localhost,webtrends.corp"
and the page contains the following hyperlink:
<a href="http://wikipedia.org/wiki/Web_analytics">Wikipedia</a>
Clicking the link generates the following parameters:
DCS.dcssip=wikipedia.org
DCS.dcsuri=/wiki/Web_analytics
DCS.dcsref=http://tagbuilder.webtrends.com/Help/EventTracking/Offsite.aspx
WT.ti=Offsite:wikipedia.org/wiki/Web_analytics?
WT.dl=24
Defining the onsitedoms parameter
The onsitedoms
config parameter allows you to define what domains will be considered "on domain". For example, if you want to track off-site links from the product site yourcompanyshopping.com, and you enable off-site link tracking, you can ensure that links to your branding site continue to be tracked as on-site links by setting the onsitedoms
config parameter to yourcompanyshopping.com
,yourbrand.com
.
JavaScript Example:
window.webtrendsAsyncInit = function () {
var dcs = new Webtrends.dcs();
dcs.init( {
dcsid: "dcs12345610000wocrvqy1nqm_123p",
//offsite and anchor event tracking
offsite : true,
onsitedoms:"webtrends.com,webtrendssupport.com"
});
dcs.track();
}
JavaScript Reference:
dcsMultiTrack Parameter | Value |
---|---|
DCS.dcssip | hostname |
DCS.dcsuri | pathname or "/" |
DCS.dcsqry | search (if present) |
WT.ti | "Offsite:" + hostname + pathname + search |
WT.dl | 24 |
WT.nv | Enclosing element id or classname (if present) |