Adobe Analytics AppMeasurement for JS Tag Setup Guide
This article describes how to set up the Adobe Analytics AppMeasurement for JS tag in your iQ Tag Management account.
Tag Tips
- To use the Adobe Experience Cloud ID Service, add the Adobe Experience Cloud ID Service tag before adding this tag.
- Not all legacy H26 features are supported with the AppMeasurement tag.
- Ensure that you enter the server value correctly. For example, third party servers may have
112.2o7.net
or122.2o7.net
. - To use AppMeasurement for mobile, the Tealium Mobile SDK must be implemented in your application.
- For a list of supported plug-ins, see: Adobe: AppMeasurement Plug-ins Overview.
- For additional information, see: Adobe: Implement Adobe Analytics with AppMeasurement for JavaScript
Tag Configuration
Go to the Tag Marketplace and add the Adobe Analytics AppMeasurement for JS tag (learn more about how to add a tag).
After adding the tag, configure the following settings:
- Code Version
- The version of the
AppMeasurement.js
library.
- The version of the
- Device Type
- Select one of the following based on the platform of your implementation:
- Standard for desktop website installations.
- Mobile App for native mobile installations with Tealium for iOS or Tealium for Android.
- Select one of the following based on the platform of your implementation:
- Report Suite
- Required.
- Set a default value even when using mapping to dynamically set report suite.
- The default report suite to use. which may change based on the value set in the Dynamic Acct List.
- Reference AppMeasurement.js:
s.account
- Server
- Required.
- Data collection server.
- Reference AppMeasurement.js:
s.trackingServer
- For example,
metrics.tealium.com
ortealiumclient.122.2o7.net
- Server Secure
- Required.
- The
https
data collection server. - Reference AppMeasurement.js:
s.trackingServerSecure
- For example,
smetrics.tealium.com
ortealiumclient.122.2o7.net
- Auto Event Serialization Detection
- Automatically detect event serialization within trigger strings.
- Must be set to No if your event trigger value contains the colon character (
:
).
- Auto Link Tracking
- Default value is Yes and is the recommended selection.
- If set to No, must replicate the automatic link tracking using other methods, such as the Link Tracking Extension.
- Internal Link Filters
- A comma-separated list of your domains ,classified as internal, that is used to ensure that link clicks are not reported as exit clicks to Adobe report.
- Reference AppMeasurement.js:
s.linkInternalFilters
- For example,
tealium.com,tealiumiq.com
- Run clearVars
- Default value is No.
- Clears the props, eVars, and events set in the global S-Object after each tracking request.
- In the Data Mapping screen, use the
clearVars_in_RPTCallback
parameter to assign theclearVars
action to occur inside theregisterPostTrack
callback.
- S-Object Name
- Required.
- Default name is
s
. - Set a different name if you are running multiple instances of Adobe Analytics or AppMeasurement on the page.
- Namespace
- Optional.
- The visitor namespace.
- Only applies to third party cookies when Server and Server Secure end in
2o7.net
. - Reference AppMeasurement.js:
s.visitorNamespace
- Experience Cloud ID
- Optional.
- Your Adobe Experience Cloud ID.
- If using the Visitor API supported in versions 1.3.x and higher, enter your Enterprise Cloud ID here.
- For more information, see Adobe: Enterprise Cloud ID Service.
- Run Advertising Cloud Viewthrough
- Only available for version 2.17 and up.
- Load the Advertising Cloud Viewthrough file and send the viewthrough data.
- Viewthrough Interval
- Set the interval, in milliseconds, between each attempt to load the viewthrough script.
- Viewthrough Max Tries
- Set the maximum number of attempts to load viewthrough before running only analytics.
- Send Timestamp
- Allow a timestamp to be sent with each tracking call. Applies to mobile device tracking only.
- Decode Link Parameters
- Set to
false
to encode link tracking variables once. - Set to
true
to encode link tracking variables twice. - Default value is
false
. - For more information, see Adobe:
decodeLinkParameters
.
- Set to
Load Rules
Load Rules determine when and where to load an instance of this tag on your site.
Recommended load rule: All Pages.
Data Mappings
Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For instructions on how to map a variable to a tag destination, see data mappings.
The available categories are:
Standards
Variable | Description |
---|---|
adobe_org_id |
|
pageName |
|
channel |
|
server |
|
visitorID |
|
s_account |
|
linkTrackVars |
|
linkTrackEvents |
|
Combine Link Variables |
|
charSet |
|
collectHighEntropyUserAgentHits |
|
contextData.myvar |
|
contextData.namespace.myvar |
|
clearVars_in_RPTCallback |
|
Events
Mapping for events differs from mapping for the other destinations.
Use the following steps to map an event:
- Under Data Mappings, select your event variable from the Variables drop-down list.
- Click Select Destination and go to the Event Triggers category.
- In the Value field, enter the value of the variable being mapped.
This variable becomes the trigger string. - From the Trigger drop-down list, select the event you want to trigger.
You can click the plus icon (+) to add additional value/trigger combinations.
Destination Name | Description |
---|---|
Value |
|
Trigger |
|
Product-Level Events
SiteCatalyst provides 100 destinations for sending product-specific actions.
Destination Name | Description |
---|---|
PRODUCTS_event1 through PRODUCTS_event100 |
The product event to assign. |
Value Events
SiteCatalyst provides 100 destinations for sending value events.
Destination Name | Description |
---|---|
VALUE_event1 through VALUE_event100 |
The value event to assign. |
Props
SiteCatalyst allows you to use custom props, also called traffic variables.
Destination Name | Description |
---|---|
PRODUCTS_event1 through PRODUCTS_event100 |
|
SiteCatalyst allows you to use 75 custom props, also called traffic variables. Props contain data that is not meant to persist beyond a page view. If you want to correlate a prop with another variable, ensure both variables get set on the same page. Use events to hold certain numeric values when passed in the product string or being serialized.
Use the following steps to map custom destinations:
- Map a variable to any prop destination.
- In the text box at the top, enter your custom destination in place of the built-in destination you selected.
- Continue mapping other variables or click Done to finish.
eVars
Destination Name | Description |
---|---|
eVar0 |
|
eVar1 through eVar250 |
|
Merchandising eVars
Merchandising eVars allow you to associate a product with some value in addition to the category you specify in the products string.
Destination Name | Description |
---|---|
eVar0 |
|
PRODUCTS_eVar1 through PRODUCTS_eVar75 |
|
Commerce
Since the AppMeasurement tag is e-commerce enabled, it automatically uses the default E-Commerce Extension mappings. Manually mapping in this category is generally not needed unless you want to override any extension mappings or your desired e-commerce variable is not offered in the extension.
Several SiteCatalyst variables, including the Product String, are automatically populated by the E-Commerce extension. SiteCatalyst uses the Product String to capture product information, revenue, units sold, and other pieces of information around purchases. A standard Product string looks like this:
Best practices for the product string:
- The semicolon
;
is a standard separator for most items in the Products string. - Delimit multiple Merchandising eVars with a pipe (
|
) character. - Delimit multiple product instances with a comma (
,
). - The total price is the price per unit multiplied by the quantity. The E-Commerce extension’s total price (
_ctotal
) output does not automatically map to the Products string. - A SiteCatalyst best practice is to leave the Category empty because you cannot change the category for a product once it is set in SiteCatalyst. Tealium does; however, allow you to set the category at the time of the conversion if changing the category later is not a concern.
E-Commerce Destinations
The following e-commerce destinations are built into the toolbox:
Destination Name | Description | Ecommerce Extension Variable |
---|---|---|
purchaseID |
|
_corder |
transactionID |
|
N/A |
state |
|
N/A |
zip |
|
N/A |
Product IDs (array) |
|
_cprod |
Product Categories (array) |
|
_ccat |
Product Quantities (array) |
|
_cquan |
Product Prices (array) |
|
_cprice |
Other
Variable | Description |
---|---|
Link Tracking - doneAction param | (H25 only) |
List 1 | |
List 2 | |
List 3 |
Mobile
Variable | Description |
---|---|
App ID | (contextData.a.AppID ) |
Device Name | (contextData.a.DeviceName ) |
Operating System | (contextData.a.OSEnvironment ) |
Operating System Version | (contextData.a.OSVersion ) |
Carrier Name | (contextData.a.CarrierName ) |
Resolution | (contextData.a.Resolution ) |
Install Date | (contextData.a.InstallDate ) |
Launch Number | (contextData.a.Launches ) |
Days Since First Use | (contextData.a.DaysSinceFirstUse ) |
Days Since Last Use | (contextData.a.DaysSinceLastUse ) |
Installs | (contextData.a.InstallEvent ) |
Upgrades | (contextData.a.UpgradeEvent ) |
Launches | (contextData.a.LaunchEvent ) |
Crashes | (contextData.a.CrashEvent ) |
Previous Session Length | (contextData.a.PrevSessionLength ) |
Hour Of Day | (contextData.a.HourOfDay ) |
DayOfWeek | (contextData.a.DayOfWeek ) |
Days Since Last Upgrade | (contextData.a.DaysSinceLastUpgrade ) |
Launches Since Ugrade | (contextData.a.LaunchesSinceUpgrade ) |
Daily Engaged Users | (contextData.a.DailyEngUserEvent ) |
Monthly Engaged Users | (contextData.a.MonthlyEngUserEvent ) |
disable_wake_track |
|
disable_sleep_track |
|
send_timestamp |
|
timestamp |
|
Link Tracking
Variable | Description |
---|---|
linkType |
Link Type |
linkName |
Link Name |
Event Serialization Detection
The AppMeasurement tag automatically detects event serialization within the trigger values of your data layer. When the tag fires, the tag attempts to match the trigger string mapped in the Events tab with the trigger value in the data layer, checking to see if either trigger contains a colon.
- Event serialization detection: On
When event serialization detection is turned on (default setting), the tag detects the trigger value next to the colon and attempts to match the remaining string with your mapped trigger. If there is an exact match, the event is serialized. - Event serialization detection: Off
When event serialization detection is turned off, the tag does not detect colons. The tag attempts to match both trigger values in their entirety. This setting is highly recommended if your mapped trigger string contains a colon. Turning off event serialization detection is the only way to have an event correctly trigger on a value with a colon.
Whether event serialization detection is on or off, serials mapped directly via the Event Serialization tab always take precedence (see scenario 3 example).
This following scenarios help you understand how event serialization detection interprets a trigger value with and without a colon.
Throughout this section, the term “mapped trigger” refers to the value in the tag’s data mapping configuration and the term “data layer trigger” refers to the value found in the data layer of your website.
Example: Mapped trigger without a colon
As an example, if you want to trigger a prodView
event and serialize it when the page contains fireEvt
, you would do the following:
- Map the UDO variable
serial
toSERIAL_prodView
in the Event Serialization tab. - Map the UDO variable
trigger
toprodView
under Events. - Map
fireEvt
as the trigger string forprodView
.
There are many scenarios that could occur in your data layer.
Scenario 1: Data layer trigger is fireEvt
and the serial
value is empty
var utag_data = {
trigger: "fireEvt",
serial: ""
}
- Event serialization detection: On
The tag matchesfireEvt
with the mapped trigger and successfully firesprodView
on the page, however there is no serialization. - Event serialization detection: Off
Same result as above.
A successful network call looks like this:
Scenario 2: Data layer trigger is fireEvt:123
and the serial
value is empty
var utag_data = {
trigger: "fireEvt:123",
serial: ""
}
-
Event serialization detection: On
The tag serializes123
then matchesfireEvt
with the mapped trigger and successfully firesprodView
on the page.
-
Event serialization detection: Off
The tag fails to matchfireEvt:123
with your mapped trigger, as a resultprodView
does not fire on the page.
Scenario 3: Data layer trigger is fireEvt:123
and the serial value is 456
var utag_data = {
trigger: "fireEvt:123",
serial: "456"
}
- Event serialization detection: On
Initially, the tag serializes123
and matchesfireEvt
with your mapped trigger. ThenprodView
fires successfully and is serialized with456
instead of123
.
This happens because serial values detected by event serialization mapping (456
) take precedence over those detected by event serialization detection (123
).
- Event serialization detection: Off
The tag fails to matchfireEvt:123
with your mapped trigger. As a result,prodView
does not fire on the page.
Example: Mapped trigger with a colon
This example follows the same path as scenario 2, but the mapped trigger is fireEvt:123
instead of fireEvt
.
Scenario: Data layer trigger is fireEvt:123
var utag_data = {
trigger: "fireEvt:123",
serial: ""
}
- Event serialization detection: On
The tag serializes123
but fails to matchfireEvt
with your mapped trigger. As a result,prodView
does not fire on the page. - Event serialization detection: Of
The tag successfully matchesfireEvt:123
with your mapped trigger andprodView
fires successfully. For this reason we recommend turning off event serialization detection if your string contains a colon.
Advanced Configuration
Setting s.events
Tealium offers a function called u.addEvent()
to assist in setting the s.event
string. This method appends new values to the end of s.events
, which allows you keep all previously set events and add another event when needed. To use this method, add variable named sc_events
to your configuration.
Use the following steps to customize s.events
using u.addEvent
:
- Add a Set Data Values extension.
- Set the Scope to the Adobe Analytics tag.
- From the Set menu, select sc_events.
- From the To menu select JS Code.
- In the text field, enter:
u.addEvent("CUSTOM_EVENT")
WhereCUSTOM_EVENT
is the event you want to append to thes.events
string, such asevent10
. - To add multiple events in one step, pass an array to
u.addEvent
, as follows:
u.addEvent(["event1","event2","scView"]);
To add values directly in the string(s) passed to the function: u.addEvent(['event500=500', 'event501=' + b.demo_event_value]);
To add serializations directly in the string(s) passed to the function: u.addEvent("event78:" + b.booking_reference);
Supported Versions
The following code versions of AppMeasurement for JavaScript are supported:
- 2.26.0 bundled optimized
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.4
- 2.22.3
- 2.22.0
- 2.21.0
- 2.20.0
- 2.18.0
- 2.17.0
- 2.15.0
- 2.14.0
- 2.12.0
- 2.9.0
- 2.8.2
- 2.7.0
- 2.6.0
- 2.4.0
- 2.3.0
- 2.1.0
- 1.8.0
- 1.6.3
- 1.6.1
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.4.1
- 1.3.2
- 1.2.2
- 1.2.1
- 1.0.1
Release Notes
v2.23.0 Release Date September 23,
- Added support for high entropy user agent information.
v2.22.3 Released December 21, 2021
v2.20.0 Released March 5, 2020
- Updated IE detection to suppress JSLint warning to corrected a security-related issue.
v2.18.0 Released February 13, 2020
- AppMeasurement can now force cookies to include the Secure attribute by setting the
writeSecureCookies
variable. The entire client website must be severed securely using HTTPS to support this variable.
v2.17.0 Released August 23, 2019
- Added support for Baidu query string reordering.
- Corrected an issue that caused stale visitor values in hits that were queued while waiting for opt-in.
v2.15.0 Released July 15, 2019
-
Added ActivityMap scroll reach tracking to the Activity Map extension (AN-172949)
-
Added DIL 9.2 to AppMeasurement (AN-182472)
v2.9.0 Released May 24, 2018
Visitor API 3.0 or higher is required for customers using the Experience Cloud ID Service. Adobe recommends upgrading to the latest Visitor API version when associated code libraries are updated, such as at.js, AppMeasurement.js, etc.
- Updated AppMeasurement to use the updated Visitor interface for requesting IDs. (AN-151483)
- Corrected issue where link tracking cookie is being written after link tracking is turned off. (AN-156332)
- Corrected issue where
registerPreTrackCallback
andregisterPostTrackCallback
breaks callback function signature when called multiple times. (AN-158566)
v2.8.2 Released April 12, 2018
- Updated AppMeasurement to use the updated visitor interface for requesting IDs.
- Corrected issue with link tracking cookie.
- Reduce AppMeasurement default cookie lifetime from five (5) years to two (2) years.
- Supports Visitor API (aka Enterprise Cloud ID Service), version 3.1.2
v2.7.0 Released January 18, 2018
- Deprecates support for Internet Explorer (IE), versions 6 through 9.
- Includes DIL v7.00
- Supports Visitor API (aka Marketing Cloud ID Service), version 3.0
v2.6.0 Released November 9, 2017
- Fixed an issue where AppMeasurement library does not always set the correct account combination when
s_gl
is called. (AN-152153) - Inclusion of
dil.js
6.12 (Audience Manager module). - Supports Visitor API 2.5.0.
v2.3.0 Released August 22, 2017
- Fixed bug where
s.Util.getQueryParam
was capturing#
. - Included latest version of
dil.js
(v6.10). - Supports multiple AppMeasurement instantiation orders.
- Supports Visitor API (aka Marketing Cloud ID Service) version 2.2.0.
v2.1.0 Released May 11, 2017
- Supports AppMeasurement JavaScript 2.1.0
- Supports Marketing Cloud ID Service version 2.1.0
- Included latest version of
dil.js
. - Added support for
adobe_mc_ref
parameter which overrides the page referrer. - Added
mcorgid
parameter. - Added
cp
(customerPerspective) parameter.
v1.8.0 Released March 10, 2017
- Supports AppMeasurement JavaScript 1.8.0.
- Supports Marketing Cloud ID Service version 2.0.0.
- Added two call hooks:
s.registerPreTrackCallback
ands.registerPostTrackCallback
.
v1.6.3 Released August 23, 2016
- Fixed an issue where AppMeasurement prematurely terminated request connections.
- Fixed an issue causing AppMeasurement to call the wrong obfuscated method in the Visitor API.
- Fixed an issue causing the JavaScript error: “Attribute only valid on v:image”.
- Separated the Marketing Cloud ID support (aka Visitor API) into a new Tag called the Marketing Cloud ID Service Tag.
The Marketing Cloud ID Service Tag has to load before all other Adobe Tags (including AppMeasurement) in your profile. Without that, you’ll lose visitor tracking integrity. To load the tag first, enable the bundle setting on All Pages and load it before other Adobe tags.
View full Adobe AppMeasurement release notes.
v1.6.1 Released July 28, 2016
The following updates affect AppMeasurement’s Events, Value Events, and Event Serialization:
- Added a new Event Serialization mapping tab in the Data Mapping toolbox.
- Added a new drop-down list in the AppMeasurement Tag configuration for turning ON/OFF Event Serialization
v1.6.1 Released July 14, 2016
- Added new version 1.6.1
- Supports Visitor API versions 1.5.7 and 1.5.6
- Improved mechanism for handling link click tracking in Firefox.
View full Adobe AppMeasurement release notes.
Vendor Documentation
This page was last updated: October 1, 2024