This chapter contains the following sections:
Visitor tracking is done by the data capture application (sensor). Visitors can be tracked in the following ways:
Self-organized method, which supports tracking of new visitors
Sessionfingerprint
method
Cookie method
Note:
By default, theSessionfingerprint
method is enabled on all sites.Methods for tracking visitors are implemented by adding visitor tracking code to global.xml
(and to the img
tag, depending on the tracking method).
Note:
When changing the visitor tracking method, you must also update theglobal.xml
configuration file for each sensor instance. The location of global.xml
depends on the application server you are using.
When modifying parameters in the global.xml file(s)
, stop the Analytics Sensor web application, modify its global.xml
file, then start the sensor to effect the change.
The self-organized visitor tracking method uses the value of the cookieid
parameter appended to the image request.
To track the visitor
Add the following parameters to the img
tag:
cookieid
– the visitor ID
newvisitor
– determines whether the user has already visited the site
If you need to change the name of the cookieid
parameter (to visitorid
for example), you must also do the following:
Change the following line in global.xml
as shown below:
From:
<alias name="cookieid" for="cookieid"/>
To:
<alias name="visitorid" for="cookieid"/>
Pass the visitorid
and newvisitor
parameters to the img
tag.
The Sessionfingerprint
method identifies each visitor by a combination of the IP address, screen resolution, and agent string to assign sessions to visitors. You can enable Sessionfingerprint
for all sites or a selected site. Sessionfingerprint
is enabled for all sites by default when Analytics is first installed.
Note:
TheSessionfingerprint
method does not support new visitor tracking.To enable the sessionfingerprint method
To enable visitor tracking on all sites, add the lines in bold type below to global.xml
(nest them in the default <params> ... </params>
tag, as shown):
<params host="default"> <param type="string" name="sessionIdGenerator" value="AppServerId"/> <param type="string" name="visitorIdGenerator" value="SessionfingerprintId"/> ... </params>
To enable visitor tracking on a selected site, add the lines in bold type below to global.xml
(nest them in the <root>
tag, as shown):
<root> <params site="sitename"> <param type="string" name="sessionIdGenerator" value="AppServerId"/> <param type="string" name="visitorIdGenerator" value="SessionfingerprintId"/> </params> <params host="default"> ...
Table 29-1 describes parameters for Sessionfingerprint
visitor tracking.
Table 29-1 Parameters for Sessionfingerprint
visitor tracking
Parameter | Description |
---|---|
sessionIdGenerator |
Specifies the ID generator that is used to identify sessions. Caution: The default value is |
visitorIdGenerator |
Specifies the ID generator that is used to identify a visitor to the site. Required value for this method:
|
|
Name of the site that is passed via the |
Using the cookie method, you can enable visitor tracking across all sites or within a selected site.
To enable the cookie method
To enable visitor tracking on all sites, add the lines in bold type below to global.xml
(nest them in the default <params> ... </params>
tag, as shown):
Note:
When using the code below, replace the sample values with values of your own. For parameter definitions, see Section 29.2.3, "Parameters for cookie-based visitor tracking."<params host="default"> <param type="string" name="visitorIdGenerator" value="CookieId"/> <param type="string" name="visitorIdCookieName" value="visid"/> <param type="string" name="visitorIdCookieMaxAge" value="31536000"/> <param type="string" name="visitorIdCookieDomain" value="firstsiteii"/> <param type="string" name="visitorIdCookiePath" value="/"/> <param type="string" name="visitorIdCookieSecure" value="false"/> ... </params>
To enable visitor tracking on a selected site, add the lines in bold type below to global.xml
(nest them in the <root>
tag, as shown):
Note:
When using the code below, replace the sample values with values of your own. For parameter definitions, see Section 29.2.3, "Parameters for cookie-based visitor tracking."<root> <params site="FirstSiteII"> <param type="string" name="sessionIdGenerator" value="AppServerId"/> <param type="string" name="visitorIdGenerator" value="CookieId"/> <param type="string" name="visitorIdCookieName" value="visid"/> <param type="string" name="visitorIdCookieMaxAge" value="31536000"/> <param type="string" name="visitorIdCookieDomain" value=".firstsiteii.at"/> <param type="string" name="visitorIdCookiePath" value="/"/> <param type="string" name="visitorIdCookieSecure" value="false"/> </params> <params host="default"> ...
Table 29-2 describes parameters for cookie-based visitor tracking.
Table 29-2 Parameters for cookie-based visitor tracking
Parameter | Description |
---|---|
sessionIdGenerator |
Specifies the ID generator that is used to identify sessions. Caution: The default value is |
visitorIdGenerator |
Specifies the ID generator that is used to identify a visitor to the site. Required value for this method: |
visitorIdCookieName |
Name of the cookie set on the client side. Example: |
visitorIdCookieMaxAge |
Age of the cookie in milliseconds. After this time, the cookie is invalid. (The value that you set is added to the current time.) Example: |
visitorIdCookieDomain |
Domain on which the cookie should be set. Example: Note: If you wish to set Example:
and change the http\://firstsiteii.at\:8081/sensor/statistic |
visitorIdCookiePath |
Sub-path on which the cookie should be set. Example: "/" |
visitorIdCookieSecure |
Specifies that the cookie will be sent via a secure channel, such as an SSL connection. Do not change the default value ( |
site |
Name of the site that is passed via the Example: |
Note:
Regarding the JSESSIONID cookie, this is managed by your application server's settings, application server administrator will enable secure cookies. For more information on Weblogic Server regarding enabling secure cookies see, Administration Guide for Oracle Identity Manager section.
For the CASTGC cookie, it can be made secure by setting 'p:cookieSecure=true' in <deployed>/cas/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml. During the Sites installation with HTTPS and using the HTTPS secure certificates as well as URLs the p:cookieSecure=true would be set. Once you have set your application server to use secure cookies you can verify that this flag is set to true in order to enable the secure attribute on the CASTGC cookie.