The client library allows clients to configure whether the library set cookies, and what kinds of cookies. Intelligent tracking is used to track individual visitors who have not explicitly opted out.
The visitors are tracked by collecting and hashing a set of technical properties from JavaScript variables and HTTP headers. This feature is enabled through the tag library. To enable intelligent tracking, call the cmSetIT(true)
function. To disable intelligent tracking, call cmSetIT(false)
. Intelligent tracking is disabled by default.
Note: cmSetIT(true) requires the use of cmSetCookieSetting("D").
<script type="text/javascript"> cmSetIT(true); </script>
This example shows the correct implementation for cmSetCookieSetting(setting)
, cmSetIT
, and cmTPThreshold
:
<head>
<script type="text/javascript" src="//testlibs.coremetrics.com/eluminate.js">
</script>
<script type="text/javascript">
cmSetClientID("99999999",true,"data.coremetrics.com",
"127.0.0.1");
cmSetCookieSetting("D");
cmSetIT(true);
cmSetupOther({"cm_TPThreshold":"0.5"});
</script>
</head>
Cookie suppression and session-only cookie tracking
You can specify a setting through the cmSetCookieSetting(setting)
parameter to disable setting of all cookies, only allow session cookies, or enable cookies.
For cmSetCookieSetting(setting)
, the setting parameter is one of these:
Parameter Value | Setting | Effect |
---|---|---|
S | Session cookies only | Cookies created with cmSetCookieSetting expire within the session. |
D | Cookies disabled | Currently set cookies in the suppression list will be removed. Future calls to cmSetCookieSetting does not set cookies and returns true .
Note: This parameter requires use of Intelligent Tracking (cmSetIT).
|
Example:
<script type="text/javascript">
cmSetCookieSetting("S"); // session cookies only
</script>
The automatic technical property tag
Normally, a technical property tag is fired with a page view if the cmTPSet
cookie is not set to Y
, and then the cmTPSet
cookie is set so the technical properties tag is not sent again for the visitor's session.
If cookies are disabled, the tag library adds technical properties to a percentage of page view tags. The script generates a random number between 0 and 1. If that number is less than the configured threshold, the technical properties are added to the page view tag. The threshold for sending technical properties on a page view is set using cm_TPThreshold
. A value greater than or equal to 1 always sends the technical properties on a page view, while a value less than 0 never sends a technical property tag. The default value is .10.
<script type="text/javascript">
cmSetupOther({"cm_TPThreshold":"0.5"});
</script>
Note: cm_TPThreshold is only used in combination with cmCookieSetting("D") and cmSetIT(true).
Opting-out for intelligent tracking
When you use Intelligent Tracking, no cookies are set on the visitor browser. To provide visitors the opportunity to opt-out of Intelligent Tracking, the cmSetOptOut
function is provided. This function must be called on each and every page of the web site with the designated value ("A", "Y" or "N").
The opt-out form or other input mechanism used by visitors to make the opt-out, opt-anonymous or opt-in decision must be provided by the web site author: this input code is not provided by Acoustic. The visitor decision should be persisted by the web site author so that the cmSetOptOut(...)
function can be called with appropriate parameter value from each new page.
- Available parameter values for the cmSetOptOut function:
Parameter value Setting A Anonymous data collection Y Total opt-out of all data collection N No opt-out. Normal data collection - Script block example:
<script type="text/javascript"> cmSetOptOut("Y"); // total visitor opt-out of data collection on this page </script>
Comments
0 comments
Article is closed for comments.