Visitor identification using AppMeasurement
AppMeasurement is Adobe Analytics’ legacy JavaScript library for data collection. While AppMeasurement by itself offers a native way to identify visitors, many modern browsers reject the cookies that it attempts to set. Adobe strongly recommends using the Adobe Experience Cloud Visitor ID Service in all implementations to conform to modern browser privacy standards. All versions of AppMeasurement come bundled with VisitorAPI.js
, the JavaScript library used to implement the Visitor ID Service.
Identifying visitors using the Visitor ID Service (recommended)
Use this section to create a basic integration between Adobe Analytics and the Visitor ID Service. Ensure that you are prepared with the following:
-
Download the Latest version of AppMeasurement. The downloaded library includes both
AppMeasurement.js
andVisitorAPI.js
. -
A development Report suite ID.
-
The desired domain for
trackingServerSecure
. -
Your IMS org ID:
- Log in to experience.adobe.com using your Adobe ID credentials.
- Anywhere in the Experience Cloud interface, press
[Cmd]
+[I]
(iOS) or[Ctrl]
+[I]
(Windows). - A User data debugger appears. Select the Assigned orgs tab.
- Expand the desired IMS organization.
- Locate the ID field.
Once you have the above resources, see the following basic example page containing the minimum required calls to send data to Adobe Analytics:
<html>
<head>
<title>Example AppMeasurement implementation page</title>
<script src="AppMeasurement.js"></script>
<script src="VisitorAPI.js"></script>
</head>
<body>
<h1>Hello world!</h1>
<script>
var s = s_gi("examplersid"); // Include development report suite ID here
s.trackingServerSecure = "example.data.adobedc.net"; // Include edge domain here
s.visitor = Visitor.getInstance("ADB3LETTERSANDNUMBERS@AdobeOrg"); // Include IMS org ID here
s.pageName = document.title;
s.t();
</script>
</body>
</html>
Visitor
to a custom variable:code language-js |
---|
|
Identifying visitors using the s_vi
cookie (Not recommended)
If your organization does not use the Visitor ID Service, AppMeasurement uses its own form of visitor identification. When a visitor arrives to your site for the first time, the library checks for a s_vi
cookie. This cookie is set at the domain matching trackingServerSecure
(for HTTPS) or trackingServer
(for HTTP).
- If you participate in the Managed certificate program, your tracking server would typically be a first-party domain, making
s_vi
cookies first-party. - If you do not participate in the managed certificate program, tracking server is typically a subdomain of
adobedc.net
,omtrdc.net
, or2o7.net
, making thes_vi
cookie a third-party cookie. Due to modern browser privacy practices, third-party cookies are rejected by most browsers. Once rejected, AppMeasurement attempts to set a first-party fallback cookie (fid
) instead.
If you correctly set trackingServerSecure
, then no further visitor identification measures are required.
Identifying visitors using visitorID
(Not recommended)
Using the visitorID
variable allows your organization complete independent control identifying visitors. If you use visitorID
, note the following limitations:
-
Every hit must contain the same
visitorID
value to be counted as a single visitor.- Any hits that omit
visitorID
automatically attempt to use another visitor identification method, treating them as a separate visitor. - Any hits that contain a different
visitorID
value from a previous hit are treated as a separate visitor. - Adobe does not offer any way to stitch hits using different visitor IDs together.
- Any hits that omit
-
Shared audiences, Analytics for Target, and Customer attributes are not supported with visitors identified using
visitorID
.
See visitorID
for implementation instructions using this variable.