Adobe Analytics Implementation Guide
Adobe Analytics Implementation Guide
Contents
Adobe Analytics Implementation..................................................................................6
Popular Implementation Links.......................................................................................................................7
Release Notes..............................................................................................................................................7
Analytics Basics.............................................................................................................8
Alerts.............................................................................................................................................................8
Analytics Code..............................................................................................................................................8
Classifications...............................................................................................................................................9
Conversion Variables (eVar)........................................................................................................................10
Data Collection...........................................................................................................................................10
Code Manager............................................................................................................................................13
Data Layer..................................................................................................................................................14
Events.........................................................................................................................................................14
Metrics........................................................................................................................................................14
Processing Rules........................................................................................................................................15
Reports and Report Suites.........................................................................................................................16
Segments....................................................................................................................................................17
Traffic Props and Conversion eVars............................................................................................................17
Comparing Props and eVars.......................................................................................................................18
Using Props as Counters............................................................................................................................20
Counting Content Hierarchies.....................................................................................................................21
What is a Predefined Event?......................................................................................................................21
What is a Custom Event?...........................................................................................................................23
Hash Collisions...........................................................................................................................................23
Frequently Asked Questions about Analytics Implementation................................25
Prepare to Implement Analytics..................................................................................28
Business Requirements Document............................................................................................................28
Business Governance Questionnaire.........................................................................................................28
Technical Questionnaire.............................................................................................................................29
Technical Specification...............................................................................................................................29
Review Website or Application....................................................................................................................29
Dashboard Creation....................................................................................................................................31
Choose an Implementation Method............................................................................33
Getting Started with Analytics Implementation...........................................................................................33
Implementing Analytics with Dynamic Tag Management..........................................37
Create Web Property..................................................................................................................................37
Configure Hosting Options..........................................................................................................................39
Add Header and Footer Code.....................................................................................................................40
Verify Header and Footer Code..................................................................................................................42
Add Adobe Analytics Tool...........................................................................................................................42
General.......................................................................................................................................................45
Library Management...................................................................................................................................46
Global Variables..........................................................................................................................................48
Page Views and Content.............................................................................................................................48
Link Tracking...............................................................................................................................................49
Referrers and Campaigns...........................................................................................................................50
Cookies.......................................................................................................................................................50
Customize Page Code................................................................................................................................51
Frequently Asked Questions About the Adobe Analytics Tool....................................................................51
Create a Data Element...............................................................................................................................52
Manually implement Adobe Analytics (legacy)...........................................................................................53
Create New Rule.........................................................................................................................................55
Create Conditions for Event-Based Rules..................................................................................................55
Create Conditions for Page-Load Rules.....................................................................................................58
Create Conditions for Direct-Call Rules......................................................................................................60
Set Up Actions for the Condition to Trigger.................................................................................................60
Test Unpublished Rules for Akamai Hosting...............................................................................................63
iii
getPercentPageViewed.............................................................................................................................215
getPreviousValue......................................................................................................................................218
getQueryParam.........................................................................................................................................219
getTimeParting.........................................................................................................................................221
getValOnce...............................................................................................................................................223
getVisitNum..............................................................................................................................................224
performanceTiming...................................................................................................................................226
trackTNT...................................................................................................................................................229
Pathing......................................................................................................................................................229
Enabling Pathing on a prop.......................................................................................................................230
Pathing by Campaign or Tracking Code....................................................................................................230
Reasons Pathing may not be Recorded...................................................................................................231
Moving from Section to Section................................................................................................................231
Moving from Page Template to Page Template.........................................................................................231
Segmenting Paths by User Type...............................................................................................................231
Purchase Events.......................................................................................................................................232
Event Serialization....................................................................................................................................233
Methods of Event Serialization.................................................................................................................233
Identifying Unique Visitors........................................................................................................................235
Custom Visitor ID......................................................................................................................................236
Marketing Cloud ID Service......................................................................................................................236
Analytics Visitor ID....................................................................................................................................237
Fallback ID Methods.................................................................................................................................237
Identifying Mobile Devices........................................................................................................................238
Cross-Device Visitor Identification............................................................................................................239
Connecting Users Across Devices............................................................................................................239
Data Impact of Cross-Device Visitor Identification....................................................................................241
Example Visit............................................................................................................................................241
Visitors......................................................................................................................................................241
Visits.........................................................................................................................................................242
Create Segments......................................................................................................................................243
Geo-Segmentation Data...........................................................................................................................243
Attribution and Persistence.......................................................................................................................243
Visitor Migration........................................................................................................................................244
Using Timestamps Optional......................................................................................................................245
Redirects and Aliases...............................................................................................................................249
Analytics and Redirects............................................................................................................................249
Implementing Redirects............................................................................................................................250
Testing and Validation................................................................................................253
Testing and Validation Process.................................................................................................................253
Identifying the s_account Variable in the DigitalPulse Debugger..............................................................253
JavaScript JS File.....................................................................................................................................253
Code Modifications...................................................................................................................................254
Variables and Values.................................................................................................................................254
Custom Variables......................................................................................................................................255
Implementation Acceptance.....................................................................................................................255
Data Accuracy Validation..........................................................................................................................256
Adobe Debugger.......................................................................................................................................257
Adobe Debugger Installation.....................................................................................................................257
Launching DigitalPulse Debugger.............................................................................................................258
Packet Analyzers......................................................................................................................................259
NS_Binding_Aborted in Packet Monitors..................................................................................................260
Common Syntax Mistakes........................................................................................................................260
Putting Analytics Code in the Head Tag....................................................................................................260
Using s.linkTrackVars and s.linkTrackEvents............................................................................................262
Common Mistakes in the Products Variable.............................................................................................262
Setting the PageType Variable Correctly...................................................................................................264
Using White Space in Variable Values......................................................................................................264
Using Quotes............................................................................................................................................265
Replacing Your Analytics Code.................................................................................................................265
Table of Common Syntax Mistakes...........................................................................................................266
Vulnerability Scanner................................................................................................................................266
v
Adobe Analytics Implementation
Navigation title:
This guide describes how to implement Adobe Analytics.
New Users
If you are new to Adobe Analytics, you can quickly create your first Analytics report suite (data repository)
using the Getting Started with Adobe Analytics guide. Then, you can deploy Analytics code using Dynamic Tag
Management.
Dynamic Tag Management allows you to manage your Adobe Analytics implementation without needing to
make changes to your site every time. If you're implementing a Mobile app, you can get the SDK that you need
to begin collecting valuable data from your apps.
Installation Roadmap
Choose an implementation
Common ways to implement Analytics include:
method.
• Implementing Analytics with Dynamic Tag Management on page 37
This guide contains Analytics-specific information to guide you through a Dynamic Tag
Management implementation.
This guide contains a description of data collection variables and details on implementing data
collection code in JavaScript, including video.
• Analytics SDKs
Release Notes
Navigation title:Release Notes
Release notes can be found at the following locations:
• Marketing Cloud - All Solutions
• AppMeasurement Libraries - All Platforms
7
Analytics Basics
Learn about the basics of Analytics, including terms, what's in the code, and how data is collected.
Alerts
Navigation title:Alerts
Intelligent Alerts let you create and manage alerts in Analysis Workspace, complete with alert preview and rule
contribution.
You can
• Build alerts based on anomalies (90%, 95%, or 99% thresholds; % change; above/below).
• Preview how often an alert will trigger.
• Send alerts by e-mail or SMS with links to auto-generated Analysis Workspace projects.
• Create "stacked" alerts that capture multiple metrics in a single alert.
You can access this new Alerts system from More > Alerts in any report in Reports & Analytics.
See Alerts in the Reports and Analytics Help.
Analytics Code
Navigation title:Analytics Code
Data is sent to a report suite to display in reporting. The easiest and most common way to send data to Analytics
is by using the DTM implementation. You can also enter the code with the JavaScript implementation.
For information about using Dynamic Tag Management to create the header and footer code for you, see Add
Header and Footer Code on page 40.
Here is an example of AppMeasurement JavaScript file, showing the code parts:
9
For more details, see:
• Classifications in the Analytics Help and Reference guide
Important: When implementing Analytics, it is important to know which eVars you will use, and how
many. You should also understand how to configure those eVars in the Admin Console. For detailed
information about eVars, see Conversion Variables (eVar) in the Analytics Help and reference
documentation.
An eVar can be visit-based and function similarly to cookies. Values passed into eVar variables follow the user
for a predetermined period of time.
When an eVar is set to a value for a visitor, Adobe automatically remembers that value until it expires. Any
success events that a visitor encounters while the eVar value is active are counted toward the eVar value.
Note: Only a single value can be stored in an eVar in an image request. If multiple values are desired in
an eVar value, we recommend that you implement List Variable on page 142 (list vars).
Data Collection
Navigation title:Data Collection
Learn how visits to your web site become a report in Adobe Analytics.
Adobe has created multiple ways to send data into Analytics. These methods include tracking information in
real-time from:
• Applications that can access the Internet
• Campaigns
• Client-server applications
• Emails
1. When a visitor comes to your site, a request is made to your web server.
2. Your site's web server sends the page code information, and the page displays in the browser.
The JavaScript code sends an image request to the Adobe server, passing the variables, metrics, and page
data that you defined in your implementation.
Example JavaScript Code: The JavaScript code is placed within the body tags of a web page:
11
Example Image Request: A snippet of an image request with the page name outlined:
Note: Each image request contains a random number string to prevent browser caching and ensure
that subsequent image requests are made by the browser.
The code automatically collects additional details (such as operating system, browser type, browser height
and width, IP address, and browser language).
5. Adobe servers store web analysis data in report suites (your data repository).
A report suite defines the complete, independent reporting on a chosen website, set of websites, or subset of
web pages.
6. Report suite data populates the reports that you can access in a web browser.
Example report:
Code Manager
Navigation title:Code Manager
Code manager lets you download data collection code for web and mobile platforms.
Analytics > Admin > Code Manager.
After you download the library, you must configure the code to send data to the correct tracking server and report
suite. Additional implementation resources are available at Developer & Implementation.
13
Code Manager Page Descriptions
Column Description
Name The name matches the platform where you want to enable data collection. Native libraries are provided
for each platform listed in this column.
Version List the latest version of the library. Click the version number to view the release history.
Data Layer
Navigation title:Data Layer
A "data layer" is a framework of JavaScript objects that developers insert into pages. The data layers can be used
by tracking tools (including tag management systems like Dynamic Tag Management) to populate reports.
Implementing a data layer on your site provides ultimate control and flexibility over your implementation and
allows easiest maintenance in future phases. The names of these JavaScript objects are theoretically arbitrary,
but the best practice is to use something consistent and predictable. The developers may already have a data
layer, or a preference for the format. There are few different standards the tracking community has created as a
starting point. The Data Layer for Analytics Implementation specification document uses the W3C standard
"digitalData" object that is accepted by the widest variety of tracking technology, in case there is a need to use
the data layer for more than this DTM implementation.
Events
Navigation title:Events
Events keep track of when a visitor has performed a specified action.
An event should be considered a milestone within a site. Success events are most commonly populated on the
final confirmation page of a process, such as a registration process or newsletter sign-up.
Common types of events include:
• Success events
• Currency events
• Custom events
For detailed information, refer to Configure Events on page 136.
Success events are described in detail in the Analytics Help and Reference.
Metrics
Navigation title:Metrics
Traffic metrics Page View: One Web page load in a user’s browser (one execution of the Reports &
Analytics code).
Visit: Any number of page views when visitor comes to your site. A visit ends after
30 minutes of inactivity.
Unique Visitor: A person visiting your site for the first time during a given time frame,
such as Hour, Day, Week, Month, Quarter or year. (This also includes Unique Visitors
for any time frame.)
Conversion metrics These show data about success events, such as purchases, downloads, or any other
action that you want users to take on your website.
Video metrics Analytics provides support for tracking a number of video metrics, including total
views, time spent, and completion rates.
Social metrics You can measure your brand's presence on the social web. Social metrics work with
Analytics standard metrics. By combining these with calculated metrics, you can view
a report that shows how often a product is mentioned, gauge product sentiment, and
see how Social metrics correlate with Analytics key performance indicators.
Calculated metrics Calculated metrics enable you to combine metrics to create mathematical operations
that are used as new metrics. These metrics can be created for a report to which you
add metrics. Administrators can create calculated metrics for all users of a report suite.
Processing Rules
Navigation title:Processing Rules
Processing rules simplify data collection and manage content as it is sent to reports.
Processing rules help simplify interaction with IT groups and Web developers by providing an interface to:
• Set an event on the product overview page
• Populate campaign with a query string parameter
• Concatenate category and page name in a prop for easier reporting
• Copy an eVar into a prop to see paths
• Clean up misspelled site sections
• Pull internal search terms or a campaign ID from the query string into an eVar
For details about processing rules, see:
• Processing Rules in the Analytics Help and Reference guide
• Create New Rule on page 55 in this help documentation
• Getting Started with Marketing Channels in the Marketing Channels documentation
• VISTA Rules in the Analytics Help and Reference guide
• Bot Rules in the Analytics Help and Reference guide
15
Reports and Report Suites
Navigation title:Reports and Report Suites
A report suite defines the complete, independent reporting on a chosen website, set of websites, or subset of
web pages. Usually, a report suite is one website, but it can be a global segment where you have combined
several sites' numbers to get totals. When you log in to the marketing reports, ad hoc analysis, and report builder,
you select one report suite to use (except when you use roll-ups that combine report suites).
Reports provide information about the data collected by Analytics, based on specific parameters.
You can run an Analytics report after implementing Adobe Analytics. Reporting provides insights into your
traditional web-based channels as well as evolving channels like mobile, video, and social networking. Some
examples of marketing reports include:
• How many people visit your site
• How many of those visitors are unique visitors (counted only once)
• How they came to the site (such as whether they followed a link or came there directly)
• What keywords visitors used to search site content
• How long visitors stayed on a given page or on the entire site
• What links visitors clicked, and when they left the site
• Which marketing channels are most effective at generating revenue or conversion events
• How much time they spent watching a video
• Which browsers and devices they used to visit your site
High-level report types include:
• Traffic: Gives you in-depth insight into how visitors interact with your website, and your customized traffic
statistics.
• Conversion: Displays information about success indicators that you define.
• Paths: Enable you to track and record entire browsing paths of visitors.
You can use Analysis Workspace to remove the typical limitations of a single Analytics report. It provides a
robust, flexible canvas for building custom analysis projects. Drag-and-drop any number of data tables,
visualizations, and components (dimensions, metrics, segments, and time granularities) to a project. Instantly
create breakdowns and segments, create cohorts for analysis, create alerts, create segments, and curate reports
for sharing with anyone in your business.
See Also
• Reports and Analytics help
• Real-Time Reports
• Adobe Report Builder help
• Data Extracts in the Reports and Analytics help
• ClickMap in the Reports and Analytics help
• Activity Map in the Reports and Analytics help
• Report Suite Manager
Segments
Navigation title:Segments
Segments are custom subsets of data, or data filtered by rules that you create.
Segments are based on:
• Hits
• Visitors
• Visits
For information about using segments for cross-device visitor identification, see Create Segments on page 243.
For in-depth information on Adobe Analytics Segmentation, please refer to the Segmentation Guide.
Props are used in pathing reports or in correlation reports. For example, property variables can be used to show
content type, sub-section, or template name. The resulting Custom Traffic reports show which content type,
sub-section, or template is viewed most often.
There are endless business questions that can be answered through the custom traffic variables, depending on
what you are capturing from your website. The following list contains a few common goals and objectives:
17
• Understanding user navigation through the website
• Understanding internal user search behavior
• Segmenting traffic by navigation or category
• Segmenting visitor behavior by demographics
eVars (or Custom Conversion Insight variables) are used to identify how well specific attributes or actions
contribute to success events on your site. For example, for a media site, eVars may be used to identify how well
internal promotions bring visitors to register. When a visitor clicks on the internal promotion, an eVar can be
used to store a unique identifier for that promotion. When the same visitor completes registration and a custom
success event is fired, the original unique identifier receives credit for the registration event.
In a conversion site, eVars may be used to track how logged-in visitors compare to non-logged in visitors in
completing a purchase. When a visitor logs in, an eVar is set to "logged in." When that visitor reaches the
checkout page, the checkout event is attributed to the "logged in" value. When a visitor reaches the Thank You
page after purchasing, the products and purchase amounts are attributed to the "logged in" value. The resulting
Custom eVar report shows the total number of checkouts and orders for "logged in" and "non-logged in" visitors.
For additional information, see Traffic Variable in the Analytics Help and Reference.
For information about setting up properties in Digital Tag Management, see Create Web Property on page 37.
Bounce Rate
Bounces
Calculated Metrics
Entries
Exits
Instances
Page Views
Participation Metrics
Purchase Metrics
Reloads
Single Access
Unique Visitors
Visits
• Breakdowns: Props use correlations, which display page views for other traffic variables fired in the same
image request. eVars use subrelations, which provide a breakdown on other conversion variables in relation
to success events.
19
Exclusive advantages to Props or eVars
With the release of version 15, the capabilities between Props and eVars are much less distinct. eVars have
recently been updated to include capabilities such as visits/unique visitors with minimal processing load, as well
as pathing metrics.
Props hold a couple advantages of eVars, some of which can be circumvented:
• Prop data is collected and available in reporting almost instantly. eVars can take upwards of 30 minutes to
appear in report suite data.
• All Props can have flowchart-like reports enabled, which let you see the path visitors take to your site. These
pathing flow reports are available for both Props and eVars in Ad Hoc Analysis.
• Props can be correlated multiple levels, where eVars can only be subrelated once. This limitation can be
mitigated by using segmentation, giving identical data as correlations.
• Participation metrics allow you to see what prop values participated before a success event.
eVars on the other hand hold several advantages over the limited nature of Props:
• eVars can use success events as metrics. Props cannot.
• eVar expiration can be customized, including having an expiration of every hit (no persistent values whatsoever).
Props don't persist in any way.
Pathing metrics, such as Total Time Spent, Entries, and Exits, were originally not available for eVars. However,
recent updates have made these metrics available, increasing the value of eVars.
Which to Use
Props: If latency is the largest concern, and you intend to only measure traffic (not success events) with this
dimension.
eVars: If data breakdowns and relationships are the largest concerns.
Tip: If you don't want an eVar to persist, you can change its expiration to 'hit' so it doesn't keep any data
beyond the hit.
As visitors come to your site and visit the pages containing the Real Player or Windows Media Player, Analytics
is able to segment the users based on which pages they visited. The Custom Traffic report then shows the
number of visits to each page.
Correlations
Pathing
Page View
Unique Visitors
Classifications
scOpen Success event occurs any time a visitor opens a shopping cart for the
first time.
scAdd Success event occurs any time a product is added to a shopping cart.
21
scRemove Success event occurs any time an item is taken out of a shopping
cart.
When one of the predefined events above occurs, an instance of the event is incremented. You can view the
metrics related to the event in several different reports. See below for an example of the code used to configure
predefined events.
s.events="scAdd"
s.events="scOpen,scAdd"
• In the first example above, scAdd is the value of the event. Any time an item is added to the shopping cart, the
event is incremented.
• In the second example, two values are captured at the same time. When multiple success events occur on the
same page, each event is incremented.
Note: While prodView is treated in implementation like an event, it does not have the same flexibility in
the interface. The prodView event is an instance of the product and is only available in the products report.
Adobe recommends you use a custom event in addition to the prodView event. This way, you can see the
product view metrics alongside other metrics in other conversion reports.
Note: The products string syntax must begin with a semicolon. This is a legacy syntax requirement. It
was previously used to delimit the category and product, but that creates a limitation within the interface
should you ever want to change how you are classifying products. For the maximum flexibility in your
reporting, it is best to leave this blank and use Classifications to set up categories.
Confirmation Page
s.events="purchase"
s.products=";SKU"
When the products variable is set in conjunction with the purchase event, the purchase quantity and total purchase
price are included in the products value as shown above.
Hash Collisions
Navigation title:Hash Collisions
Describes what a hash collision is and how it can manifest.
By default, Adobe treats prop and eVar values as strings, even if the value is a number. Sometimes these strings
are hundreds of characters long, other times they are short. To save space, improve performance, and make
everything uniformly sized, the strings are not used directly in the processing tables. Instead, a 32-bit or 64-bit
hash is computed for each value. All reports run on those hashed values until the data is presented, where each
hash is replaced by the original text. Without this compression, reports would likely take minutes to run.
For most fields, the string is first converted to all lower case (reducing the number of unique values). Values are
hashed on a monthly basis (the first time they are seen each month). From month to month there is a small
possibility that two unique variable values will be hashed to the same hash value. This is known as a hash
collision.
Hash collisions can manifest in reporting as follows:
• If you are trending a value and you see a spike for a month, it is likely that another values for that variable got
hashed to the same value as the value you are looking at.
• The same things happens for segments for a specific value.
Hash Collision Example
The likelihood of hash collisions increases with the number of unique values in a dimension (eVar). For example,
one of the values that come in late in the month could get the same hash value as a value earlier in the month.
The following example may help explain how this can cause segment results to change. Suppose eVar62 receives
"value 100" on February 18. Analytics will maintain a table that may look like this:
eVar62 String Value Hash
Value 99 111
23
eVar62 String Value Hash
If you build a segment that looks for visits where eVar62="value 500", Analytics determines if "value 500"
contains a hash. Because "value 500" does not exist, Analytics returns zero visits. Then, on February 23, eVar62
receives "value 500", and the hash for that is also 123. The table will look like this:
eVar62 String Value Hash
Value 99 111
When the same segment runs again, it looks for the hash of "value 500", finds 123, and the report returns all
visits that contain hash 123. Now, visits that occurred on February 18 will be included in the results.
This situation can create problems when using Analytics. Adobe continues to investigate ways to reduce the
likelihood of these hash collisions in the future. Suggestions to avoid this situation are to find ways to spread
the unique values between variables, remove unnecessary values with processing rules, or otherwise reduce the
number of values per variable.
How do I manage Analytics For information about managing users and groups, refer to User Management in the Adobe Analytics
users and groups? help.
eVar Expiration - Why are the Expire After specifies a time period, or event, after which the eVar value expires (no longer receives
eVars getting attributed to credit for success events). If a success event occurs after eVar expiration, the None value receives credit
‘None’ in the reports? for the event (no eVar was active). If you select an event as an expiration value, the variable expires only
if the event occurs. If the event does not occur, the variable never expires. More...
Custom Event Visibility - Why In the Visibility column, you can hide standard (built-in) metrics, custom events, and built-in events in
do Custom Events not appear in the Menu, Metric Selectors, Calculated Metrics Builder, and the Segment Builder. This setting does not
the reports menu? impact the data collection for that metric or event; it affects only its visibility in the user interface. More...
Timestamps - What do I need to Using the Timestamps Optional feature, you can combine non-timestamped data with timestamped data
consider before changing without incurring data loss. Offline data with timestamps generated from a mobile device can be combined
timestamp settings? with live, non-timestamped data from a web page—or integrated with data from any platform using a
client-side timestamp call. More...
Visitor ID - How does the If you have multiple JavaScript files that are sending data to the same report suite, or if you are using
Visitor ID grace period work other technologies on your site such as Flash video measurement, we recommend configuring a grace
and how is it enabled? period. More...
Visitor ID - What is the The Marketing Cloud ID service assigns a unique, persistent identifier to all your site visitors. With this
difference between the ID, visitors and their data can be shared among other solutions in the Marketing Cloud. Also, this ID can
Marketing Cloud Visitor ID and replace or work with solution-specific IDs such as the Analytics Visitor ID. More...
the Analytics Visitor ID?
Visitor ID - How is the Visitor If the standard s_vi cookie is unavailable, a fallback cookie is created on the domain of the website with
ID set if cookies are blocked? a randomly generated unique ID. This cookie, named s_fid, is set with a 2-year expiration and is used
as the fallback identification method going forward. More...
Dynamic Tag Management - If your event-based rule does not fire, then there is likely an issue with the selector or condition of the
Why does my DTM rule not rule. Locate the element on your site where the desired event action occurs, right click and select Inspect
fire? element. Inspect the highlighted script in the box that opens and ensure you are targeting the correct
element. More...
How do I implement Heartbeat This section contains instructions on downloading the video heartbeat SDKs and developer guides for
Video Tracking? your platform. Make sure you also download the developer guide that is in the docs folder when you
download the SDK as it contains the specific implementation instructions for video heartbeat.
The cookieDomainPeriods variable determines the domain on which the Analytics cookies s_cc and s_sq
How do I add cookies to the
are set by determining the number of periods in the domain of the page URL. This variable is also used
right subdomain?
by some plug-ins in determining the correct domain to set the plug-in's cookie.s.cookieDomainPeriods
on page 113
Tracking Server - How do I When you configure an implementation to send data to Adobe Analytics servers, you must send it to the
correctly populate my tracking correct location. Failure to do so causes inflated visitor counting or data loss. More...
server?
25
Performance - Can a failure to No. The JavaScript file is not hosted on Adobe servers, so an Adobe outage will not affect the JavaScript
load the external Adobe execution. If dynamic tag management is employed, the JavaScript file is hosted by Akamai, or on a
JavaScript, whether due to server location determined by customers.
internet connection, proxy,
See Will Dynamic Tag Management reduce my website's performance? at the Dynamic Tag Management
firewall, or service interruption
FAQ.
at Adobe, affect performance?
Additionally, you can host your own core dynamic tag management file if you are not comfortable relying
on Akamai's CDN. See Embed Code and Hosting Options.
Performance - Can the loading The JavaScript file is cached in the visitor's browser after it is initially loaded, and is typically downloaded
of the external Adobe JavaScript no more than once per session. The file is not downloaded on each page, even though it is used by every
cause a reduction in page on the site. On most web sites, users average more than a few page views per session, so transferring
performance? JavaScript that is used multiple times into this file can result in less overall downloaded data.
JavaScript for AppMeasurement Compression: If you are concerned about the page weight (size) of
Adobe's JavaScript client, Adobe recommends that you consider compressing the file using GZIP. GZIP
is supported by all major browsers and offers better performance than JavaScript compression to compress
and decompress the core s_code.js JavaScript file.
Performance - Can the sending The Adobe JavaScript file creates an image object within the HTML page, and the browser then requests
of data from the browser to the image object from Adobe servers. If the Adobe servers were to be slow or unresponsive, the thread
Adobe services reduce handling that request would be delayed until the image returns or a timeout occurs. Because browsers
performance? handle images with multiple threads, an Adobe outage would have a minimal impact on the page load
time, tying up one thread while the others continue to function.
How can I change collected Use processing rules to simplify data collection and manage content as it is sent to reporting. learn more
data, based on defined
conditions of my own?
Which is the latest version of This section contains a release history for AppMeasurement libraries across web and mobile platforms.
s_code file? The latest version of each library can be downloaded in Reports & Analytics > Admin Tools > Code
Manager. learn more
How do I debug s_code file? The Adobe Debugger (previously DigitalPulse Debugger) is a free tool provided by Adobe that lets you
view the data being collected from your site on any given page. learn more
How do I track different link File downloads and exit links can be automatically tracked based on parameters set in the AppMeasurement
types? for JavaScript file. learn more
How do I track video ? JavaScript can be used to track a wide variety of players. To track using JavaScript, you add code to the
web page that contains your player and track the player using event handlers. learn more
How do I track a mobile App? Acquisition links with unique tracking codes can be generated in Adobe Mobile services. When a user
downloads and runs an app from the Apple App Store after clicking on the generated link, the SDK
automatically collects and sends the acquisition data to Adobe Mobile services. iOSAndroid
How do I implement video You can track media players by creating functions attached to the video player event handlers This lets
tracking? you call Media.open, Media.play, Media.stop, and Media.close at the appropriate times. learn more
How do I set up the First Party Analytics uses cookies to provide information on variables and components that do not persist between
Cookie? image requests and browser sessions. These harmless cookies originate from a domain hosted by Adobe,
known as third-party cookies. learn more
How do I get an SSL certificate? Determine whether your site uses https:// protocol. If it does, requesting a CSR and purchasing an SSL
certificate is required. Note: An SSL certificate is not required if you do not have any secure pages or
content. This entire step may be skipped if you use only http:// protocol on your site. learn more
Where do I find information SSL certificates expire each year, meaning that Adobe requires an updated certificate request each time
about the certification expiration this happens. The FPC specialist provides sufficient warning when this occurs, however, it is recommended
notice? to be proactive in monitoring the expiration and providing Adobe with this updated certificate. learn
more
Information about data insertion Adobe has created multiple ways to send data into Analytics. learn more
API?
What is a 500 error? Information about the internal server error which caused a "500 Query Error" status. Insight query
APIpageType variable
27
Prepare to Implement Analytics
Navigation title:Prepare to Implement Analytics
There are tasks you should complete and information you should gather when preparing to implement Analytics.
The information and documents in this section are gathered directly from Adobe Consulting. Following these
guidelines and filling out the provided questionnaires will help you implement Analytics, whether you implement
by yourself or work with Adobe Consulting (recommended).
If you are working with an Adobe Consultant, it is not required that you know the information in these documents
before implementing Analytics. However, being familiar with the documents Consulting will create and the
questions they will ask can help to speed the pre-implementation process.
Technical Specification
Navigation title:Technical Specification
Your Adobe Consultant will discuss the technical specifications of your implementation with you.
It can be useful for you to be familiar with the content of the Technical Specifications document used by
Consulting, although it is not required for you to know this information if you are working with a Consultant.
This document is used as the standard guide for deploying Adobe Analytics on a given site. The document is
divided into different sections, each of which describes a different component of the overall Analytics solution.
The industry specific Tech Specs cover the fundamental solutions and can be leveraged as a starting point for
creating a more complete document.
29
Prerequisites
It is important to work with your implementation consultant to provide a good understanding of your business
and the overall objective of your site or application. Some of the places best suited to give some background
information are:
• Contract/Pre-Kick-off call with Sales Team
• Company website (For example, the About and News pages)
• Review Industry vertical playbook & related resources
• Review important concepts in Wikipedia (such as Revenue, Affiliates, and Competitors)
• review Play Store and App Store descriptions and reviews
Key Stakeholders
Adobe:
• Implementation Consultant
• Business Consultant
• Solution Architect
• Project Manager
Client:
• Site Master
• Business Lead
• Technical Lead
Key Outcomes
The following information should be known following the webite or app review:
Business:
• Purpose and the reason why the site exists
• Strategic importance of the site
• Relationships or groups with other internal/external sites (if any)
• Site sub-functions (service or account details, or referral)
• Key business processes that a visitor will go through
Technical:
• Internal and external domain names
• Secure content (if any)
• Hosted conversion process
• Currency and time zone settings
• Hybrid app details
Dashboard Creation
Navigation title:Dashboard Creation
As part of the implementation process, your Adobe Consultant will help you create a dashboard.
Your Consultant will schedule and hold a dashboard kickoff meeting. During the meeting, You and your Consultant
will gather requirements and fill out the Dashboard Requirements Document (DRD). After the call, your Consultant
will give you a final copy of the DRD and identify the next steps.
31
4. What specific information should be displayed on the dashboard? List all of the data items that should be
included on the dashboard. Also indicate the level of summary/detail at which each item should be expressed
on the dashboard.
5. Which of the data items listed above are the key (most important) items needed to meet the objectives
supported by the dashboard?
6. What are the logical groupings that could be used to organize these data items on the dashboard? Into which
of these groups does each data item belong?
7. What are the useful comparisons that will allow the dashboard's users to see the data items listed above in
context?
The Adobe Analytics Dashboard Fundamentals document contains a list of questions that will help Adobe create
an initial dashboard structure. Once in place, you and your Consultant can customize the dashboards according
to your business needs.
JavaScript
The JavaScript implementation method requires you to configure the JavaScript codes on your pages manually.
Much of this effort can be simplified if you use the Dynamic Tag Management implementation method. However,
some users might require the JavaScript method.
The JavaScript implementation requires:
• Strong JavaScript skills
• Solid understanding of Analytics concepts and terminology
For more information, see Implementing Analytics Using JavaScript on page 64.
33
• Run reports on basic page-level data.
Note: Before you begin, verify that Analytics is enabled in the Adobe Marketing Cloud (the solution
provisioning process). If you received an email inviting you to log in to Analytics in the Enterprise
Dashboard, you've completed this prerequisite.
Alternatively, you can run this setup in Analytics by clicking Help > Welcome to Adobe Analytics.
2. Specify the following basic information about your business:
Element Description
Industries Specify how your company makes money (products, customer services, leads, brand awareness,
and ads).
Data Layer (Recommended) A JavaScript array which is used to store information. If you perform the automatic
setup using Dynamic Tag Management, you will be using a data layer.
For a blog on data layers, see Data Later: From Buzzword to Best Practice.
Data Repository (Report Suite) A report suite is a discrete data set that typically corresponds to a single property (site or app) or
brand. Each report suite has its own set of reports and metrics.
Estimated Page Views Roughly the number of page views your site receives per day.
3. Click Next.
Element Description
Deploy Launches Dynamic Tag Management, where you can log in and deploy Analytics. This process
automatically implements the AppMeasurement.js file and the Marketing Cloud ID
service (VisitorAPI.js).
Important: In a new browser tab, a help page is displayed that walks you through Adobe
Analytics deployment via Dynamic Tag Management.
Download Downloads the installation file, named INSTALL-ME <report suite name>.js.
This option is for experienced users who understand JavaScript Implementation.
Important: Downloading the code does not constitute deploying Analytics. This is a
manual deployment that you perform on the pages of your site, or through Adobe consulting
services.
5. Run a report.
After deploying the Analytics tool, you can run a report in Reports & Analytics to confirm that data is coming
to your site. (See Sign in and Navigate to get familiar with the Analytics interface.)
For example, a Site Metrics > Real-Time lets you see immediate data.
Note: The Real-Time report requires some configuration prior to running. See Configure Real-Time
Report.
35
36 Adobe Analytics Implementation
Implementing Analytics with Dynamic Tag
Management
You can use Dynamic Tag Management (DTM) to implement Adobe Analytics.
Use Dynamic Tag Management to manage tags and collect and distribute data across digital marketing systems.
Dynamic Tag Management provides a single data layer that pushes data from multiple sources. Dynamic Tag
Management also enables responsive delivery of user-specific content.
This help section provides specific information about using Dynamic Tag Management to implement Adobe
Analytics. For detailed information about Dynamic Tag Management, refer to the Dynamic Tag Management
Product Documentation. For information about accessing DTM and common tasks when starting to use DTM,
see Getting Started in the Dynamic Tag Management Product Documentation.
For a detailed summary of the Dynamic Tag Management implementation steps, refer to Deploy Adobe Analytics
Using Dynamic Tag Management in Getting Started with Adobe Analytics.
Note: Only a user with Admin rights can create a property. For more information about roles, see Create
and Manage Groups in DTM in the Dynamic Tag Management Product Documentation.
You can manage and track these assets with DTM. For example, suppose that you have multiple websites based
on one template and you want to track the same assets on all of these websites. You can apply one web property
to multiple domains.
Tip: Plan ahead to determine how many web properties you need. See Planning Your Migration to DTM
in the Getting Started with Adobe Dynamic Tag Management guide.
For general information about web properties and best practices, see Web Properties in the Dynamic Tag
Management Product Documentation.
37
2. Fill in the fields:
Element Description
Name
The name of your property.
URL
The base URL of the property.
Tag Timeout
Specifies how long Dynamic Tag Management waits for a tag to fire before timing out and cancelling
the tag request.
Anchor Delay
Specifies how long Dynamic Tag Management waits for tags to fire on clicked links before moving
to the next page. The default value is 100 milliseconds.
Longer delays improve tracking accuracy. Adobe recommends a delay of 500 milliseconds or less,
which the user will not perceive.
Dynamic Tag Management will wait up to the time specified, but if the beacon fires sooner, the delay
is cut short. (That is, user won't always wait the full length of the delay.)
Akamai The simplest hosting option to implement. 1. Dynamic Tag Management generates custom
Globally distributed delivery network. JavaScript libraries.
2. Dynamic Tag Management exports the custom
Adds additional third-party infrastructure dependencies JavaScript libraries to Akamai.
(DNS lookup, Akamai availability).
3. The target website references the Akamai-hosted
For more detailed information, see Akamai in the Dynamic Tag Management libraries directly at the
Dynamic Tag Management Product Documentation. page level.
Self-hosting: FTP
A push approach, whereby Dynamic Tag Management 1. Dynamic Tag Management generates custom
Delivery
exports custom JavaScript libraries directly to the web JavaScript libraries.
content server host via the FTP protocol. 2. Dynamic Tag Management exports the custom
This solution requires an FTP server and credentials to JavaScript libraries to host server via FTP.
be available on the web content server to publish 3. The target website locally references the custom
changes to the custom Dynamic Tag Management Dynamic Tag Management libraries.
libraries.
For more detailed information, see FTP in the Dynamic
Tag Management Product Documentation.
Self-hosting: Library
A pull approach, whereby the application exports 1. Dynamic Tag Management generates custom
Download
custom JavaScript libraries. There, the libraries can be JavaScript libraries.
accessed by a hosted server-side process. 2. Dynamic Tag Management exports the custom
Additionally, the libraries are available via web JavaScript libraries to Akamai.
download directly from the Dynamic Tag Management 3. Custom Dynamic Tag Management libraries are
interface. manually or programmatically moved to the web
content server.
This solution requires either a manual retrieval and
publication of the Dynamic Tag Management libraries 4. The target website locally references the custom
or the creation of an automated process that pulls the Dynamic Tag Management libraries.
libraries from Akamai onto the web content server.
39
Hosting Option Description Implementation
This approach takes the most time to set up, but is also
the most secure and flexible option.
To check if the latest version of your library file is being
referenced, use the command
For more detailed information, see Library Download
in the Dynamic Tag Management Product
Documentation.
You can use more than one hosting option. For example, you might host your staged files using Akamai, but
self-host your production site. Note that each hosting type has its own embed code, and only one embed code
can be added to a page.
Important: For a successful implementation, it is critical that you follow these instructions as they appear
in Adobe Help. Specifically, you must place the header code in the <head> section of your document
templates. Also, you must place the footer code just before the closing </body> tag. Placing either of
these embed codes elsewhere in your markup, or using asynchronous methods to append the embed codes,
or wrapping the embed codes in any way, are not a supported implementations of Dynamic Tag
Management. The embed codes must be implemented exactly as provided.
An unsupported implementation will yield unexpected results and prevent Customer Care and Engineering
from assisting with your implementation.
1. In the Dynamic Tag Management interface, open the Embed tab and select your hosting option (such as
Akamai), then toggle the switch to "On."
2. Copy the production header code provided in the Embed tab of Dynamic Tag Management and place it within
the HEAD section of your site HTML.
Note: Production embed code reflects only the published items in that Create Web Property on page
37. However, embed code for staging reflects all items in the associated property, regardless of the
published or unpublished state. To test unpublished items on your production site, locally enable
staging in the console by following the instructions in Test Unpublished Rules for Akamai Hosting
on page 63.
3. Copy the production footer code and place it in the BODY section of your site HTML.
Place the code as close to the </body> tag as possible.
4. Copy the staging header and footer code, then repeat the steps above on your staging site.
Note: The difference between production and staging code snippets is the addition of -staging to
the filename in the staging version. The footer code remains the same in staging and production.
41
Verify Header and Footer Code
Verify that your Dynamic Tag Management library is loading properly on your site.
Note: For improved visitor tracking, it is strongly recommended that you enable Marketing Cloud ID
Service.
Element Description
A descriptive name for this tool. This name displays on the Overview tab under Installed Tools.
Tool Name
Configuration Method Automatic (Recommended): Use dynamic tag management to manage the configuration. This
method enables automatic synchronization of Adobe Analytics report suites via a Marketing
Cloud login or Web Services ID, and manages the AppMeasurement code.
After the accounts are connected, Dynamic Tag Management pulls the Adobe Analytics report
suite IDs and names into the tool configuration interface, allowing for increased speed in tool
deployment with less possibility for user errors.
Note: You must choose the Automatic option if you are an Adobe Analytics Premium
customer. See Enabling Adobe Analytics Premium on page 45 below.
• Marketing Cloud: (Default) Uses Marketing Cloud single sign-on. Specify your Marketing
Cloud ID and password.
• Web Services: Specify your Web Services username and shared secret.
Shared secret credentials are located in Admin Tools > Company Settings > Web Services.
Developers, see Get Web Service Access to the Enterprise API for help with obtaining Web
Services credentials.
Manual: Manually manage the AppMeasurement code. You can download the
AnalyticsAppMeasurement code from Admin Tools > Code Manager.
43
Element Description
Click JavaScript (new) for information about downloading the code locally to copy and paste in
the Edit Code field in Library Management on page 46.
• Production Account ID: (Required) Your production account for data collection. For Analytics,
this is your report suite ID. Dynamic Tag Management automatically installs the correct account
in the production and staging environment.
• Staging Account ID: (Required) Used in your development or test environment. For Analytics,
this is your report suite ID. A staging account keeps your testing data separate from production.
The Tracking Server and SSL Tracking Server variables are used for first-party cookie
implementation to specify the domain at which the image request and cookie is written. For
more information, see the Correctly Populate the trackingServer and trackingServerSecure
Variable article.
• SSL Tracking Server: Specify the information for your SSL tracking server.
3. Click Create Tool to create the tool and display it for editing.
Tools are displayed on the Overview tab, under Installed Tools.
4. (Conditional) Configure the tool further as necessary by following the directions in the links below (General,
Library Management, Global Variables, Pageviews & Content, Link Tracking, Referrers & Campaigns,
Cookies, and Customize Page Code).
Element Description
This option lets Dynamic Tag Management automatically retrieve your Adobe Analytics account's
configuration.
The latest available AppMeasurement code is used and upgrade notifications are displayed for
selection as new versions become available. You can also roll back to previous AppMeasurement
versions as necessary, such as for compatibility reasons. Up to five previous versions are displayed.
Update Credentials Refresh the API, for example, to update report suites associated with a user.
You add the Adobe Analytics Premium tool using dynamic tag management the same way you add Adobe
Analytics (Standard). In order to get the Analytics Premium functionality (if applicable), you must do the
following:
• Use the Automatic configuration method (explained above).
• Use the Marketing Cloud or Web Services authentication method (explained above).
There is no "switch" to enable Analytics Premium functionality. Verification is done behind the scenes by API
checks via the automatic configuration. The additional eVars are added to the UI if the account is authenticated
as an Analytics Premium customer.
Note: If you downgrade to standard Analytics in the future, the added premium eVars that are out of the
standard range will be grayed out in both tools/rules. You can view any configured variables that are now
out of range and make any necessary changes to an in-range variable. You cannot add or edit any of these
out-of-range variables, but you will be able to view them and delete them.
General
Field descriptions for the General settings in dynamic tag manager, for deploying Adobe Analytics.
Enable EU compliance for Adobe Analytics Enables or disables tracking based on the EU privacy cookie.
When a page is loaded, the system checks to see if a cookie called
sat_track is set (or the custom cookie name specified on the Edit
Property page). Consider the following information:
• If the cookie does not exist or if the cookie exists and is set to anything but
true, the loading of the tool is skipped when this setting is enabled. Meaning,
any portion of a rule that uses the tool will not apply.
If a rule has analytics with EU compliance on and third-party code, and the
cookie is set to false, the third-party code still runs. However, the analytics
variables will not be set.
• If the cookie exists but it is set to true, the tool loads normally.
45
Element Description
You are responsible for setting the sat_track (or custom named) cookie
to false if a visitor opts out. You can accomplish this using custom code:
_satellite.setCookie(“sat_track”, “false”);
You must also have a mechanism to set that cookie to true if you want a visitor
to be able to opt in later:
_satellite.setCookie(“sat_track”, “true");
Tracking Server The domain at which the image request and cookie is written.
See trackingServer on page 162.
SSL Tracking Server The domain at which the image request and cookie is written. Used for secure
pages. If not defined, SSL data goes to trackingServer.
See trackingServerSecure on page 162.
Data Center The Adobe data center used for data collection.
Library Management
Descriptions of the fields and options in the Library Management settings in Dynamic Tag Management.
Note: If more than one Adobe Analytics tool is used in a single web property, each tool must have a
unique tracker variable name. Duplicative object variable names between Adobe Analytics tools within
a single web property will cause conflicts.
Element Description
Page code is already present Prevents Dynamic Tag Management from installing Adobe Analytics page code if the code is already
present on your site.
This feature allows you to use Dynamic Tag Management to add to your existing implementation
rather than starting from scratch. Be sure to properly set your tracker variable name when checking
this box.
Load library at <Page Top or Page Specifies where and when to load the page code. Regardless of your selection, any rules using the
Bottom> Analytics tool will need to have the same setting.
Managed by Adobe (Recommended) Enable Dynamic Tag Management to manage your library.
If you select this option, the following option becomes available:
Library Version: Select the latest version from the Library Version menu. Dynamic tag
management notifies you when new versions are available. You can revert to a previous version as
necessary.
1. On the Adobe Analytics tool page, expand the General section, then click Open Editor.
2. Unzip the AppMeasurement_JavaScript*.zip file you downloaded in Manually implement Adobe
Analytics (legacy) on page 53.
If you opt for custom library, when you open the window it will already have the most recent code version
present. There is no need to download the zip from the Admin Console.
3. Open AppMeasurement.js in a text editor.
4. Copy and paste the contents into the Edit Code window.
47
5. Adobe recommends adding the following code above the Do Not Alter Anything Below This Line:
var s_account="INSERT-RSID-HERE"
var s=s_gi(s_account)
Important: If you add this code, it is recommended that you also select the Set report suites using
custom code below checkbox in the overall library settings.
Global Variables
Field descriptions and information about variables when using Dynamic Tag Management to deploy Adobe
Analytics.
These variables fire on all page load rule beacons. You can accomplish the same effect by using a Create
Conditions for Page-Load Rules on page 58 set to fire on all pages. These variables might not fire inCreate
Conditions for Direct-Call Rules on page 60 and Create Conditions for Event-Based Rules on page 55 rules.
Element Description
Server The predefined variable populates the Servers report in Adobe Analytics.
eVars The eVar variables are used for building custom conversion reports.
Props Property (prop) variables are used for building custom traffic reports.
Dynamic Variable Prefix A special prefix to the start of the value. The default prefix is "D=".
Page Name
The name of each page on your site.
See pageName on page 149.
Hierarchy
Determines the location of a page in your site's hierarchy.
See hierN on page 138.
Link Tracking
Field descriptions in Dynamic Tag Management for link tracking when deploying Analytics.
Enable ClickMap
Determines whether visitor click map data is gathered.
See s.trackInlineStats on page 118.
Download Extensions
If your site contains links to files with any of the listed extensions, the URLs of these links will appear
in reporting.
See s.linkDownloadFileTypes on page 118.
For example, if you have a spa/#/about page, you could put "about" in the Always Track
section.
The "about" page is the only outbound link that is tracked. Any other links on the page (for example,
http://www.google.com) are not tracked.
Note that these two options are mutually exclusive.
49
Referrers and Campaigns
Field descriptions in Dynamic Tag Management for referrers and campaign options when deploying Dynamic
Tag Management in Adobe Analytics.
Element Description
Referrer Override
Overrides the value set in the s.referrer variable, which is typically populated by the referrer set in
the browser.
See referrer on page 157.
Campaign
A variable that identifies marketing campaigns used to bring visitors to your site. The value of
campaign is usually taken from a query string parameter.
See campaign on page 131.
Use the DTM interface to choose whether you want to use a Query String or Value (which could pull from a
data element):
You can either enter your query string directly in the interface, or you can reference a separate data element if
you have other means of tracking a campaign.
Cookies
Field descriptions for the Cookies global settings used for deploying Dynamic Tag Management in Adobe
Analytics.
Visitor ID
Unique value that represents a customer in both the online and offline systems.
See visitorID on page 163.
Visitor Namespace
Variable to identify the domain with which cookies are set.
See visitorNamespace on page 163.
Domain Periods
The domain on which the Analytics cookie s_cc and s_sq are set by determining the number
of periods in the domain of the page URL. This variable is also used by some plug-ins in determining
the correct domain to set the plug-in's cookie.
See s.cookieDomainPeriods on page 113.
Transaction ID
Unique value that represents an online transaction that resulted in offline activity.
See transactionID on page 162.
Cookie Lifetime
Determines the life span of a cookie.
See s.cookieLifetime on page 115.
Open Editor You can insert any JavaScript call that must be triggered before the final s.t() call, which is contained in
the s_code.
Execute Before UI settings: Interface settings take precedence over the custom code (for example, if you want to override
an eVar if a setting in the interface was enabled).
After UI settings: Custom code takes precedence over interface settings.
Where do I put my plugins when If using DTM to manually host the s_code, plugins can be added in the same editor as
implementing Adobe Analytics via DTM?
the hosted s_code, just as it would be in a typical Adobe Analytics implementation.
However, it is also an option to place the plugins in the editor within the Customize Page
Code section of the tool settings. Both implementation methods should be equally effective.
See DTM Switch Plugins.
51
Question Answer
If I switch from manual library management Any user code that you have specified is overwritten with the base AppMeasurement library.
to Managed by Adobe, will my current You must move this code to the new Custom Page Code section at the end of the tool
settings or code be affected? configuration so that the code continues executing. This method allows the AppMeasurement
library to be managed (and upgraded) separately from the user's custom code.
Potential Pitfalls
There is a small chance that the integration could cause data collection issues if you currently use Adobe Analytics.
These issues could arise only if you publish your library to production subsequent to the release. (Production
code remains intact until publishing occurs.)
To avoid these issues, ensure that:
• Report suite IDs are correctly entered in the tool.
• Report suite IDs in the tool match the IDs in the AppMeasurement code.
• The currency code, character set, tracking server, and SSL tracking server configuration fields are correctly
set with supported values.
• Custom code is defined in Library Management.
Note: The name is referenced by the rules builder, not an ID. If you change the name of the Data
Element , you must change its reference in every rule that uses it.
Type
Specifies where the data is pulled from, such as JS Object, CSS Selector, Cookie, URL Parameter, or
Custom Script.
Depending on which type you select, different options display. See Types of Data Elements in the Dynamic
Tag Management Product Documentation for more information and examples.
Default Value
A default element. This value ensures that the data element always has a value, even if a URL parameter
does not exist or cannot be found by Dynamic Tag Management.
Note: If there is no value and no default value, then nothing is returned. Any variable referencing
that data element won't get set. Note also that the default value field is ignored if it's a "custom
code" data element.
See Data Elements in the Adobe Tag Management Product Documentation for more information about how
to use data elements.
5. Click Save Data Element.
After you create the web property, it is available for editing on the Web Properties tab on the Dashboard.
Activating the web property is not required
3. Add an Adobe Analytics tool to the property:
a) On the Web Properties tab, click the property.
b) On the Overview tab, click Add a Tool.
c) From the Tool Type menu, select Adobe Analytics.
53
d) Configure the following fields:
Element Description
Tool Type The Marketing Cloud solution, such as Analytics, Target, Social, and so on.
Tool Name The name for this tool. This name displays on the Overview tab under Installed Tools.
Production Account ID A number for your production account for data collection. Dynamic Tag Management
automatically installs the correct account in the production and staging environment.
Staging Account ID A number used in your development or test environment. A staging account keeps your testing
data separate from production.
5.
To configure the code, click Settings ( ).
At a minimum, click Cookies and configure your tracking server and SSL tracking server.
6. Click General and Insert Core AppMeasurement code on page 47.
7. Define a Create New Rule on page 55 to collect Analytics data.
You are now ready to define rules to collect analytics data. You might want to define a few data elements
first. Data elements let you extract data from the page that you can use to configure your rule. To get started,
you can define a page load rule that does not have any conditions to collect Analytics data on each page.
8. Add Header and Footer Code on page 40 on the Embed tab.
For staging, you can leave the default Amazon hosting option. You can change it if needed before your
production rollout.
9.
(Optional) Click Settings ( ) on the Options tab, and configure the Adobe Analytics code.
The category field is only for your own organizational purposes and is not required. You can delete categories
by clicking the x icon in the category.
7. Set Up Actions for the Condition to Trigger on page 60.
1. Select the type of interaction you want to track, such as mouse clicks, or submitting a form.
55
For more information, see Event Types in the Adobe Tag Management Product Documentation.
2. Enable the following options as necessary:
Element Description
Delay Link Activation Enable if the event activates a link and you want the link to delay until the event has time
to fire.
Apply event handler directly to element Applies the event handler to the specific element that is targeted. This setting is tied to
the bubbling and layering concept in a browser.
For example, when you click an image inside an anchor tag like <a href="abc.html"><img
src="xyz.png"/></a>, you might expect the click to be associated with the anchor tag, because the
tag is in the bubble stream. However, when you inspect the click in the developer tools, the click may actually
affect only the <img> tag. To ensure that the event is handled correctly, associate the click with the <img>
tag and do not depend on the browser to bubble up the click to a parent element. An event like a click can
potentially bubble up to <body>. It is important to understand where the event is actually bound, and target
it specifically to make sure that the rule fires correctly.
See Using the CSS Selector in the Dynamic Tag Management Product Documentation for information about
finding the correct element tag.
4. Select and set up any additional criteria or condition types you wish to bind to the rule.
57
5. Indicate your preference regarding event bubbling.
Event bubbling is one way of event propagation in HTML DOM.
If you... Check this option
Want related interactions on child elements of the rule selector you Allow events on child elements to bubble.
identified to fire the rule.
Want to prevent bubbling when the child element already triggers its Do not allow if child element already triggers event.
own event.
Don't want the events of the rule selector you identified to go beyond the Do not allow events to bubble upwards to parents.
element itself in the event hierarchy.
59
Create Conditions for Direct-Call Rules
Create conditions for direct-call rules.
In the Conditions dialog, specify the string that will be passed to _satellite.track() in your direct
call, without quotes.
Note: If you specify the string that will be passed to _satellite.track() in your direct call
using the UI, as described above, do not use quotation marks. If you insert Customize Page Code on
page 51 using the editor, you must use quotation marks.
Note: Because DTM allows you to inject custom code into your page, please take care not to create
cross-site scripting (XSS) vulnerabilities (see OWASP’s guide for more info). Using data elements within
a script requires particular attention. Always assume data element values might come from an untrusted
source.
1. Click JavaScript / Third Party Tags to add a new script to your rule.
61
4. Specify how you want the script to trigger, and paste the desired content into the text
e r a
u r
63
Implementing Analytics Using JavaScript
To begin using Analytics, data must be sent to a report suite to display in reporting.
The easiest and recommended way to send data to Analytics is by using Implementing Analytics with Dynamic
Tag Management on page 37. However, in some cases, you might want to implement Analytics using the older
JavaScript method.
Note: This section describes the legacy method of implementing Analytics. All Analytics customers have
access to Dynamic Tag Management which is the standard method to deploy Marketing Cloud tags.
Implementation Steps
To successfully implement a page with code to collect data, you must have access to your hosting servers to
upload new content to your website. It is also useful to have an existing site to implement code.
The following steps walk you through a basic Analytics implementation.
Download AppMeasurement
The download is available in Code Manager.
for JavaScript and the Visitor
ID service. This download zip contains several files.AppMeasurement.js and
VisitorAPI.js are the relevant files when implementing Analytics.
Update
Copy the Example AppMeasurement.js Code on page 66 and paste it at the beginning of your
AppMeasurement.js. AppMeasurement.js file. At a minimum, update the following variables:
• s.account="INSERT-RSID-HERE"
• s.trackingServer="INSERT-TRACKING-SERVER-HERE"
• s.visitorNamespace = "INSERT-NAMESPACE-HERE"
• s.visitor=
Visitor.getInstance("INSERT-MCORG-ID-HERE")
See Correctly populate the trackingServer and trackingServerSecure variable or Contact and
Legal Information on page 287 if you are unsure about any of these values. If they are not set
correctly, data will not be collected by your implementation.
Host
These core JavaScript files must be hosted on a web server that is accessible to all pages on
AppMeasurement.js your site. You need the path to these files in the next step.
and VisitorAPI.js.
Reference
Include the Visitor ID Service by adding the following line of code in the <head> or <body>
AppMeasurement.js
tag on each page. VisitorAPI.js must be included before
and VisitorAPI.js
AppMeasurement.js:
on all site pages.
<script language="JavaScript" type="text/javascript"
src="http://INSERT-DOMAIN-AND-PATH-TO-CODE-HERE/VisitorAPI.js"></script>
Include AppMeasurement for JavaScript by adding the following line of code in the <head>
or <body> tag on each page:
<script language="JavaScript" type="text/javascript"
src="http://INSERT-DOMAIN-AND-PATH-TO-CODE-HERE/AppMeasurement.js"></script>
• var s=s_gi("INSERT-RSID-HERE")
• s.pageName="INSERT-NAME-HERE" // for example,
s.pageName=document.title
Caching
The JavaScript file is cached in the visitor's browser after it is initially loaded, and is typically downloaded no
more than once per session. The file is not downloaded on each page, even though it is used by every page on
the site. On most websites, users average more than a few page views per session, so transferring JavaScript that
is used multiple times into this file can result in less overall downloaded data.
Important: This example uses the visitor ID service, which is deployed as part of your Implementing
Analytics Using JavaScript on page 64. Enabling the visitor ID service in AppMeasurement before you
have included the Visitor API JavaScript file on all site pages could result in duplicate visitor counts. To
avoid duplicate visitor counts, make sure that you understand and follow the process described in Marketing
Cloud ID Service on page 236.
65
Example AppMeasurement.js Code
For new implementations, you can paste the following global configuration code at the beginning of
AppMeasurement.js to get started:
//initialize AppMeasurement
var s_account="INSERT-RSID-HERE"
var s=s_gi(s_account)
}
s.doPlugins=s_doPlugins */
67
• The library provides native utilities to get query parameters, read and write cookies, and perform advanced
link tracking.
Initialization process
Call s_gi(), passing the report suite ID to initialize an AppMeasurement instance:
var s_account="INSERT-RSID-HERE"
var s=s_gi(s_account)
When s_gi is called, if an AppMeasurement instance does not exist for the specified s_account, a new
instance is created. Otherwise the existing instance is returned. This helps avoid creating duplicate objects for
the same account.
Utilities
JavaScript AppMeasurement provides the following built-in utilities:
• Util.cookieRead on page 184
• Util.cookieWrite on page 184
• Util.getQueryParam on page 184
Clear Vars
A new clearVars method is available to clear the following values from the instance object:
• props
• eVars
• hier
• list
• events
• eventList
• products
• productsList
• channel
• purchaseID
• transactionID
• state
• zip
• campaign
For example:
s.clearVars()
Benefits
• 3-7x faster than H.25 code.
Note: We recommend migrating to the Marketing Cloud ID Service on page 236 when you migrate to
AppMeasurement for JavaScript.
Check plug-in compatibility s_code.js Some plug-ins are longer supported. See
AppMeasurement Plug-in Support on page 69 .
Copy your s_code.js s_code.js and Move all code that appears before the DO NOT
customization to AppMeasurement.js ALTER ANYTHING BELOW THIS LINE
AppMeasurement.js.
section in s_code.js to the beginning of
AppMeasurement.js.
(Optional) Update plug-ins AppMeasurement.js If you are using the getQueryParam plug-in, update
these calls to use the new utility, Util.getQueryParam
on page 184.
Tested Plug-ins
The following plug-ins were tested and verified as compatible:
• appendList on page 205
• crossVisitParticipation
• userAgentManager
• getTimeParting on page 221
69
• join
• split
• getDaysSinceLastVisit on page 210
• getNewRepeat on page 211
• getTimeToComplete
• manageVars (requires s.pt plugin utility)
• channelManager
• Cookie Combining Utility
• getPageName
Untested Plug-ins
The following plug-ins should continue to work since the underlying functionality is still supported, but they
have not been tested and verified as compatible. You should test these plug-ins in your development environment
before migration.
• getActionDepth
• getAndPersistValue on page 209
• getCookiesAccepted
• getValOnce on page 223
Unsupported Plug-ins
These plug-ins are not supported and no longer function due to their use of functionality that no longer exists in
the new AppMeasurement for JavaScript library.
• callBack
• channelExtract
• detectRIA
• deviceOrientationChanges
• DynamicObjectIDs
• Form Analysis
• manageQueryParam
• HTML5Storage
How it Works
AMPs have specially tagged HTML pages cached around the web on different content delivery networks (CDNs)
of participating technology partners and publishers. By doing this, AMP content is delivered from the closest
possible source with the lowest possible latency. This creates an analytics challenge because you can never be
100% sure where a publisher's content will be loaded from, and third-party cookies are troublesome for visitor
identification.
In addition, to dramatically reduce page weight and speed page load time, AMPs restrict the use of JavaScript
and cookies. While this is advantageous for your mobile device because it reduces the amount of processing, it
introduces challenges to accurately measuring unique visitors and understanding user acquisition and retention.
To solve these problems, Adobe has collaborated with AMP partners and publishers on two options that a
publisher can choose from to best suit their business needs, both using the amp-analytics tag. The first
approach uses the "adobeanalytics" tracking template to construct the Analytics request directly from
within the AMP. The second approach uses the "analytics_nativeConfig" tracking template, which
uses an iframe containing the AppMeasurement code you deploy on your normal site. The following table gives
you an idea of the pros and cons of each approach.
Visitor/visit counts (in existing report suite) High inflation Minimal inflation
71
"pageName": "Adobe Analytics Using amp-analytics tag"
},
"triggers": {
"pageLoad": {
"on": "visible",
"request": "pageView"
},
"click": {
"on": "click",
"selector": "button",
"request": "myClick",
"vars": {
"eVar1": "button clicked"
}
}
}
}
</script>
</amp-analytics>
In the click trigger, you can specify a selector to ensure that whenever the specific DOM element is clicked
(in this case, any button), the buttonClick request is fired and will be automatically set to denote this hit as
a non-stage event (i.e. trackLink call).
Additionally, amp-analytics supports a number of variable substitutions so that AMP can provide data
values that it is aware of. You can learn all about those and more by visiting: amp-analytics variable
documentation.
Be aware that if you want to incorporate any technology or DOM variables (such as browser, screen size, device,
referrer, etc.) you will have to explicitly add them to any request, as they are not automatically generated for
you. Documentation on each of our available query string parameters used for tracking can be found here.
If you inspect the hits created by amp-analytics, you will notice that in each request, Adobe has included the
vid query parameter. We set the vid based on a built-in AMP function to set a custom Analytics cookie ID
named adobe_amp_id. This ID is independent of any other ID being set by Adobe Analytics elsewhere
(e.g.s_vi cookie) and creates new visitors in any report suite the hits are sent to.
There are a few caveats to be aware of. When using the amp-analytics tag as mentioned above, visitors will be
independent of your normal tracking, and because the AMP can be loaded from any content delivery network,
you will get a unique visitor for each CDN a visitor sees this AMP on (hence the visitor inflation mentioned
previously). For this reason, Adobe recommends that if you use the "adobeanalytics" template for
amp-analytics, you put your data into a separate report suite specific to AMP. Also, the Marketing Cloud
ID service (formerly, visitor ID service) is not supported using this method, so if your business requires additional
Marketing Cloud integrations, or will in the future, this is probably not the option for you.
Finally, and perhaps most importantly, this amp-analytics solution requires that the tracking server you
specify in the vars section matches the tracking server on your main site, so that your existing privacy policy
controls are respected. Otherwise, you must create a separate privacy policy just for AMPs.
},
"vars": {
"host": "statshost.publishersite.com"
},
"extraUrlParams": {
"pageName": "Adobe Analytics Using amp-analytics tag",
"v1": "eVar1 test value"
}
}
</script>
</amp-analytics>
This approach sends data to a utility web page via special query string parameters added to the iframeMessage
request parameter. In this case, notice that we have added the ampdocUrl AMP variable, and the
documentReferrer to the query string parameters pageURL, and refer respectively to the iframeMessage
request above. These extra query string parameters can be named whatever you like, as long as your stats.html
page (shown below) is configured to collect the appropriate data from them.
The "adobeanalytics_nativeConfig" template also adds query string parameters based on the variables
listed in the extraUrlParams section of the amp-analytics tag. In this case, you can see we have specified
the pageName and v1 parameters , which will be used by our stats.html page.
Be aware that you can only use a single amp-analytics template at a time and can not use the
"adobeanalytics" template as well as the "adobeanalytics_nativeConfig" template on the same
AMP. If you attempt to do so, you might see an error in the browser console, and you will erroneously inflate
your visitor count.
<html>
<head>
<title>Stats Test</title>
<script language="JavaScript" type="text/javascript"
src="VisitorAPI.js"></script>
<script language="JavaScript" type="text/javascript"
src="AppMeasurement.js"></script>
<html>
<head>
<title>Stats Test</title>
<script language="JavaScript" type="text/javascript"
src="VisitorAPI.js"></script>
<script language="JavaScript" type="text/javascript"
src="AppMeasurement.js"></script>
</head>
<body>
<script>
var v_orgId = "1234567@PublisherOrg";
var s_account = "reportSuite";
var s_trackingServer = "metrics.publisher.com";
var s_visitorNamespace = "publisherNamespace";
var visitor = Visitor.getInstance(v_orgId);
visitor.trackingServer = s_trackingServer;
var s = s_gi(s_account);
s.account = s_account;
s.trackingServer = s_trackingServer;
s.visitorNamespace = s_visitorNamespace;
s.visitor = visitor;
s.pagename = s.Util.getQueryParam("pageName");
s.eVar1=s.Util.getQueryParam("v1");
s.campaign=s.Util.getQueryParam("campaign");
73
s.pageURL=s.Util.getQueryParam("pageURL");
s.referrer=s.Util.getQueryParam(“ref”);
s.t();
</script>
</body>
</html>
As shown above, you can use or link to your existing VisitorAPI.js and AppMeasurement.js (as in
our example), or whatever your existing implementation uses, then add the correct configuration parameters. To
capture the correct values into the correct variables, you can use the provided s.Util.getQueryParam
function to grab the value(s) that you passed in from the iframeMessage URL and set the appropriate variables,
just as you would on a typical page. If you use tag management software like Adobe's Dynamic Tag Manager,
the query string parameters should be straightforward to capture. In this case, s.pageName is set to the value
we passed in the query string parameter pageName. Here, the page name would be set to Adobe Analytics
Example 2.
Important: Due to restrictions on iframes in the AMP framework, your stats.html page must be
hosted on a separate subdomain from the domain the AMP itself is hosted on. The AMP framework does
not allow for iframes from the same subdomain that the AMP page itself exists on. For example, if your
AMP is hosted on amp.example.com, be sure to host your stats.html page on a separate subdomain
such as ampmetrics.example.com or something similar.
Because the utility page is hosted on your original site, no additional work is needed to support your existing
privacy policy across all AMPs. This means that if an end user opts out of tracking on your primary site, they
are also opted out of tracking on all your AMPs, with no additional steps required. Using this utility page also
means that AMP can support Adobe's Marketing Cloud ID service so that you can integrate the measurement
captured on your AMPs with the rest of the Marketing Cloud (for targeted advertising using Adobe Audience
Manager for example).
To reiterate, if your organization is not yet using the Marketing Cloud ID service (or has tag management software
like Adobe's Dynamic Tag Manager), you can tag the stats.html page however you want. Use your existing
implementation as a reference point. The only difference from your standard implementation is that you will get
the applicable data points from the amp-analytics iframeMessage URL (or document.URL from within
the stats.html page ) for each of the variables you want to set. Also, if you want to use any of the AMP
specific variables (as mentioned above) like the AMP referrer or AMP page URL, please include them in the
iframeMessage object as shown in our example above.
As flexible as this solution is, there are caveats. Due to inherent restrictions in the amp-analytics
iframeMessage, it can only be loaded on a page load once. This means you will not be able to do link tracking
or video tracking with the "adobeanalytics_nativeConfig" template. Moreover, some DOM values
that are typically captured automatically by our AppMeasurement code, such as referrer (which impacts the
Search Engine Keyword reports, Referrer, and Referrer Type reports, or may include a marketing campaign
tracking code) will have to be passed manually to the iframeMessage using whatever AMP variables are
available. For this reason, Adobe recommends setting a custom variable with the value AMP if you put AMP
data into an existing report suite, so that you can segment out AMP traffic when viewing the aforementioned
reports. That said, standard technology reports, such as browser, device, screen size or resolution, should work
automatically.
Finally, because the iframe loads as a separate page and fully executes the JavaScript on that page, the AMP is
not as lightweight as the AMP standard intended. To be clear, this does not affect page load time (the iframe
loads after the page is done loading), but the CPU and network will be doing slightly more than they otherwise
would, which might impact scrolling smoothness. In practice, we have not seen a large impact, but we are working
with Google to minimize the user experience impact of this approach.
Question Answer
Is video tracking available for either the Unfortunately, not yet. The AMP standard supports only triggers for "visible", "click", and
"adobeanalytics" or "timer", and does not yet support explicit triggers for video tracking that can be listened to
"adobeanalytics_nativeConfig" by the amp-analytics tag. Also, because the
template? "adobeanalytics_nativeConfig" tag can only be loaded once, it is not
compatible with video viewing which occurs after the AMP has loaded.
You mention that visitor inflation is lower There is only one scenario in which visitor/visit inflation will occur:
for the
A visitor using Safari and who has never been to publisher.com's site visits an AMP page
"adobeanalytics_nativeConfig" for the first time, then later visits publisher.com's normal (non-AMP) site.
template in your comparison. What does that
mean? What would cause visitor inflation in In this scenario, the visitor would be counted as two visitors in Analytics, assuming the AMP
and the main site are in the same report suite. However, if the visitor had been to
the "adobeanalytics" solution?
publisher.com's main site before visiting the AMP, it will still count as only one visitor in
reporting.
Should I use a separate report suite for We recommend using a separate report suite for AMPs if you use the adobeanalytics template,
AMPs? because of the visitor/visit inflation issue. However, we will also set the JavaScript version
to "AMP vX.X" from the amp-analytics tag template so that you can segment that traffic out
of a combined report suite if necessary.
What is the Marketing Cloud ID service? Do The Marketing Cloud ID Service (formerly visitor ID service) enables Marketing Cloud core
I need it? services and allows integrations between different Adobe Marketing Cloud solutions. If you
have integrations with Adobe Audience Manager or Adobe Target, you are likely using this
service. This service is also the foundation for many upcoming Adobe Analytics features.
If you need ID service support or will need it in the future, we recommend using the
iframeMessage solution.
For the The AMP standard does not allow for iframes to load from the exact domain and subdomain
"adobeanalytics_nativeConfig" of the AMP itself. As such, we recommend that you host the utility page on a separate
template, where should I host my utility subdomain from your main site, especially if your company has its own CDN that plans on
page? caching AMPs. For maximum compatibility, pick a subdomain such as
75
Question Answer
Isn't this similar to Facebook Instant Facebook Instant Articles support a similar solution to the nativeConfig solution outlined
Articles? How do I setup Adobe Analytics above. In fact, the stats.html page created above can serve your analytics needs for both
with Facebook Instant Articles? AMP and FIA simultaneously. For more information on implementing tracking on FIA, see
Facebook Instant Articles on page 76
//Instantiation
var visitor = Visitor.getInstance(v_orgId);
visitor.trackingServer = s_trackingServer;
var s = s_gi(s_account);
//Custom Variables
s.pageName = s.Util.getQueryParam("pageName");
s.prop10 = "Facebook Instant Article";
77
Visitor Tracking
As long as the Analytics HTML page is hosted on your web server, Adobe can support your existing privacy
policy across all Facebook Instant Articles. This means that if an end user has opted out of tracking on your
primary site, they will also be opted out of tracking on all your Facebook Instant Articles, with no additional
steps required. Using this utility page also means that the Marketing Cloud ID service (visitor ID) is supported
so that you can integrate the metrics and variables captured on your Facebook Instant Articles with the rest of
the Marketing Cloud. (An example is for targeted advertising using Adobe Audience Manager).
Tracking Limitations
There are few issues that should be noted with this approach. Any DOM values that are typically only accessible
via JavaScript on the Facebook Instant Article (such as referrer) will not be retrievable in the iframe for tracking.
However, standard technology reports like browser, device, screen size or resolution should work normally.
Moreover, the pageURL can be obtained by referencing document.referrer from your utility page.
What's Next?
Adobe Analytics is excited to partner with Facebook and our publishers to bring industry leading analytics
capabilities to publishers on the mobile web in a blazing fast user experience. We are committed to building the
best long term solution to answer the evolving analytics needs our customers have.
The Facebook Instant Article project is moving quickly and changes are happening all the time, so check back
with us frequently for updates. Expect changes as we improve our integrations further and as more publishers
adopt Facebook Instant Articles in the future.
If you have questions or problems, please reach out to your Adobe Consultant or Customer Care.
Web Browser
All Marketing Cloud customers have access to Dynamic Tag Management, which is the standard for deploying
JavaScript and HTML page tags for all solutions to your website.
Other ways of implementing JavaScript and HTML measurement are described in the Analytics
Implementation Guide.
Web Server
You can use native PHP and Java libraries on your web server to send analytics data.
The Data Insertion API lets you send XML data directly to the data collection server using HTTP POST
and GET, and Data Sources lets you send delimited hit data directly to Analytics.
• PHP AppMeasurement
• Java AppMeasurement
• Data Insertion API
• Data Sources
Mobile Device
Native libraries are provided for iOS, Android, Windows Phone 8, Blackberry, Symbian, and others.
• iOS AppMeasurement 4.x (latest version)
• iOS AppMeasurement 3.x
• Android AppMeasurement 4.x (latest version)
• Android AppMeasurement 3.x
Flash
Flash apps using ActionScript can be measured on the desktop and on the web.
Flash, Flex, and OSMF AppMeasurement
Video
Video measurement across all platforms is available in the following guides:
• Heartbeat video measurement (latest version)
• Milestone video measurement
JavaScript Library
This file contains common code that:
• Queries the browser about various properties, such as JavaScript version, OS version, the
size and resolution of monitor being used, and other variables
• Encodes and concatenates all the variables into an image request (<img>) that transports
these variables to the data collection servers. It then references a JavaScript library file which
is loaded and executed.
<noscript> tag A simplified version of the image request is placed within a <noscript> tag that executes if the
user has disabled JavaScript, or does not have JavaScript capabilities. This part of the
implementation is optional and generally applies to approximately 2% of the Internet population.
JavaScript can detect browser settings that are not available to a server, such as browser window height/width,
monitor resolution, and Netscape plug-ins. By using a server-side method to create an image tag, these variables
cannot be captured. The JavaScript sets a random number in the image request to overcome browser and proxy
server caching. This allows all page views to be accurately tracked. In certain situations, server-side code has
advantages over the JavaScript-based code, including the following:
• JavaScript is very accurate (98-100%). There are times when the utmost accuracy is desired, even in situations
where a user quickly clicks to another page before the JavaScript has executed. Creating the image tag server-side
increases the accuracy level by several percentage points.
• For tracking conversion events, such as purchases, where accuracy is very important.
79
• This strategy may also be used to fully populate the image request within the <noscript> tag for tracking users
without JavaScript, or with JavaScript disabled.
Note: The use of server-generated image tags requires additional time to implement, and is more difficult
to debug, deploy, and maintain. Adobe strongly encourages clients to use JavaScript-based data collection
on every page where possible. Various reports and features, including visitor click map, download links,
exit links, and browser-based variables (browser width/height, etc.) cannot be collected or supported using
this implementation method.
Case-Sensitive The parameter names (pageName, purchaseID, and so forth) are case-sensitive and will
not properly record data unless they appear as designated in the table displayed in Data
Collection Query Parameters on page 186.
Maximum Variable Length Each variable has a maximum length. This length is specified for each variable in
Variables for Analytics Implementation and Reporting on page 105. Exceeding the
maximum length for a variable causes the value of this variable to be truncated for storage
and display in Analytics.
Invalid Characters Characters with character codes above decimal 128 are invalid, as are not-printing character
codes under 128. HTML formatting ("<h1>") is also invalid, as are trademark, registered
trademark, and copyright symbols.
Protocol URL
The * in the URL above denotes a data-center specific URL that is provided to you by
your Adobe Consultant. Adobe uses several data centers, and it is necessary to implement
the correct URL your organization has been assigned. Any code downloaded out of Admin
Console within your company account has the correct data center supplied automatically.
Code provided from external sources may need to be corrected in order to point to the
correct data center.
For clients who use multiple report suites, they should be listed only in the directory
section, and not the domain section of the URL, as shown below.
Protocol URL
The * in the URL above denotes a data-center specific URL that is provided to you by
your Adobe Consultant. Adobe uses several data centers, and it is necessary to implement
the correct URL to which your organization has been assigned.
URL and Referring URL The URL and Referring URL may be populated from the server in the g= and r= variables.
Use the Request ServerVariables (HTTP_REFERRER) or Request ServerVariables
(URL) (IIS/ASP), or the appropriate variable for your server/scripting technology. The
referring URL (r=) is extremely important for tracking referring URLs, domains, search
engines, and search terms.
If pageName is not being used, it is imperative that the Current URL field is uniquely
populated. If neither pageName nor Current URL (g=) is populated, the record is invalid
and is not processed. At a minimum, the URL is a required field in order to process the
record.
Effects of Caching
HTML and other Web pages can be cached by browsers or servers that are between the
visitor and the website that is serving the content. Caching prevents an accurate count of
page views and other events unless a "cache-busting' technique is employed.
Adobe's standard JavaScript includes a dynamic method of changing the image request
to avoid page and image caching, allowing an accurate count of page views.
However, in creating a server-side image request, this randomization does not occur. Page
reloads and cached pages (either in the browser's cache or in a proxy server) are not
counted in certain cases when using server-side image requests.
SSL (https:) pages are not, by definition, ever cached so this warning applies only to
non-secure (http:) pages. Additionally, pages with parameters
(http://www.samplesite.com/page.asp?parameter=1)
or certain file extensions (.asp, .jsp, etc.) are also not cached.
The examples below also illustrate a minimal JavaScript solution that primarily assembles
the image request server-side, and tacks on a random number in the browser. This method
overcomes the caching that would otherwise be encountered on static HTML pages
accessed via the http: protocol.
nameSpace Variable
The nameSpace query string parameter is required for non-JavaScript implementations.
Example: ns=nameSpace
Contact your Adobe Consultant or Account Manager to obtain your organization's
nameSpace value.
Sample Code
Navigation title:Sample Code
Examples to illustrate the use of a server-generated image tag within a HTML sample page.
The table below displays the values used in the sample.
Variable Value
events purchase,event1
c1 Registered
purchaseID 0123456
81
Variable Value
products Books;Book Name;1;19.95
state CA
zip 90210
a random # 123456
Example 1
The example below displays a server-side image tag. The highlighted random number prevents caching of the
image.
<html>
<head>
</head>
<body>
Order Confirmation<br>
Thanks for your order #0123456.
<img
src="https://102.112.207.net/b/ss/suite1,suite2/1/G.4--NS/123456?pageName=Order%20
Confirmation&events=purchase%2Cevent1&c1=Registered&purchaseID=0123456&products=Books%3BBook%20Name%3B1%3B19.95&state=CA&zip=90210&g=https%3A//www.somesite.com/cart/confirmation.asp"
width="1" height="1" border="0" />
</body>
</html>
Example 2
The example below shows a minimal JavaScript image tag.
<html>
<head>
</head>
<body>
Order Confirmation<br>
Thanks for your order #0123456.
<script language="javascript"><!—
s.s_date = new Date();
s.s_rdm = s.s_date.getTime();
s.s_desturl="<img width=\"1\" height=\"1\"
src=\"https://102.112.207.net/b/ss/suite1,suite2/1/G.4--NS/" + s.s_rdm +
"?pageName=Order%20Confirmation&events=purchase%2Cevent1&c1=Registered
&purchaseID=0123456&products=Books%3BBook%20Name%3B1%3B19.95&state=CA&zip=90210&g=http
s%3A//www.somesite.com/cart/confirmation.asp\">";
document.write(s.s_desturl);
//--></script>
</body>
</html>
WAP 2.0 Most phones are WAP 2.0 compliant, meaning they support XHTML MP (a mobile version of XHTML).
I-Mode
I-Mode supports CHTML (compact HTML) and does not download third-party images. First-party collection
domain implementations should always be used with I-Mode sites so images are downloaded.
83
Change the Default Image Type
If the default image type is not supported on a particular device, no data is returned. To avoid this, you can force
the Adobe data collection server to return a particular graphic type that the mobile device supports. The code
following the report suite name specifies the image type:
• /5/ returns the default image type.
• /5.1/ or /1/ always returns a GIF image.
• /5.5/ always returns a WBMP image.
SeeIdentifying Mobile Devices on page 238.
Connection Types
Adobe maintains a known range of IP addresses that belong to mobile carriers. When a hit is received from an
IP range that belongs to a known mobile carrier, the hit appears as "Mobile Carrier" on the Connection Type
Report. Otherwise, mobile traffic is listed under "Lan/Wifi".
Time Zones, Cookies, Java, JavaScript, Monitor Colors and Resolutions, Browser Width and
Height, and Netscape Plug-ins
These reports are all collected by using JavaScript to detect specific settings of the browser. Because JavaScript
is not used to create the image beacon on mobile devices, data collected from mobile users is not included in
these reports.
Important:
In September 2013, Adobe launched Dynamic Tag Management (DTM) as an included core service of
the Adobe Marketing Cloud. As part of our ongoing commitment to expand and add continued value to
the DTM platform, Adobe Tag Manager (ATM) will be discontinued, and customers will be transitioned
to DTM. The advantages of DTM include significantly improved integrations with Adobe marketing
solutions and the overall Marketing Cloud, improved tag performance, and powerful rule-based controls
over when and how your tags are deployed.
We want to make this transition as smooth as possible, so here is what you need to know about our transition
plan:
• Starting August 1, 2015, you will no longer be able to edit your tags or containers in ATM. You will
still be able to log into the application to view and export existing tags and containers, and your tags
will continue to be served. However, if you want to make changes, you will need to deploy DTM on
your site(s) and transition these tags to DTM.
• Starting October 1, 2015, the ATM application will become unavailable and your tags will no longer be
served. If you have not transitioned your sites away from ATM by this date, it is possible that your
website visitors may experience errors. It is critical that you transition prior to this date. Adobe will
begin sending periodic reminders between now and this date to remind you to begin the migration process
as soon as possible.
See Migrating from Adobe Tag Manager for information about migrating to DTM from ATM versions
1.0 and 2.0.
85
were released or if you wanted to use an additional module or plug-in, the JavaScript file had to be updated.
Target, AudienceManager, and other products used a similar process.
With tag management, you now place a snippet of code on your pages, and all tags are loaded directly from tag
management, including any core JavaScript required. Tag updates and new tag deployments are managed in the
tag management UI.
The cookie can be set using the bookmarklets available in the tag management interface. If your browser does
not support adding the bookmarklet, you can manually create a bookmark by copying and pasting the URL:
javascript:document.cookie='s_tagEnv=dev;%20path=/';void(0)
These bookmarklets can be used to quickly switch between the current versions in each environment.
87
If you browse to a site that includes the tag loader without setting the dev cookie, an attempt is made to load the
live version. Since there isn't a version in live, the tag container is not found and the loader fails gracefully.
If a tag container fails to load make sure the dev cookie is set correctly or that you have promoted a live version
of the tag container.
Tag Processing Order
By default, most tag management tags are executed asynchronously. This provides a number of performance
benefits, since your page continues to load while tags execute. However, there are some cases where you need
to load and execute a tag synchronously, such as with an implementation of Adobe Target. Synchronous loading
was added as an option in tag management 2.0 to provide for this use case.
When a page loads, tag management inserts all synchronous tags defined in a tag container at the location of the
page code, which should be placed directly after the opening <body> tag.
These synchronous tags are executed in order in the main processing thread. Asynchronous tags are executed in
separate threads, and multiple asynchronous scripts might be executed in parallel depending on the browser.
For example, in the previous diagram, synchronous tag 1 executes before synchronous tag 2. Asynchronous tags
can be executed in any order, depending on how long they take to execute and the processing architecture of the
browser. In the previous diagram, asynchronous tag 2 might complete before asynchronous tag 1, but might
complete after synchronous tag 2.
Step 1 Create a New Container on page 89 Define a tag container to provide analytics on your
Tag management UI
website.
Step 2 Define Tags on page 89 Add support for products, Genesis integrations, and
Tag management UI
affiliate beacons to the tag container.
Step 3 Copy Environment Bookmarklets on page Save bookmarklets that let you switch between the dev,
Tag management UI
90 state, and live environments to test your tag container.
Step 4 Include the Page Code on Site Pages on Add tag management page code to each page on your
Your website
page 90 website.
Step 5 Test and Promote Revisions on page 90 Set up your workflow to test and promote tag container
Tag management UI
versions.
Define Tags
After you create a new tag container, the Edit Tags page displays. This page is where you add product tags and
add any custom code.
Keep the following key concepts in mind as you create and deploy a tag container:
• Tag containers are hosted on a CDN. Each time a new revision is deployed it takes several minutes to propagate
to the edge nodes.
89
• Tag Containers are optimized to use asynchronous loading where possible to improve performance. If variables
are not being populated or resources are not being found, make sure the code is inserted in the correct location
or if necessary, switch to synchronous loading.
• Each tag container has a dev, stage, and live environment. New tag containers are created with a dev version
only. You must set a cookie to load the dev version. See Tag Container Environments on page 86.
For details on product deployment, see Marketing Cloud Deployment on page 97.
If you are an existing Analytics, Target, or Media Optimizer customer migrating to tag management, see Migrating
to tag management 2.0 from a Legacy Implementation on page 94.
If you are an existing tag management 1.0 customer migrating to tag management 2.0, see Migrating to tag
management 2.0 from tag management 1.0 on page 91.
Note: Tag Containers cannot be deleted or renamed after they are created.
91
Step Task Location Description
Step 3 Tag Manager
Create a 2.0 Revision on page 92 Create a 2.0 revision of the tag container and migrate your tags. See
UI
1.0 to 2.0 Tag Mapping on page 93.
The tag management 1.0 guide is available for reference during your migration.
Important: Do not edit the page code in your live environment until you have completed Step 5 and
have deployed a 2.0 tag container to live and verified the deployment status.
Replace your existing 1.0 page code with the 2.0 page code in a dev environment. The 2.0 page code should be
inserted directly after the opening <body> tag. For now, the 2.0 page code continues to reference the 1.0 tag
container.
After the new page code is deployed, click the I have deployed the Page Code button.
Promote to Live
When testing is complete, promote the 2.0 tag container to the live environment. After you have verified that
the tag container is deployed to live, you can update the page code in your live environment.
1.0 to 2.0 Tag Mapping
This section describes how to migrate from each tag management 1.0 tag to a tag management 2.0 tag.
Custom Core
JavaScript on page 99 or Insert a Custom Code Javascript tag and paste the code directly into this tag. This
Javascript
Remote Script on page 99 tag should appear before any product tags that depend on functionality defined in
this tag.
(optional) Tag management 2.0 adds the ability to load remote scripts before
products. Depending on the size of the code in this section, you might consider
moving it to an external file and then referencing it using a remote script tag
instead. If so, insert a Custom Code Remote Script tag instead and select the
synchronous option.
Product Code
For each tag, insert a new Integrate Module tag and set the Description field equal
to the integration name set in the Integrate.add call:
s.Integrate.add("DFA")
Copy all of the code from the 1.0 tag to the 2.0 tag.
93
1.0 Product Code 2.0 Tag Migration Instructions
Tag
Locate the mboxOnLoad function in your 1.0 Target tag. Copy the contents
of this function to the matching function in the On Load section of the 2.0 tag.
Note: Do not overwrite the entire On Load section as the 2.0 tag contains
some syntax differences.
Demdex AudienceManager
The 2.0 AudienceManager tag delivers the required JavaScript library and plug-ins
for Audience Manager.
Copy your implementation code from the 1.0 Demdex Tag Code section to the
2.0 AudienceManager Tag Code section.
HTML HTML
Copy all of the code from the 1.0 tag to the 2.0 tag and recreate the Conditional
Execution using Firing Rules on page 99.
Javascript Javascript
Copy all of the code from the 1.0 tag to the 2.0 tag and recreate the Conditional
Execution using Firing Rules on page 99.
IFrame IFrame
Copy all of the code from the 1.0 tag to the 2.0 tag and recreate the Conditional
Execution using Firing Rules on page 99.
Step 1 Tag management Quick Start on Tag Create a new tag container and deploy it in a development
page 89 management environment. Add the tag management page code to some pages
UI in a development environment, but do not make any changes to
your live site.
Step 2 Migrate Legacy Implementation Tag Migrate your legacy implementation code to tags. See Legacy
Code on page 95 management Implementation to Tag Mapping on page 96.
UI
Step 4 Promote a Live Version on page Tag Deploy and test the tag container to make sure everything works
96 management correctly. When testing is complete, promote a tag container to
UI the live environment.
Step 5 Update Live Page Code on page Your website Replace the current page code on your live site with the updated
96 tag management 2.0 page code.
95
Aside from the code management difficulties, the biggest drawback is that this link won't function in the rare
case that the tag container can't be loaded from the CDN. For situations where tag unavailabilty prevents interaction
with the page, we recommend adding the event handler in tag management.
})();
97
Analytics
Analytics implementations though tag management support all of the variables and functions available with a
legacy implementation.
For detailed information on implementing Analytics, see the Analytics Implementation Guide.
Setting Description
Accounts Select one or more report suites to receive the data that is sent by this tag.
Secure Server (Optional) If you have a secure server URL, provide it here. Leave it blank to default to the non-secure
server URL.
Character Set Select the character set used by your report suite.
Currency Code Select the currency code used by your report suite.
Instance Variable If your instance variable name has changed from the default, provide the new variable name.
When a new version of AppMeasurement for JavaScript is release, you are prompted to upgrade the next time
you edit.
JavaScript Video Measurement
Video measurement code is placed in the code block in the Video Tracking section.
Implementation details on measuring video are included in the Measuring Video in Analytics guide.
Survey
Integration with Survey is provided through the Survey module. After you add the module, you can define any
additional settings required by your implementation.
See Standard Survey Implementations on the Web.
s.loadModule("Survey")
var s_sv_dynamic_root = "delivery.d1.sv.omtrdc.net/survey/dynamic"
var s_sv_gather_root = "collection.d1.sv.omtrdc.net/survey/gather"
Target
Navigation title:Target
Provide your client id when prompted. The necessary dependencies, such as mbox.js are delivered automatically.
You can use the On Load field to deliver a global mbox at the top of the page. You can also leverage amc.on
to control the execution of on-page mbox create function calls.
AudienceManager
The Audience Manager tag delivers the required JavaScript library and plug-ins for Audience Manager.
After adding this tag, place your implementation code in the On Load section of the tag.
99
Assign Permissions
Admin > User Management > Groups> Click a group.
Tag management permissions can be assigned to any custom group or any individual members of a custom
group.
Callback Events
Instead of relying on browser execution order, tag management provides an interface that lets you execute code
based on tag events. This lets you deliver tags asynchronously to optimize performance, and still execute additional
code after a tag loads or when other events occur.
Callbacks can be associated with the following events using amc.on:
tagload Triggered when a tag has been loaded and is ready to use.
tagignore Triggered when by some unknown reason one tag could not be append in the page.
domcontentloaded Triggered when the DOMContentLoaded event from the browser is triggered.
tagload.tagid For the events starting with tag (tagload, tagappend, tagignore) hierarchical event names are
tagappend.tagid supported. This means that the id of the tag can be added after the event name.
tagignore.tagid
Don't confuse these events with the DomContentLoaded or the onload events from browser. These events
can be triggered before or after the events triggered by the browser.
Callback methods have the following syntax:
amc.on('eventname', function (event, data) {
});
Each callback method receives the following arguments:
• event - the event name for which this callback will be processed.
• data - an object having the following structure:
{
id: 'tagid',
tag: TagInstance
}
Note: Any code using the amc.on method should be added in the page after the page code. Code that
depends on tags that are delivered by tag management should not be placed in the <head> element.
Examples
The following examples are based on a tag container that has 2 components:
• Analytics - with the id 'analytics'
• Target - with the id 'testandtarget'
Load
amc.on('load', function (event, data) {
// Here we can add code that will be triggered once all the tags have been
loaded by tag management.
// For set eVars, props, events, and then call s.t(). You can also do
this directly
// in tagmanager UI if you don't need page elements
});
Tag Load
amc.on('tagload', function (event, data) {
//called twice. Once for Analytics, and once for Target
});
You can find out the component for which the event was triggered by looking at the data object. This callback
is for advanced users who need complex functionality. For example, you might have 10 tags to add in the page,
but want to define an action when only 3 of them are loaded, independent of the other 7.
Specific Tag Loaded
amc.on('tagload.analytics', function (matchedmessage, data) {
});
This callback is triggered when the tag with the ID of analytics has been loaded by the browser. This is the
same as placing the code in the On Load section of the Analytics tag in the tag management UI (assuming your
Analytics tag has an id of 'analytics').
101
For example, if you need to place code that is dependent on Analytics in the Target tag, you can add code similar
to the following in the On Load section of the Target tag:
var mboxServerHost='omniture.tt.omtrdc.net;'
(function mboxOnLoad() {
})();
amc.on('tagload.analytics', function () {
//place code here that will run after Analytics and Target are loaded
});
Nested DOM Content Loaded within the Analytics Tag
If you need to call s.t on the page instead of within the On Load section in the Analytics tag, the call should
be contained within two callbacks. The first when the Analytics tag is loaded, and the second when the DOM is
loaded:
amc.on('tagload.analytics', function (matchedmessage, data) {
amc.on('domcontentloaded', function () {
if (s) {
s.pageName = document.getElementById('pagetitle').innerHTML;
s.t();
}
});
});
This method is used if you need to interact with the DOM before making the tracking call.
Troubleshooting
This section contains instructions to help troubleshoot tag container deployment.
Confirm that a tag revision is deployed in the environment you are testing.
103
If the page code is present but the tag container is not loading on some of your pages, verify that the bucket_id
in your page code matches the bucket_id in amc.js:
105
s.charSet="ISO-8859-1"
s.currencyCode="USD"
s.trackDownloadLinks=true
s.trackExternalLinks=true
s.trackInlineStats=true
s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls"
s.linkInternalFilters="javascript:,three,two,one,dev16,.,nike"
s.linkLeaveQueryString=false
s.linkTrackVars="None"
s.linkTrackEvents="None"
s.debugTracking=true
s.usePlugins=true;
function s_doPlugins(s) {
//add your custom plugin code here
}
s.doPlugins=s_doPlugins;
/*
============== DO NOT ALTER ANYTHING BELOW THIS LINE ! ===============
Configuration Variables
Configuration variables set in the AppMeasurement.js.
Configuration variables control the way data is captured and processed in reporting. The most-common
configuration variables that are typically set in the main global JavaScript (AppMeasurement.js). These
variables can be set within the Reports & Analytics page-level code and links when appropriate.
Not all of these variables appear in the code by default when you generate code through the Admin Tool > Code
Manager. Some of these configuration variables may not be applicable to your site's implementation needs.
Some of the goals of using these configuration variables are:
• Track multiple sites/domains.
• Use any currency on purchases.
• Capture data indifferent languages.
• Link tracking (number of downloaded files, links to external sites.
• Track custom links for unique purposes.
s.account
Navigation title:s.account
The s.account variable determines the report suite where data is stored and reported.
If sending to multiple report suites (multi-suite tagging), s.account may be a comma-separated list of values.
The report suite ID is determined by Adobe.
Parameters
Max Size Debugger Parameter Reports Populated Default Value
Each report suite ID must match the value created in the Admin Console. Each report suite ID must be 40 bytes
or less, but the aggregate of all report suites (the entire comma-separated list) has no limit.
The report suite is the most fundamental level of segmentation in reporting. You can set as many report suites
as your contract allows. Each report suite refers to a dedicated set of tables that are populated in Adobe's collection
servers. A report suite is identified by the s_account variable in your JavaScript code.
Within Analytics, the site drop-down box in the upper left of the reports displays the current report suite. Each
report suite has a unique identifier called a report suite ID. The s_account variable contains one or more report
suite IDs to which data is sent. The report suite ID value, which is invisible to Analytics users, must be provided
or approved by Adobe before you use it. Every report suite ID has an associated "friendly name" that can be
changed in the report suites section of the Admin Console.
The s_account variable is normally declared inside the JavaScript file (s_code.js). You can declare the s_account
variable on the HTML page, which is a common practice when the value of s_account may change from page
to page. Because the s_account variable has a global scope, it should be declared immediately before including
Adobe's JavaScript file. If s_account does not have a value when the JavaScript file is loaded, no data is sent to
Analytics.
Adobe's DigitalPulse Debugger displays the value of s_account in the path of the URL that appears just below
the word "Image," just after /b/ss/. In some cases, the value of s_account also appears in the domain, before
112.2o7.net. The value in the path is the only value that determines the destination report suite. The bold text
below shows the report suites that data is sent to, as it appears in the debugger. See Adobe Debugger on page
257.
http://mycompany.112.207.net/b/ss/mycompanycom,mycompanysection/1/H.1-pdv-2/s21553246810948?[AQB]
107
Examples
var s_account="mycompanycom"
var s_account="mycompanycom,mycompanysection"
s.dynamicAccountSelection
Navigation title:s.dynamicAccountSelection
The dynamicAccountSelection variable lets you dynamically select the report suite based on the URL of each
page.
Examples
s.dynamicAccountSelection=true
s.dynamicAccountSelection=false
Configuration Settings
None
s.dynamicAccountList
Navigation title:s.dynamicAccountList
AppMeasurement for JavaScript can dynamically select a report suite to which it sends data. The
dynamicAccountList variable contains the rules used to determine the destination report suite.
Max Size Debugger Parameter Reports Populated Default Value
This variable is used in conjunction with the dynamicAccountSelection and dynamicAccountMatch variables.
The rules in dynamicAccountList are applied if dynamicAccountSelection is set to 'true,' and they apply to the
section of the URL specified in dynamicAccountMatch.
If none of the rules in dynamicAccountList matches the URL of the page, the report suite identified in s_account
is used. The rules listed in this variable are applied in a left-to-right order. If the page URL matches more than
one rule, the left-most rule is used to determine the report suite. As a result, your more generic rules should be
moved to the right of the list.
In the following examples, the page URL is http://www.mycompany.com/path1/?prod_id=12345,
dynamicAccountSelection is set to 'true,' and s_account is set to "mysuitecom."
DynamicAccountList Value DynamicAccountMatch Value Report Suite to Receive Data
Examples
s.dynamicAccountList="mysuite2=www2.mycompany.com;mysuite1=mycompany.com"
s.dynamicAccountList="ms1,ms2=site1.com;ms1,ms3=site3.com"
Configuration Settings
None
109
• If your page is saved to someone's hard drive or translated via a web-based translation engine (such as Google's
translated pages), the dynamic account selection probably won't work. For more precise tracking, populate the
s_account variable server-side.
• The dynamicAccountSelection rules apply only to the section of the URL specified in dynamicAccountMatch.
• When using dynamic account selection, be sure to update dynamicAccountList every time you obtain a new
domain.
• Use the DigitalPulse Debugger when trying to identify the destination report suite. The dynamicAccountSelection
variable always overrides the value of s_account.
s.dynamicAccountMatch
Navigation title:s.dynamicAccountMatch
The dynamicAccountMatch variable uses the DOM object to retrieve the section of the URL to which all rules
in dynamicAccountList are applied.
This variable is only valid when dynamicAccountSelection is set to 'True.' Since the default value is
window.location.host, this variable is not required for Dynamic Account Selection to work. For
additional information, see s.dynamicAccountList on page 109.
The rules found in dynamicAccountList are applied to the value of dynamicAccountMatch. If
dynamicAccountMatch only contains window.location.host (default), the rules in dynamicAccountList
apply only to the domain of the page.
Max Size Debugger Parameter Reports Populated Default Value
Description Value
Path window.location.pathname
Examples
s.dynamicAccountMatch=window.location.pathname
s.dynamicAccountMatch=window.location.host+window.location.pathname
Configuration Settings
None
s.dynamicVariablePrefix
Navigation title:s.dynamicVariablePrefix
The dynamicVariablePrefix variable allows deployment to flag variables, which should be populated dynamically.
Cookies, request headers, and image query string parameters are available to be populated dynamically.
Max Size Debugger Parameter Reports Populated Default Value
N/A D= Any D=
Examples
s.prop1="D=User-Agent”
OR USE CUSTOM FLAG FOR DYNAMIC VARIABLES
s.dynamicVariablePrefix=".."
s.prop1="..User-Agent"
s.charSet
Navigation title:s.charSet
The charSet variable translates the character set of the Web page into UTF-8.
If the charSet variable contains an incorrect value, the data in all other variables are translated incorrectly. If
JavaScript variables on your pages (e.g. pageName, prop1, or channel) contain only ASCII characters, charSet
does not need to be defined. However, if the variables on your pages contain non-ASCII characters, the charSet
variable must be populated.
Parameters
Max Size Debugger Parameter Reports Populated Default Value
The charSet variable is used to identify the character set of the page. For more information on character sets,
see the Multi-byte Character Sets white paper before using the charSet variable.
111
Syntax and Possible Values
The charSet variable may only contain one of a predefined set of values, as listed in Multi-byte Character Sets.
s.charSet="character_set"
Examples
s.charSet="ISO-8859-1"
s.charSet="SJIS"
s.currencyCode
Navigation title:s.currencyCode
The currencyCode variable determines the conversion rate to be applied to revenue.
All monetary amounts are stored in a currency of your choice. If that currency is the same as that specified in
currencyCode, or currencyCode is empty, no conversion is applied.
Max Size Debugger Parameter Reports Populated Default Value
If your site allows visitors to purchase in multiple currencies, you should use the currencyCode variable to make
sure revenue is stored in the appropriate currency. For example, if the base currency for your report suite is USD,
and you sell an item for 40 Euros, you should populate the currencyCode with "EUR" on the HTML page. As
soon as data collection receives the data, it uses the current conversion rate to convert the 40 Euros to its USD
equivalent.
Populating the currencyCode variable on the HTML page instead of in the JavaScript file is recommend if you
sell in multiple currencies. If you want to use your own conversion rates rather than the conversion rates used
by Adobe, set the currencyCode to equal the base currency of your report suite. You then convert all revenue
before sending it into Analytics.
Currency conversion applies to both revenue and any currency events. These are events that are used to sum
values similar to revenue, such as tax and shipping. The revenue and currency events are specified in the products
string. For more information on products, see Configure Events on page 136. For more details on how currencies
are managed, see Multi-Currency Support..
Examples
s.currencyCode="GBP"
s.currencyCode="EUR"
s.cookieDomain
Navigation title:s.cookieDomain
The cookieDomain variable determines the domain on which the Analytics cookies s_cc and s_sq are set.
Commonly, s.cookieDomainPeriods is used to generate s.cookieDomain from
window.location.hostname. Instead of using s.cookieDomainPeriods, you can explicitly set
s.cookieDomain to what you want to use in your implementation. For example, you could set cookies at
the fully qualified page-name using:
s.cookieDomain = window.location.hostname;
s.cookieDomainPeriods
Navigation title:s.cookieDomainPeriods
The cookieDomainPeriods variable determines the domain on which the Analytics cookies s_cc and s_sq are
set by determining the number of periods in the domain of the page URL. This variable is also used by some
plug-ins in determining the correct domain to set the plug-in's cookie.
The default value for cookieDomainPeriods is "2". This is the value that is used if cookieDomainPeriods is
omitted. For example, using the domain www.mysite.com, cookieDomainPeriods should be "2". For
www.mysite.co.jp, cookieDomainPeriods should be "3".
If cookieDomainPeriods is set to "2" but the domain contains three periods, the JavaScript file attempts to set
cookies on the domain suffix.
For example, if setting cookieDomainPeriods to "2" on the domain www.mysite.co.jp, the s_cc and s_sq
cookies are created on the domain co.jp. Because co.jp is an invalid domain, almost all browsers reject
these cookies. As a consequence, visitor click map data is lost, and the Visitor Profile > Technology > Cookies
report indicates that almost 100% of visitors reject cookies.
If cookieDomainPeriods is set to "3" but the domain contains only two periods, the JavaScript file sets the cookies
on the subdomain of the site. For example, if setting cookieDomainPeriods to "3" on the domain
www2.mysite.com, the s_cc and s_sq cookies are created on the domain www2.mysite.com. When a
visitor goes to another subdomain of your site (such as www4.mysite.com), all cookies set with
www2.mysite.com cannot be read.
113
See also s.fpCookieDomainPeriods on page 114.
Max Size Debugger Parameter Reports Populated Default Value
Note: Some cloud computing services are considered Top-Level Domains, which do not allow cookies
to be written. (For example, *.compute.amazonaws.com, *.herokuapp.com,
*.googlecode.com, and so on.) If you implement on those services, you could potentially be affected
by Analytics privacy setting that removes users who have blocked all cookies if you don't have your own
domain set up (for example, if you're testing your implementation). In this case, any hit where the system
has determined that cookies are disabled, non-functional, or inaccessible is opted out and thus excluded
from reporting.
Examples
Setting the variable manually:
s.cookieDomainPeriods = "3";
Several examples to dynamically set the variable if your core JavaScript file hosts both types:
document.URL.indexOf(".co.") > 0 ? s.cookieDomainPeriods = "3" :
s.cookieDomainPeriods = "2";
s.cookieDomainPeriods = "2";
var d=window.location.hostname;
if(d.indexOf(".co.uk") > 0 || d.indexOf(".com.au") > 0)
{s.cookieDomainPeriods = "3";}
s.cookieDomainPeriods = "2";
if(window.location.indexOf(".co.jp") > 0 ||
window.location.indexOf(".com.au") > 0)
{s.cookieDomainPeriods = "3";}
s.fpCookieDomainPeriods
Navigation title:s.fpCookieDomainPeriods
The fpCookieDomainPeriods variable is for cookies set by JavaScript (s_sq, s_cc, plug-ins) that are inherently
first-party cookies even if your implementation uses the third-party 2o7.net or omtrdc.net domains.
The fpCookieDomainPeriods variable should never be dynamically set . If you use cookieDomainPeriods, it is
good practice to specify a value for fpCookieDomainPeriods as well. fpCookieDomainPeriods inherits the
cookieDomainPeriods value. Note that fpCookieDomainPeriods does not affect the domain on which the visitor
ID cookie is set, even if your implementation treats this as a first-party cookie.
The name "fpCookieDomainPeriods" refers to the number of periods (".") in the domain when the domain begins
with "www." For example, www.mysite.com contains two periods, while www.mysite.co.jp contains three
Examples
s.fpCookieDomainPeriods="3"
s.fpCookieDomainPeriods="2"
Configuration Settings
None
s.cookieLifetime
The cookieLifetime variable is used by both JavaScript and data collection servers in determining the lifespan
of a cookie.
Max Size Debugger Parameter Reports Populated Default Value
If cookieLifetime is set, it overrides any other cookie expirations for both JavaScript and data collection servers,
with one exception, described below. The cookieLifetime variable can have one of three values:
• Analytics Cookies
• Cookies
• JavaScript Settings and Plugins
115
Examples
s.cookieLifetime="SESSION"
s.cookieLifetime="86400" // one day in seconds
Configuration Settings
None
s.doPlugins
Navigation title:s.doPlugins
The doPlugins variable is a reference to the s_doPlugins function, and allows the s_doPlugins function to be
called at the appropriate location within the JavaScript file.
The s_doPlugins function is called each time any of the following occurs:
• The t() function is called
• The tl() function is called
• An exit or download link is clicked
• Any page element being tracked by visitor click map is clicked
The doPlugins function is used to run customized routines to gather or alter data. If you are using an object name
other than "s," make sure that the s_doPlugins is renamed appropriately. For example, if your object name is
s_mc, the s_doPlugins function should be called s_mc_doPlugins.
Examples
s.doPlugins=s_doPlugins;
s_mc.doPlugins=s_mc_doPlugins;
Configuration Settings
None
The trackDownloadLinks variable should only be set to 'false' if there are no links to downloadable files on your
site, or you don't care to track the number of clicks on downloadable files. If trackDownloadLinks is 'true,' when
a file download link is clicked, data is immediately sent to Analytics. The data that is sent with a download link
includes the link download URL, and visitor click map data for that link. If trackDownloadLinks is 'false,' then
visitor click map data for links to downloadable files on your site is likely to be under reported.
Examples
s.trackDownloadLinks=true
s.trackDownloadLinks=false
Configuration Settings
None
s.trackExternalLinks
Navigation title:s.trackExternalLinks
If trackExternalLinks is 'true,' linkInternalFilters and linkExternalFilters are used to determine whether any link
clicked is an exit link.
Max Size Debugger Parameter Reports Populated Default Value
The trackExternalLinks variable should only be set to 'false' if there are no exit links on your site, or if you don't
care to track the number of clicks on those exit links. An exit link is any link that takes a visitor off of your site.
If trackExternalLinks is 'true,' then when you click an exit link, tracking data is immediately sent. The data that
is sent with an exit link includes the link URL, link name, and visitor click map data for that link. If
trackExternalLinks is 'false,' then visitor click map data for exit links on your site is likely to be under reported.
117
Examples
s.trackExternalLinks=true
s.trackExternalLinks=false
Configuration Settings
None
s.trackInlineStats
Navigation title:s.trackInlineStats
The trackInlineStats variable determines whether ClickMap data is gathered.
If trackInlineStats is 'true,' data about the page and link clicked are stored in a cookie called s_sq. If 'false,' s_sq
will have a value of "[[B]]," which is considered null.
Max Size Debugger Parameter Reports Populated Default Value
Examples
s.trackInlineStats=true
s.trackInlineStats=false
Configuration Settings
None
s.linkDownloadFileTypes
The linkDownloadFileTypes variable is a comma-separated list of file extensions.
If your site contains links to files with any of these extensions, the URLs of these links will appear in the File
Downloads report.
Max Size Debugger Parameter Reports Populated Default Value
Examples
s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls"
s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls,xml"
Configuration Settings
None
s.linkInternalFilters
Navigation title:s.linkInternalFilters
The linkInternalFilters variable is used to determine which links on your site are exit links.
It is a comma-separated list of filters that represent the links that are part of the site.
Max Size Debugger Parameter Reports Populated Default Value
Note: We had previously suggested setting the linkInternalFilters to javascript:. However, this resulted
in all domains being considered external, including the current domain on which the tag resides. If you
want several domains to be considered internal, you can add those, as shown in the examples below.
The linkInternalFilters variable is used to determine whether a link is an exit link, which is defined as any link
that takes a visitor away from your site. Whether the target window of an exit link is a pop-up, or the existing
window, does not affect whether the link appears in the exit links report. Exit links are only tracked if
119
trackExternalLinks is set to "true". (See Link Tracking in the Dynamic Tag management documentation for
information about how DTM handles exit links.) The filters in linkInternalFilters are not case-sensitive.
The list of filters in linkInternalFilters applies to the domain and path of any link by default. If
linkLeaveQueryString is set to "true", then the filters apply to the entire URL (domain, path, and query string).
The filters are always applied to the absolute path of the URL, even if a relative path is used as the href value.
Be careful that all the domains of your site (and any partners who are using your JavaScript file) are included
in linkInternalFilters. If you do not have all domains included in the list, all links on and to those domains are
considered exit links, increasing the server calls sent. If you would like multiple domains or companies to use
a single AppMeasurement for JavaScript file, you may consider populating linkInternalFilters on the page,
overriding the value specified in the JavaScript file. If you have vanity domains that immediately redirect to
your main domain, those vanity domains do not need to be included in the list.
The following example illustrates how this variable is used. In this example, the URL of the page is
http://www.mysite.com/index.html.
s.trackExternalLinks=true
s.linkInternalFilters="mysite.com"
s.linkExternalFilters=""
s.linkLeaveQueryString=false
...
<a href="http://www.mysite.com">Not an Exit Link</a>
<a href="/careers/job_list.html">Not an Exit Link</a>
<a href="http://www2.site3.com">Exit Link</a>
<a href="http://www2.site1.com/partners/">Exit Link</a>
Examples
s.linkInternalFilters="mysite.com"
s.linkInternalFilters="mysite.com,mysite.net,vanity1.com"
Configuration Settings
None
s.linkLeaveQueryString
Navigation title:s.linkLeaveQueryString
By default, query strings are excluded from all reports.
Note: Setting linkLeaveQueryString=true includes all query string parameters for all exit links and
download links.
Syntax
s.linkLeaveQueryString=[false/true]
Examples
s.linkLeaveQueryString=false
Possible Values
s.linkLeaveQueryString=false
s.linkLeaveQueryString=true
s.linkTrackVars
Navigation title:s.linkTrackVars
The linkTrackVars variable is a comma-separated list of variables that are sent with custom, exit, and download
links.
If linkTrackVars is set to "", all variables that have values are sent with link data. To avoid inflation of instances
or page views associated with other variables, Adobe recommends populating linkTrackVars and linkTrackEvents
in the onClick event of a link that is used for link tracking.
All variables that should be sent with link data (custom, exit, and download links) should be listed in
linkTrackVars. If linkTrackEvents is used, linkTrackVars should contain "events."
Max Size Debugger Parameter Reports Populated Default Value
121
When populating linkTrackVars, do not use the 's.' prefix for variables. For example, instead of populating
linkTrackVars with "s.prop1," you should populate it with "prop1." The following example illustrates how
linkTrackVars should be used.
s.linkTrackVars="eVar1,events"
s.linkTrackEvents="event1"
s.events="event1"
s.eVar1="value A"
s.eVar2="value B"
s.t() // eVar1, event1 and event2 are recorded
<a href="http://google.com">event1 and eVar1 are recorded</a>
<a href="test.php" onClick="s=s_gi('rs1');s.eVar1='value
C';s.events='';s.tl(this,'o')">eVar1 is recorded</a>
Because the link to google.com is an exit link (unless you are Google), event1 and eVar1 are sent with the exit
link data, increasing the instances associated with eVar1 and the number of times event1 is fired. In the link to
test.php, eVar1 is sent with a value of 'value C' because that is the current value of eVar1 at the time that
tl() is called.
Examples
s.linkTrackVars="events,prop1,eVar49"
s.linkTrackVars="products"
Configuration Settings
None
s.linkTrackEvents
Navigation title:s.linkTrackEvents
The linkTrackEvents variable is a comma-separated list of events that are sent with a custom, exit, or download
link.
If an event is not in linkTrackEvents, it is not sent to Analytics, even if it is populated in the onClick event of a
link, as shown in the following example:
s.linkTrackVars="events"
s.events="event1,event2"
s.t() // both event1 and event2 are recorded
<a href="help.php" onClick="s=s_gi('rs1');s.tl(this,'o')">event1 is
recorded</a>
Examples
s.linkTrackEvents="purchase,event1"
s.linkTrackEvents="scAdd,scCheckout,purchase,event14"
Configuration Settings
None
s.linkExternalFilters
Navigation title:s.linkExternalFilters
If your site contains many links to external sites, and you do not want to track all exit links, use linkExternalFilters
to report on a specific subset of exit links.
Max Size Debugger Parameter Reports Populated Default Value
N/A N/A Paths > Entries & Exits > Exit ""
Links
The linkExternalFilters variable is an optional variable used in conjunction with linkInternalFilters to determine
whether a link is an exit link. An exit link is defined as any link that takes a visitor away from your site. Whether
the target window of an exit link is a popup or the existing window, it does not affect whether the link appears
123
in the exit links report. Exit links are tracked only if trackExternalLinks is set to 'true.' The filters in
linkExternalFilters and linkInternalFilters are case insensitive.
The filters list in linkExternalFilters and linkInternalFilters apply to the domain and path of any link by default.
If linkLeaveQueryString is set to 'true,' the filters apply to the entire URL (domain, path, and query string). These
filters are always applied to the absolute path of the URL, even if a relative path is used as the href value.
Most companies find that linkInternalFilters gives them enough control over exit links that they don't need
linkExternalFilters. Using linkExternalFilters simply decreases the likelihood that an exit link is considered
external. If linkExternalFilters has a value, then a link is considered only external if it does not match
linkInternalFilters and does match linkExternalFilters.
The following example illustrates how this variable is used. In this example, the URL of the page is
http://www.mysite.com/index.html.
s.trackExternalLinks=true
s.linkInternalFilters="javascript:,mysite.com"
s.linkExternalFilters="site1.com,site2.com,site3.com/partners"
s.linkLeaveQueryString=false
...
<a href="http://www.mysite.com">Not an Exit Link</a>
<a href="/careers/job_list.html">Not an Exit Link</a>
<a href="http://www2.site3.com">Not an Exit Link</a>
<a href="http://www.site1.com">Exit Link</a>
<a href="http://www2.site3.com/partners/offer.asp">Exit Link</a>
Examples
s.linkExternalFilters="partnersite.com,partnertwo.net/path/"
s.linkExternalFilters=""
Configuration Settings
None
s.usePlugins
Navigation title:s.usePlugins
If the s_doPlugins function is available and contains useful code, s_usePlugins should be set to 'true.'
When usePlugins is 'true,' the s_doPlugins function is called prior to each image request.
Examples
s.usePlugins=true
s.usePlugins=false
The usePlugins variable should only be false (or not declared) if the s_doPlugins function is not declared in
your JavaScript file.
Configuration Settings
None
Note: Context data variables are not case sensitive. For example, the following 2 variables are effectively
identical:
s.contextData['article_title'] = 'Weekend Concert Controversy';
and
s.contextData['ARTICLE_TITLE'] = 'Weekend Concert Controversy';
Using context data helps prevent you from making code updates to support different report suite configurations.
For example, you can define the following s.contextData variable:
s.contextData['myco.rsid'] = 'value'
Using processing rules you can add a condition that checks for a myco.rsid context data variable. When this
variable is found, you can add an action to copy it to a prop or eVar.
Context data variables can also be defined directly in the processing rules interface to temporarily store a value,
or to collect values from a context data variable you know will be used on the report suite. For example, if you
need to swap two values, you could create a context data variable to store a value during the swap.
Since processing rules are applied only when data is collected, it is important to set up processing rules before
you start sending context data. Context data values that are not read by processing rules when a hit is processed
are discarded.
125
Rules
Rule Description
Supported names and characters Context data variable names can contain only alphanumeric characters, underscores and dots.
Any additional characters are stripped out. Context cata variables do not have a numeric
designation. Rather, they are named.
Namespace A good practice is to prefix your variables with your company name, site name, or a similar
value to make sure the name is unique across your report suite.
Context data variables can be named similar to other JavaScript variables. Be aware that the
namespace a.* is reserved for use by Adobe products in context variable names. For
example, the AppMeasurement Library for iOS uses a.InstallEvent to measure
application installations.
URL Limits for Internet Explorer You might encounter a older URL limitation for Internet Explorer 6 and 7, where URLs are
truncated at 2000 bytes. You can use the DigitalPulse debugger to determine the size of a
URL string.
With the recent updates to AppMeasurement (September 2014),HTTP POST is used with
Internet Explorer 8+, which eliminates truncation issues.
Supported AppMeasurement version Context data variables require at least H23 code or higher.
Examples
Possible ways to replace implementation of the s.pageName variable, assuming that processing rules are set up
correctly for each:
Note: Dynamic variables are not supported in conjunction with cookies (s_cc, s_sq, s_fid, s_vi and any
cookie that is set by a plugin). You can not use D=<cookie value>.
A significant benefit of dynamic variables is the ability to capture long strings of data in multiple variables
without actually passing the long string repeatedly. Some browsers limit the maximum length of HTTP GET
requests (including the Adobe image request). Using dynamic variables ensures that all data is captured by
reducing the length of the request to Adobe servers in cases where data is duplicated across several variables.
In the Adobe image request that occurs on the page view, if you are using dynamic variables to copy the value
of Custom Traffic 1 to Custom Conversion 1, you would see v1=D=c1. If eVar1 received a value previously
in the request, Adobe's servers dynamically copy the value of Custom Traffic 1 to Custom Conversion 1 during
data processing. As a result, the value originally passed using Custom Traffic 1 also appears in the Custom
Conversion 1 reports.
Dynamic variables are passed by setting a variable to the desired value and then setting other variables to
D=[variable abbreviation]. For abbreviations for each variable, see Data Collection Query Parameters
on page 186. Dynamic variables can pull data from the following locations:
• Other query-string variables
• HTTP headers (except for the Cookie HTTP header)
To create a dynamic variable, add a special prefix to the start of the value. The default prefix is "D=". There are
two methods of flagging dynamic variables:
• Use a default prefix of D= (For example: s.prop1="D=User-Agent" )
• For non-JavaScript implementations, you can define a custom prefix using the "D" query-string parameter. For
example, if the query-string parameter is "&D=$", you can create a dynamic variable with the following
command: s.prop1="$User-Agent" .
The variable abbreviation used must match the variable parameter name passed in the image request. Some
variables have multiple accepted parameters used in different cases. For example, pageName= and gn= both
pass the page name, but the latter is most often used in mobile and hard-coded implementations. If the image
request uses pageName= to pass the page name, then D=pageName is acceptable but D=gn is not. If the image
request uses gn=, then D=gn is acceptable, but D=pageName is not.
The following information applies to dynamic variables:
• Dynamic variables work with all versions of AppMeasurement code.
• Dynamic variables are case sensitive.
• Dynamic variables support literal strings contained in quotes.
• Dynamic variable replacement occurs before processing rules, VISTA, and other processing.
• The dynamic variable prefix "D=" must be at the start of the variable value not in the middle. For example,
use c2='D="test7"+User-Agent' rather than c2='"test7"+D=User-Agent' .
127
• As with all implementation techniques, Adobe strongly recommends testing dynamic variable implementations
heavily in a development environment before deploying to production. Because the full strings that are copied
are not visible in client-side debugging tools, review the affected Analytics reports to confirm successful
implementation.
• When copying values between variables with different maximum lengths, note that copying a value that exceeds
the maximum length of the destination variable causes truncation. For example, Custom Traffic variables
have 100-character limits and Custom Conversion variables have 255-characters limits. When copying a
150-character value from s.eVar1 to s.prop1 using dynamic variables, this value is truncated in the Custom
Traffic report at 100 characters.
Note: When using the image request to track links, the type of link (download=lnk_d, exit=lnk_e, or
custom link=lnk_o) must be defined, as does the Link URL/Name (pev2). Links require manual
implementation by inserting code within the <a href> tag.
s.prop1=s.eVar1="D=g" Passes the page URL into both prop1 and eVar1.
s.prop1='D=User-Agent+" - Concatenates the user agent and accept language headers in prop1.
"+Accept-Language'
&c1=D%3DUser-Agent Makes prop1 a dynamic variable filled in with the HTTP header
User-Agent
&c1=D%3D%22test%22 Makes prop1 a dynamic variable filled in with the string "test". This
becomes more useful when used with concatenation which utilizes
the + operator.
&vid=D%3DX-TM-ANTID This example searches for a unique header, which in this case is
X-TM-ANTID.
Page Variables
Page variables directly populate a report, such as pageName, List Props, List Variables, and so on.
Note: JavaScript H-Code does not support these additional eVars and events.
129
Entitlements to Custom Dimensions and Events
browserHeight
Navigation title:browserHeight
The browserHeight variable displays the height of the browser window.
This variable is populated after the page code and before doPlugins is run.
browserWidth
Navigation title:browserWidth
The browserWidth variable displays the width of the browser window.
This variable is populated after the page code and before doPlugins is run.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Parameters
campaign
Navigation title:campaign
The campaign variable identifies marketing campaigns used to bring visitors to your site. The value of campaign
is usually taken from a query string parameter.
Parameters
Max Size Debugger Parameter Reports Populated Default Value
Every element in a marketing campaign should have an associated unique tracking code. For example, a paid
search engine keyword may have a tracking code of 112233. When someone clicks the keyword with the 112233
tracking code and is routed to the corresponding website, the campaign variable records the tracking code.
There are two main ways to populate the campaign variable:
• The getQueryParam plug-in, used in the JavaScript file, retrieves a query string parameter from the URL.
For more information on the getQueryParam plugin, see Implementation Plug-ins on page 203.
• Assign a value to the campaign variable in the HTML on the Web page.
With either method of populating the campaign variable, the Back button traffic may inflate the actual number
of click-throughs from a campaign element.
For example, a visitor enters your site by clicking a paid search keyword. When the visitor arrives on the landing
page, the URL contains a query string parameter identifying the tracking code for the keyword. The visitor then
clicks a link to another page, but then immediately clicks the Back button to return to the landing page. When
the visitor arrives a second time on the landing page, the URL with the query string parameter identifies the
131
tracking code again. And a second click-through is registered, thereby falsely inflating the number of
click-throughs.
To avoid this inflation of click-throughs, Adobe recommends using the getValOnce plugin to force each campaign
click-through to be counted only once per session. For more information on the getValOnce plugin, see
Implementation Plug-ins on page 203.
Case Sensitivity
eVars are case insensitive, but they are displayed in the capitalization of the first occurrence. For example, if the
first instance of eVar1 is set to "Logged In," but all subsequent instances are passed as "logged in," reports always
show "Logged In" as the value of the eVar.
Examples
s.campaign="112233"
s.campaign=s.getQueryParam('cid');
Configuration Settings
Each campaign value remains active for a user, and receives credit for that user's activities and success events
until it expires. You can change the expiration of the campaign variable in the Admin Console.
channel
Navigation title:channel
The channel variable is most often used to identify a section of your site.
For example, a merchant may have sections such as Electronics, Toys, or Apparel. A media site may have sections
such as News, Sports, or Business.
Max Size Debugger Parameter Reports Populated Default Value
Adobe recommends populating the channel variable on every page. You can also turn on a correlation between
the channel and page name variables.
When sections have one or more levels of subsections, you can show those sections in the channel variable or
use separate variables to identify levels.
Examples
s.channel="Electronics"
s.channel="Media"
colorDepth
Navigation title:colorDepth
The colorDepth variable is used to show the number of bits used to display color on each pixel of the screen.
For example, 32 represents 32 bits of color on the screen. This variable is populated after the page code and
before doPlugins is run.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Query Param Value Example Reports Affected
connectionType
Navigation title:connectionType
The connectionType variable, in Internet Explorer, indicates whether the browser is configured on a LAN or
modem connection.
This variable is populated after the page code and before doPlugins is run.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Query Param Value Example Reports Affected
cookiesEnabled
Navigation title:cookiesEnabled
The cookiesEnabled variable indicates whether a first-party session cookie could be set by JavaScript.
This variable is populated after the page code and before doPlugins is run.
133
Note: This variable should only be read and never set.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Query Param Value Example
k Y or N Y
dc
Navigation title:dc
(Deprecated) The dc variable lets you select the data center to which your data is sent.
Note: The dc variable is deprecated. You should set trackingServer for all implementations to the value
that is generated by Code Manager in s_code.js.
eVarN
Navigation title:eVarN
The eVar variables are used for building custom reports.
When an eVar is set to a value for a visitor, the value is remembered until it expires. Any success events that a
visitor encounters while the eVar value is active are counted toward the eVar value.
Max Size Debugger Parameter Reports Populated Default Value
Expiration
eVars expire after a time period you specify. After the eVar expires, it no longer receives credit for success
events. eVars can also be configured to expire on success events. For example, if you have an internal promotion
that expires at the end of a visit, the internal promotion receives credit only for purchases or registrations that
occur during the visit in which they were activated.
There are two ways to expire an eVar:
• You can set the eVar to expire after a specified time period or event.
• You can use force the expiration of an eVar, which is useful when repurposing a variable.
If an eVar is used in May to reflect internal promotions and expires after 21 days, and in June it is used to capture
internal search keywords, then on June 1st, you should force the expiration of, or reset, the variable. Doing so
will help keep internal promotion values out of June's reports.
Case Sensitivity
eVars are case insensitive, but they are displayed in the capitalization of the first occurrence. For example, if the
first instance of eVar1 is set to "Logged In," but all subsequent instances are passed as "logged in," reports always
show "Logged In" as the value of the eVar.
Subrelations
A common requirement for a Custom eVar report is the ability to break down one Custom eVar report by
another. For example, if one eVar contains gender, and another contains salary, you may ask the following
question: of the female visitors to my site, how much revenue was generated by women who make more than
$50,000 per year. Any eVar that is fully sub-related allows this type of break down in reports. For example, if
the gender eVar has full subrelations enabled, all other custom eVar reports can be broken down by gender, and
gender can be broken down by all others. To see the relationship between two reports, only one of them needs
full subrelations enabled. By default, Campaigns, Products, and Category reports are fully sub-related (any
eVar can be broken down by campaign or products).
Examples
s.eVar1="logged in"
s.eVar23="internal spring promo 4"
Configuration Settings
eVars can be configured in the Admin Console. All eVars can be configured with a Name, Type, Allocation,
Expire After Setting, or Reset. Each configuration setting is addressed separately.
Setting Description
Name Allows you to change the name of the eVar report within Analytics.
The eVar should still be referenced as s.eVarX in the JavaScript code, no matter what name is given
to the report in Analytics.
Type Allows you to show whether the eVar is a Text String or Counter.
Allocation Used to configure which value of the eVar receives credit for success events.
If Allocation is set to "Linear", then both A and B receive credit for half the purchase value.
135
Setting Description
Expire After Lets you determine whether an eVar expires on a specific event, like purchase, or after a custom or
predefined time period.
Reset By selecting the Reset check box for an eVar, and clicking Save at the bottom of the page, all values
of that eVar are immediately expired. After this happens, only new values of the eVar receive credit
for success events.
Configure Events
Navigation title:events
The s.events variable is used to record common shopping cart success events as well as custom success events.
Max Size Debugger Parameter Reports Populated Default Value
An event should be considered a milestone within a site. Success events are most commonly populated on the
final confirmation page of a process, such as a registration process or newsletter sign-up. Custom events are
defined by populating the events variable with the literal values defined in the Possible Values on page 136 section
below.
By default, success events are configured as counter events. Counter events count the number of times a success
event is set (x+1). Events can also be configured as numeric events. Numeric events allow you to specify the
number to increment (as might be necessary when counting dynamic or arbitrary values, such as the number of
results returned by an internal search).
A final event type, currency, allows you to define the amount to be added (similar to numeric events), but displays
as currency in reports, and is subject to currency conversions based on the s.currencyCode value and the default
currency setting for your report suite. For additional information on using numeric and currency events, see
products on page 152.
Possible Values
The following is a list of possible values for the events variable:
137
Numeric/Currency Events that are given a value directly in events list apply to all products in the products list.
This is useful to track order-wide discounts, shipping, and similar values, without modifying the product price
or by tracking it in the product list separately. For example, if you configured event10 to contain order-wide
discounts, a purchase with a 10% discount might appear similar to the following:
s.events="purchase,event10=9.95"
s.products="Footwear;Running Shoes;1;69.95,Running Essentials;Socks;10;29.50"
On Numeric/Currency Event reports, the report total represents the de-duplicated event total (in this example,
the total amount of discounts during the reporting period), not the sum of the event values for each product.
Note: if a value for a Numeric/Currency Event is specified in the products string and in the event string,
the value from the event string is used.
Event Serialization
By default, an event is counted every time the event is set on your site.
See Event Serialization on page 233 for more information.
Syntax
s.events="event1:3167fhjkah"
Examples
s.events="scAdd:003717174"
s.events="scAdd:user228197,event1:577247280,event7:P7fhF8571"
hierN
Navigation title:hierN
The hierarchy variable determines the location of a page in your site's hierarchy.
This variable is most useful for sites that have more than three levels in the site structure. For example, a media
site may have 4 levels to the Sports section: Sports, Local Sports, Baseball, and Red Sox. If someone visits the
Baseball page, Sports, Local Sports, and Baseball, all levels reflect that visit.
Max Size Debugger Parameter Reports Populated Default Value
There are five hierarchy variables available, which must be enabled by Adobe Customer Care. At the time the
hierarchy is enabled, you should decide on a delimiter for the variable and the maximum number of levels for
the hierarchy. For example, if the delimiter is a comma, the sports hierarchy may display as follows.
s.hier1="Sports,Local Sports,Baseball"
Make sure that none of your section names have the delimiter in them. For example, if one of your sections is
called "Coach Griffin, Jim," then you should choose a delimiter other than comma. Each hierarchy section is
limited to 255 bytes, while the total variable limit is 255 bytes. After a delimiter is chosen (at the time the
hierarchy is created) it is not easily changed.
Examples
s.hier1="Toys|Boys 6+|Legos|Super Block Tub"
s.hier4="Sports/Local Sports/Baseball"
Configuration Settings
None
homepage
Navigation title:homepage
The homepage variable, in Internet Explorer, indicates whether the current page is set as the user's home page.
This variable is populated after the page code and before doPlugins is run.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Query Param Value Example Reports Affected
javaEnabled
Navigation title:javaEnabled
The javaEnabled variable indicates whether Java is enabled on the browser.
This variable is populated after the page code and before doPlugins is run.
139
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Query Param Value Example Reports Affected
javascriptVersion
Navigation title:javascriptVersion
The javascriptVersion variable indicates the version of JavaScript supported by the browser.
This variable is populated after the page code and before doPlugins is run.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Query Param Value Example Reports Affected
Version H.10 and higher of the JavaScript file accurately detect up to version 1.7 (the highest version at the time
H.10 was released). Prior versions of the JavaScript file only detected up to version 1.3
linkName
Navigation title:linkName
The linkName variable is an optional variable used in Link Tracking that determines the name of a custom,
download, or exit link.
The linkName variable is not normally needed because the third parameter in the tl() function replaces it.
Max Size Debugger Parameter Reports Populated Default Value
Custom Links refer to links that send tracking data. The linkName variable (or the third parameter in the tl()
function) is used to identify the value that appears in the Custom, Download, or Exit Links report. If linkName
is not populated, the URL of the link appears in the report.
Examples
s.linkName="Nav Bar Home Link"
s.linkName="Partner Link to A.com"
Configuration Settings
None
linkType
Navigation title:linkType
The linkType variable is an optional variable used in link tracking that determines which report a link name or
URL appears (custom, download, or exit links).
The linkType variable is not normally needed because the second parameter in the tl() function replaces it.
Max Size Debugger Parameter Reports Populated Default Value
Custom links send data to Analytics. The linkType variable (or the second parameter in the tl() function) is used
to identify the report in which the link name or URL appears (Custom, Download, or Exit Links report).
For exit and download Links, the linkType variable is automatically populated depending on whether the link
clicked is an exit or download link. A custom link may be configured to send data to any of the three reports
with this variable or with the second parameter in the tl() function. By setting linkType to 'o,' 'e,' or 'd,' the
linkName or link URL is sent to the Custom Links, Exit Links, or File Downloads report respectively.
Examples
<a href="index.html" onClick="
var s=s_gi('rsid'); **see note below on the rsid**
s.tl(this,'o','Link Name');
">My Page</a>
Configuration Settings
None
List Props
List props are a delimited list of values that are passed into a variable, then reported as individual line items.
List props are most commonly implemented on pages that contain user-selectable values, such as listed items
with check boxes or radio buttons. They are useful in any circumstance where you want to define multiple values
in a variable without sending multiple image requests.
141
Considerations
• List props are enabled only on traffic variables (props).
• Pathing and correlations cannot be enabled for list props.
• Analytics provides visits and unique visitors to almost every report, including all list prop reports.
• Classifications are supported for list props.
• Any custom traffic variable can become a list prop. (Exceptions: pageName on page 149, channel on page 132,
and server on page 159.)
• When defining duplicate values in the same image request, instances are not deduplicated.
A prop can be changed into a list prop on the Admin Tools > Report Suite > Traffic Variables page by enabling
List Support and then selecting a delimiter. Popular delimiters are colons, semi-colons, commas, or pipes. The
delimiter can technically be any of the first 127 ASCII characters.
Implementation Examples
When you request enabling of list props, indicate the delimiter that you would like to use. After the s.prop of
your choice is enabled, multiple values can be set in the variable as shown in the following examples:
A list prop delimited by a pipe, passing in two values:
s.prop1="Banner ad impression|Sidebar impression"
A list prop delimited by a comma passing in several values:
s.prop2="cerulean,vermilion,saffron"
List props can also be sent with a single value:
s.prop3="Single value"
The delimiter can be changed at any time. However, the implementation must match the new delimiter. Failure
to use the correct delimiter results in the list prop value being treated as a single concatenated line item in
reporting.
Because a list prop is still a Traffic Variable, it is subject to Traffic Variable limitations. List props are limited
to 100 bytes of data and are affected by case sensitivity settings.
List Variable
Also known as List Var. Similar to how List Props function, List Vars allow multiple values within the same
image request. They also act similarly to eVars, which persist beyond the image request they were defined on.
You can use these variables to see cause and effect among multiple elements on a single page, such as product
lists, wish lists, lists of search refinements, or lists of display ads.
Considerations:
• List Vars remember their specific values by referencing the VisitorID cookie in the visitor's browser.
• A limit of 250 maximum values are stored at one time per visitor. If 250 values per visitor are exceeded, the
latest 250 values are used. Expiration for these values is based on the configured expiration for the variable.
• Each delimited value can contain a maximum of 255 characters (or less if using multi-byte characters). This
is the maximum length of each element.
• There is no limit to the number of characters within this variable. The only exception to this limitation is within
older Internet Explorer browsers, which impose a 2083-character limitation on all URL requests.
• A total of three List Vars are available per report suite.
• Using List Vars requires H23 code or higher.
• List Vars can be classified.
• If duplicate values are defined in the same image request, list vars deduplicate all instances of those values.
Configuration
You can access the configuration in the Admin Console and update it without Adobe Client Care having to get
involved:
1. Go to Analytics > Admin > Report Suites
2. Select the report suite.
3. Click Edit Settings > Conversion > List Variables.
• Name: Each delimited value can contain a maximum of 255 characters (or less if using multi-byte characters).
This is the maximum length of each element.
• Value Delimiter: The character used to separate values within the List Var. Most commonly these are characters
such as commas, colons, pipes, or something similar.
Note: Multi-byte characters are not supported as delimiters in List Vars. The delimiter must be single
byte.
• Expiration: Similar to eVar expiration, this determines the amount of time that can occur between the List
Var and the conversion event for them to be related.
• At a page view or visit level: Success events beyond the page view or visit would not link back to any values
within the List Var.
• Based on a time period, such as day, week, month, etc: Success events beyond the specified time period
would not link back to any values within the List Var. A custom number of days can be defined as well.
• Specific conversion events: Any other success events that fire after the specific event designated would not
link back to any values within the List Var.
• Never: Any amount of time can pass between the List Var and success event.
• Allocation: This setting determines how success events divide credit between values:
• Full: All variable values defined prior to the variable's expiration get full credit for success events.
• Linear: All variable values defined prior to the variable's expiration get credit divided credit for conversion
events.
• Variable values are never overwritten, but instead added to the values that get credit for success events.
• Max Values: Designates the number of active values allowed for this list variable. For example, if set to 3,
only the last 3 values captured is saved and any previous values captured are discarded. Note that if multiple
values for the same list var are sent in on the same hit and you have restricted using max values, each value
will have the same timestamp and there is not guarantee as to which value is saved.
A limit of 250 maximum values are stored at one time per visitor. If 250 values per visitor are exceeded, the
latest 250 values are used. Expiration for these values is based on the configured expiration for the variable.
The Max Values setting is useful to limit attribution to a specific number of values. For example, if a list var
is set to "A,B,C" on the first page of a visit, then set to "X,Y,Z" on the next page, attribution is distributed to
these six values based on the allocation. If you wanted to limit attribution to only "X,Y,Z", you can set max
values to three.
To set up or edit List Vars, go to Analytics > Admin > Report Suites > Edit Settings > Conversion > List
Variables.
143
Implementation Examples
Each of the following examples use a comma for the value delimiter.
Defining a single value within a List Var:
s.list1="Cat";
Passing in multiple values:
s.list2="Tabby,Persian,Siamese";
s.list1="Product 1,Product 2,Product 3";
Attributing revenue to a List Var:
//Define this code on the landing page:
s.list3="Top Banner Ad,Side Bar Ad,Internal Campaign 1";
s.products=”;product;1;200”
Result: All values set in the list var1 at any point during the visit (value1,value2,value3,value4,value5,value6)
get full credit for the purchase.
maxDelay
The s.maxDelay variable is used primarily in Genesis DFA integrations to determine the timeout period in
contacting the DFA host. If Adobe does not receive a response from DFA's servers within the specified period
set in the s.maxDelay variable, the connection is severed, and data is processed normally. Implement this variable
if you are concerned with DFA's response time on each page. It is recommended to experiment with this value
to determine the optimum timeout period.
Implementation Example
s.maxDelay="750";
Properties
• This variable is an optional event metric populated via the JavaScript implemented on your site.
• If the DFA host does not respond within the given amount of time, the event designated to Timeout runs
(assigned via the Genesis integration wizard).
• This variable can only contain a numeric value.
• The amount of time specified is measured in milliseconds.
• Increasing the wait time collects more DFA data, but also increases the risk of losing Analytics hit data.
Note: Adobe does not have control over DFA's response time. If you are seeing consistent issues even
after raising the max delay period to a reasonable time frame, consult your organization's DFA account
administrator.
mediaLength
Navigation title:mediaLength
The mediaLenght variable specifies the total length of the media being played.
Max Size Debugger Parameter Reports Populated Default Value
No max size for entire pev3 pev3 Time Spent on Video; None
request - size is limited to the
Video Segments Viewed
browser's URL length limit.
Examples
s.Media.open("de_bofr_1045Making_400k", "414","Windows Media Player
11.0.5721.5230")
Resulting pev3 parameter syntax: pev3= [Asset Name]--**--[Total length of
asset]--**--[Player name]--**--[Total seconds
consumed]--**--[Timestamp]--**--[Chronological record of all starts and
stops along with accompanying markers]
145
mediaName
Navigation title:mediaName
This variable specifies the name of the video or media item.
It is only available via the Data Insertion API and Full Processing Data Source.
Max Size Debugger Parameter Reports Populated Default Value
Examples
s.Media.open("de_bofr_1045Making_400k", "414","Windows Media Player
11.0.5721.5230")
s.Media.play("de_bofr_1045Making_400k", "0")
s.Media.play("de_bofr_1045Making_400k", "414")
s.Media.close("de_bofr_1045Making_400k")
Resulting pev3 parameter syntax: pev3=[Asset Name]--**--[Total length of
asset]--**--[Player name]--**--[Total seconds
consumed]--**--[Timestamp]--**--[Chronological record of all starts and
stops along with accompanying markers]
mediaPlayer
Navigation title:mediaPlayer
This variable specifies the player used to consume a video or media item.
Max Size Debugger Parameter Reports Populated Default Value
Examples
s.Media.open("de_bofr_1045Making_400k", "414","Windows Media Player
11.0.5721.5230")
Resulting pev3 parameter syntax: pev3=[Asset Name]--**--[Total length of
asset]--**--[Player name]--**--[Total seconds
consumed]--**--[Timestamp]--**--[Chronological record of all starts and
stops along with accompanying markers]
mediaSession
Navigation title:mediaSession
This variable specifies the segments of a video or media asset consumed.
Max Size Debugger Parameter Reports Populated Default Value
147
If using s.Media.autoTrack, the mediaName does not need to be implemented explicitly. It will be determined
automatically by the AppMeasurement for JavaScript code.
Manual Tracking Method:
Syntax:
s.Media.open(mediaName,mediaLength,mediaPlayerName)
s.Media.play(mediaName,mediaOffset)
s.Media.stop(mediaName,mediaOffset)
Possible Values:
s.Media.open("de_bofr_1045Making_400k", "414","Windows Media Player
11.0.5721.5230")
s.Media.play("de_bofr_1045Making_400k", "0")
s.Media.play("de_bofr_1045Making_400k", "414")
Examples
s.Media.open("de_bofr_1045Making_400k", "414","Windows Media Player
11.0.5721.5230")
s.Media.play("de_bofr_1045Making_400k", "0")
s.Media.play("de_bofr_1045Making_400k", "414")
Resulting pev3 parameter syntax: pev3=[Asset Name]--**--[Total length of
asset]--**--[Player name]--**--[Total seconds
consumed]--**--[Timestamp]--**--[Chronological record of all starts and
stops along with accompanying markers]
Possible pev3 Values: pev3=de_bofr_1045Making_400k--**--414--**--Windows
Media Player 11.0.5721.5230--**--288--**--1207893838--**--S0E0S0E256S0E32
Media.trackEvents
Navigation title:Media.trackEvents
The Media.trackEvents variable identifies which events should be sent with a media hit.
It is only applicable with JavaScript and ActionSource.
Max Size Debugger Parameter Reports Populated Default Value
Examples
s.Media.trackEvents=”event1,purchase”
Examples
s.Media.trackVars=”prop2,events,eVar3”
mobile
Navigation title:mobile
The mobile variable controls the order in which cookies and subscriber IDs are used to identify visitors.
See Mobile Tracking over WAP and I-Mode Protocols on page 82.
Max Size Debugger Parameter Reports Populated Default Value
pageName
Navigation title:pageName
The pageName variable contains the name of each page on your site.
Max Size Debugger Parameter Reports Populated Default Value
The pageName variable should be populated with a value that business users recognize. In most cases the
pageName value is not the URL or the path to the file. Common pageName values include names such as "Home
Page," "Checkout," "Purchase Thank you," or "Registration."
149
Be careful not to allow new-line, -em or -en dashes, or any HTML characters to appear in the page name and
other variables. Some browsers send new line characters while others don't, which causes the data in Analytics
to be split between two seemingly identical page names. Many word processors and email clients will automatically
convert a hyphen into an -en or -em dash when typing. Since -en and -em dashes are illegal characters in Analytics
variables (ASCII characters with codes above 127), Analytics won't record the page name containing the illegal
character and show the URL instead.
If pageName is left blank, the URL is used to represent the page name. Leaving pageName blank is often
problematic because the URL may not always be the same for a page (www.mysite.com and mysite.com are the
same page with different URLs).
Examples
s.pageName="Search Results"
s.pageName="Standard Offer List"
Configuration Settings
Administrators have the ability to change the visible page name in Analytics with the Name Pages tool, which
is potentially dangerous and may negatively affect your reports. Please contact Adobe Customer Care before
using the Name Pages tool.
pageType
Navigation title:pageType
The pageType variable is used only to designate a 404 Page Not Found Error page.
Max Size Debugger Parameter Reports Populated Default Value
The pageType variable captures the errant URL when a 404 Error page is displayed, which allows you to quickly
find broken links and paths that are no longer valid on the custom site. Set up the pageType variable on the error
page exactly as shown below.
Do not use the page name variable on 404 error pages. The pageType variable is only used for the 404 Error
page.
In most cases, the 404 Error page is a static page that is hard-coded. In these cases, it is important that the
reference to the .JS file is set to an appropriate global or relative path/directory.
Configuration Settings
None
pageURL
Navigation title:pageURL
The pageURL variable overrides the actual URL of the page.
In rare cases, the URL of the page is not the URL that you would like reported in Analytics.
Max Size Debugger Parameter Reports Populated Default Value
Note: Although Adobe allows pageURL values up to 64k, some browsers impose a size limit on the URL
of image requests. To prevent truncation of other data, page URLs longer than 255 bytes are split, with
the first 255 bytes appearing in the g= parameter, with the remaining bytes appearing later in the query
sting in the -g= query parameter.
Note: It is strongly advised that you contact your Adobe consultant or Customer Care before using the
pageURL variable for custom purposes.
Examples
s.pageURL="http://mysite.com/home.jsp?id=1224"
s.pageURL="http://www.mysite.com/"
Configuration Settings
None
plugins
Navigation title:plugins
The plugins variable, in Netscape and Mozilla-based browsers, lists the plugins installed on the browser.
151
This variable is populated after the page code and before doPlugins is run.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
Query Param Value Example Reports Affected
products
Navigation title:products
The products variable is used for tracking products and product categories as well as purchase quantity and
purchase price. Products is typically set in conjunction with a cart event or a prodView event.
Important:
We updated the logic that sets the prodView event automatically, which happens when there is a product
but no event. This update may cause an increase in prodView events. prodViews will increase only when:
1. The events variable contains nothing but an unrecognized event, such as shoppingCart or cart, which
are not valid events.
2. The products variable is not empty.
A possible side effect is that merchandising eVars triggered by prodView events could be associated with
an empty product, but only if the product list contains only an invalid product (such as a semicolon with
no product listed).
The products variable tracks how users interact with products on your site. For instance, the products variable
can track how many times a product is viewed, added to the shopping cart, checked out, and purchased. It can
also track the relative effectiveness of merchandising categories on your site. The scenarios below are common
for using the products variable.
The products variable should always be set in conjunction with a success event.
Max Size Debugger Parameter Reports Populated Default Value
Field Definition
Category Contains the associated product category. In version 15, products can be associated with multiple categories which
fixes a limitation present in version 14. If you were previously not recording a product category, you are encouraged
to start populating this field for report suites that are on version 15.
Product (Required) The identifier used to track a product. This identifier is used to populate the Products report. Be sure
to use the same identifier through the checkout process.
Quantity The number of units purchased. This field must be set with a purchase event to be recorded.
Price Refers to the combined cost of the total quantity purchased (units x individual unit price), not to the individual
price. This field must be set with a purchase event to be recorded.
Events Currency events associated with the specified product. See Product-Specific Currency Events on page 154 and
Order-Wide Currency Events on page 154.
eVars Merchandising eVar values associated with a specific product. See Merchandising Variables on page 169.
The values included in the products variable are based on the type of event you are recording. The category/product
delimiter (;) is required as a place holder when omitting Category. Other delimiters are required only if they are
necessary to distinguish which parameter you are including, as shown in the examples on this page.
153
Example 2: Multiple Products
s.events="purchase"
s.products="Footwear;Running Shoes;1;69.95,Running Essentials;Running
Socks;10;29.99"
s.purchaseID="1234567890"
Note: Price refers to the total price (unit price x units). For instance, 3 widgets purchased at 19.99 each
would equal 59.97 (such as ";Widget;3;59.97" ).
Note: if a value for the same Numeric/Currency Event is specified in the products variable and in the
events variable, the value from the events is used.
Examples
s.products=”Category;ABC123”
s.products=”Category2;ABC123,;ABC456”
s.products=”Category3;ABC123;1;10”
s.products=”Category;ABC123;1;10,;ABC456;2;19.98”
s.events=”event1”
s.products="Category;ABC123;;;event1=1.99"
s.events=”event1”
s.products="Category;ABC123;1;10;event1=1.99"
s.events=”event1”
s.products="Category;ABC123;1;10;event1=1.99,;ABC123;2;19.98;event1=1.99"
s.events=”event1,event2”
s.products="Category;ABC123;1;10;event1=1.99|event2=25"
s.events=”event1,event2”
s.products="Category;ABC123;1;10;event1=1.99|event2=25;evar1=2 Day Shipping"
s.events=”event1,event2”
s.products="Category;ABC123;1;10;event1=1.99|event2=25;evar1=2 Day
Shipping|evar2=3 Stars"
s.events=”event1,event2”
s.products="Category;ABC123;1;10;event1=1.99|event2=25;evar1=2 Day Shipping,
;ABC456;2;19.98;event1=1.99|event2=100;evar1=Ground Shipping"
s.events=”event1,event2,event3”
s.products="Category;ABC123;1;10;event1=1.99|event2=25;evar1=2 Day
Shipping,;ABC456;2;19.98;event1=1.99|event2=100;evar1=Ground
Shipping,;;;;event3=2.9;evar3=20% off"
s.events=”event1,event2,event3=9.95”
s.products="Category;ABC123;,;ABC456;2;19.98;event1=1.99|event2=100;evar1=Ground
Shipping,;;;;event3=2.9;evar3=20% off"
155
propN
Navigation title:propN
Property (prop) variables are used for building custom reports within the Traffic Module.
The props variable may be used as counters (to count the number of times a page view is sent), for pathing
reports, or in correlation reports.
Max Size Debugger Parameter Reports Populated Default Value
Examples
s.prop2="editorial"
s.prop15="toy category"
Configuration Settings
Contact Adobe Customer Care about showing Visit, Visitor, and Path metrics for prop variables.
purchaseID
Navigation title:purchaseID
The purchaseID is used to keep an order from being counted multiple times in reporting.
Whenever the purchase event is used on your site, you should use the purchaseID variable.
Max Size Debugger Parameter Reports Populated Default Value
When a visitor purchases an item from your site, purchaseID is populated on the "Thank You" page at the same
place the purchase event is fired. If the purchaseID is populated, the products on the "Thank You" page are
counted only once per purchaseID. This is critical because many visitors to your site will save the "Thank You"
or "Confirmation Page" for their own purposes. The purchaseID keeps purchases from being counted each time
the page is viewed.
In addition to keeping the purchase data from being counted twice, the purchaseID, when used, keeps all
conversion data from being double counted in reports.
Examples
s.purchaseID="11223344"
s.purchaseID="a8g784hjq1mnp3"
referrer
Navigation title:referrer
The referrer variable can be used to restore lost referrer information.
Server-side and JavaScript redirects are often used to route visitors to proper locations. However, when a browser
is redirected, the original referring URL is lost.
Max Size Debugger Parameter Reports Populated Default Value
Many companies use redirects in many places throughout their websites. For example, a visitor may be sent
through a redirect from a search engine paid search result. When a browser is redirected, the referrer is often
lost. The referrer variable may be used to restore the original referrer value on the first page after a redirect.
The referrer may be populated server-side, or via JavaScript from the query string.
For Analytics to record a referrer, it must be "well formed," meaning that it must follow the standard URL format,
with a protocol and appropriate location.
Examples
s.referrer="http://www.google.com/search?q=search+string"
s.referrer=<%=referrerVar%> // populated server-side
if(s.getQueryParam('ref')
s.referrer=s.getQueryParam('ref')
Configuration Settings
None
resolution
Navigation title:resolution
The resolution variable indicates the monitor resolution of the visitor viewing the web page.
This variable is populated after the page code and before doPlugins is run.
You may read these values and copy them into props/eVars, but you should never alter them. This variable
is introduced with version H.11 of the JavaScript file.
157
Query Param Value Example Reports Affected
s_objectID
Navigation title:s_objectID
The s_objectID variable is a global variable that should be set in the onClick event of a link.
By creating a unique object ID for a link or link location on a page, you can either improve visitor activity
tracking or use Activity Map to report on a link type or location, rather than the link URL.
Note: A trailing semicolon (;) is required when using s_objectID with Activity Map.
100 Bytes OID Activity Map, ClickMap The Absolute URL of a Clicked
Link
Examples
s_objectID="top left 2"
s_objectID="prod 123789 search"
Configuration Settings
None
server
Navigation title:server
The server variable is used to show either the domain of a web page (to show which domains people come to)
or the server serving the page (for a load balancing quick reference).
Max Size Debugger Parameter Reports Populated Default Value
If your site has more than one domain serving the same content, the server variable can be used to track which
of those domains visitors are using. The following JavaScript will populate the domain of the page into the server
variable.
s.server=window.location.hostname
If you are using the server variable to give a quick guide to load balancing, you could put a server name or
number into the server variable. See the following example:
s.server="server 14"
While the Most Popular Servers report may be used as a load balancing quick reference, it is not a precise
measure of server load. For example, back-button traffic does not increase server load, but is shown in reports.
The report does not show which servers are serving images or large downloads.
Examples
s.server="server 18"
s.server=window.location.hostname
Configuration Settings
None
159
state
Navigation title:state
The state and zip variables are conversion variables.
They are like eVars in that they capture events, but unlike eVars, they don't persist. The zip and state variables
are like eVars that expire immediately.
Max Size Debugger Parameter Reports Populated Default Value
Because the state and zip variables expire immediately, the only events associated with them are events that are
fired on the same page on which they are populated. For example, if you are using state to compare conversion
rates by state, you should populate the state variable on every page of the checkout process. For conversion sites,
Adobe recommends using the billing address as the source for the Zip Code, but you may choose to use the
shipping address instead (assuming there is only one shipping address for the order). A media site may choose
to use zip and state for registration or ad click-through tracking.
Examples
s.state="california"
s.state="prince edward island"
Configuration Settings
None
timestamp
Navigation title:timestamp
This variable lets you customize the timestamp of a hit similar to the AppMeasurement libraries for other
platforms.
Max Size Debugger Parameter Reports Populated Default Value
Syntax
s.timestamp="UNIX or ISO-8601 format timestamp"
The timestamp variable must be in the format explained in the next section.
Timestamp Formats
Timestamps must be in UNIX (seconds since Jan 1st 1970) or ISO-8601 format, with the following restrictions
on the accepted ISO-8601 format:
• Both date and time must be provided, separated by "T"
• The date must be a calendar date with full precision (year, month, and day). . Week dates and ordinal dates are
not supported.
• The date can be in standard or extended format (YYYY-MM-DD or YYYYMMDD), but they must include the hour
and minute. Seconds are optional (HH:MM, HH:MM:SS, HHMM, or HHMMSS). Fractional minutes and seconds
can be passed in, but the fractional part is ignored.
• An optional time zone can be specified in standard or extended format (±HH, ±HH:MM, ±HH, ±HHMM, or Z)
UNIX timestamps continue to be supported (seconds since Jan 1st 1970).
Examples
s.timestamp=Math.round((new Date()).getTime()/1000);
s.timestamp="2012-04-20T12:49:31-0700";
The following list contains examples of valid ISO-8601 format timestamps:
2013-01-01T12:30:05+06:00
2013-01-01T12:30:05Z
2013-01-01T12:30:05
2013-01-01T12:30
Configuration Settings
A report suite must be enabled to accept custom timestamps by Customer Care before you can use this variable.
After custom timestamps are enabled, all hits sent to the report suite must contain a timestamp or they are
discarded.
161
• For time-stamped data sent in that is older than yesterday, every day adds about 1 hour of delay, up to 15
days ago, when the delay stops going up.
• Timestamp-enabled session data is kept for up to 92 days.
trackingServer
Navigation title:trackingServer
The trackingServer variable is used for first-party cookie implementation to specify the domain at which the
image request and cookie is written.
Used for non-secure pages. If trackingServer is defined, nothing goes to 2o7.net. If trackingServer is not defined
(and dc is not defined), data goes to 112.2o7.net.
Max Size Debugger Parameter Reports Populated Default Value
trackingServerSecure
Navigation title:trackingServerSecure
The trackingServerSecure variable is used for first-party cookie implementation to specify the domain at which
the image request and cookie is written.
Used for secure pages. If trackingServerSecure is not defined, SSL data goes to trackingServer.
Max Size Debugger Parameter Reports Populated Default Value
transactionID
Navigation title:transactionID
Integration Data Sources use a transaction ID to tie offline data to an online transaction (like a lead or purchase
generated online).
Each unique transactionID sent to Adobe is recorded in preparation for a Data Sources upload of offline
information about that transaction. See Data Sources.
Max Size Debugger Parameter Reports Populated Default Value
Note: The transactionID variable can contain any character other than a comma. It should be in the same
location where the character limit (100 bytes) is specified. If multi-byte characters are used, multi-byte
character support must be enabled in order to avoid problems with unexpected characters in the
transactionID.
visitorID
Navigation title:visitorID
Visitors can be identified by the visitorID variable or by IP address/User Agent.
The visitorID can be up to 100 alpha-numeric characters and must not contain a hyphen.
If you explicitly set a custom ID, it will always be used before the other ID methods.
This is the order of use: s.visitorID > s_vi > s_fid > IP/UA.
Max Size Debugger Parameter Reports Populated Default Value
Examples
s.visitorID="abc123"
Configuration Settings
None
visitorNamespace
Navigation title:visitorNamespace
The visitorNamespace variable is used to identify the domain with which cookies are set.
163
If visitorNamespace is used in your JavaScript file, do not delete or alter it. If visitorNamespace changes, all
visitors reported in Analytics may become new visitors. Visitor history becomes disconnected from current and
future traffic. Do not alter this variable without approval from an Adobe representative.
Max Size Debugger Parameter Reports Populated Default Value
Analytics uses a cookie to uniquely identify visitors to your site. If visitorNamespace is not used, the cookie is
associated 2o7.net. If visitorNamespace is used, the cookie is associated with a sub-domain of 2o7.net. All
visitors to your site should have their cookies associated with the same domain or sub-domain.
The reason for using the visitorNamespace variable is to avoid the possibility of overloading a browser's cookie
limit. Internet Explorer imposes a limit of 20 cookies per domain. By using the visitorNamespace variable, other
companies' Analytics cookies will not conflict with your visitors' cookies.
Examples
s.visitorNamespace="company_name"
s.visitorNamespace="Adobe"
Configuration Settings
None
zip
Navigation title:zip
The state and zip variables are conversion variables.
They are like eVars in that they capture events, but unlike eVars, they don't persist. The zip and state variables
are like eVars that expire immediately.
Max Size Debugger Parameter Reports Populated Default Value
Since the state and zip variables expire immediately, the only events associated with them are events fired on
the same page that are populated. For example, if you are using zip to compare conversion rates by Zip Code,
you should populate zip on every page of the checkout process. Adobe recommends using the billing address as
the source for the Zip Code. You may choose to use the shipping address instead (assuming there is only one
shipping address for the order). A media site may choose to use zip and state for registration or ad click-through
tracking.
Examples
s.zip="92806"
s.zip="92806-4115"
Configuration Settings
None
Note: JavaScript H-Code does not support these additional eVars and events.
165
Frequently Asked Questions
• Will all Adobe Analytics interfaces have immediate access to these new variables?
These interfaces will have immediate access: Analysis Workspace, Reports & Analytics, Report Builder, Ad
Hoc Analysis, APIs, and Data Workbench.
• Will these additional eVars and events automatically show up in my data feeds?
Data feeds will have access to the new variables and events once enabled. New eVar columns will not appear
until you choose to include them. However, new events will appear in the event_list column as soon as they’re
enabled, and the events lookup table contains the event names for those event IDs. Do not enable new events
unless you are ready to consume them in Data Feeds.
• How do I request new data feed columns?
To request new columns, refer to Configuring Data Feeds.
• What if I am an Analytics Ultimate customer who wants to go back to Analytics Prime and I currently
have more than 200 eVars enabled?
Adobe will not disable any of your existing eVars, but you will not be able to enable more. If you disable eVars,
you cannot turn them back on until you are below the Analytics Prime limit of 200 enabled eVars.
Note: See Configuration Variables on page 106 and Page Variables on page 129 for an in-depth look at
the most common Analytics variables.
s_account Determines the report suite where data is stored and reported.
campaign Identifies marketing campaigns used to bring visitors to your site. The value of campaign is
usually taken from a query string parameter.
channel Usually identifies a section of your website. For example, a merchant may have sections such
as Electronics, Toys, or Apparel. A media site may have sections such as News, Sports, or
Business.
charSet Translates the character set of the Web page into UTF-8.
colorDepth Displays the number of bits used to display color on each pixel of the screen.
connectionType Indicates (in Microsoft Internet Explorer) whether the browser is configured on a LAN or modem
connection.
cookieDomainPeriods Determines the domain on which the Analyticsvisitor ID (s_vi) cookie will be set by determining
the number of periods in the domain of the page URL. For www.mysite.com,
cookieDomainPeriods should be "2." For www.mysite.co.jp, cookieDomainPeriods should be
"3."
cookieLifetime Used by both JavaScript and Analytics servers to determine the lifespan of a cookie.
currencyCode Determines the conversion rate to be applied to revenue as it enters the Analytics databases.
Analytics databases store all monetary amounts in a currency of your choice. If that currency is
the same as that specified in currencyCode, or currencyCode is empty, no conversion is applied.
doPlugins doPlugins is a reference to the s_doPlugins function. It allows the s_doPlugins function to be
called at the appropriate location within the JavaScript file.
dynamicAccountList Dynamically selects a report suite to which data is sent. The dynamicAccountList variable contains
the rules that used to determine the destination report suite.
dynamicAccountMatch Uses the DOM object to retrieve the section of the URL to which all rules in dynamicAccountList
are applied. This variable is only valid when dynamicAccountSelection is set to 'True.'
dynamicAccountSelection Lets you dynamically select the report suite based on the URL of each page.
dynamicVariablePrefix Allows deployment to flag variables that should be populated dynamically. Cookies, request
headers, and image query string parameters are available to be populated dynamically.
eVarN Used for building custom reports within the AnalyticsConversion Module. When an eVar is set
to a value for a visitor, Analytics remembers that value until it expires. Any success events that
a visitor encounters while the eVar value is active are counted toward the eVar value.
events Records common shopping cart success events and custom success events.
fpCookieDomainPeriods Determines the domain on which Analytics cookies other than the visitor ID (s_vi) cookie will
be set by determining the number of periods in the domain of the page.
hierN Determines the location of a page in your site's hierarchy. This variable is most useful for sites
that have more than three levels in the site structure.
homepage Indicates (in Internet Explorer) whether the current page is set as the user's home page.
linkDownloadFileTypes A comma-separated list of file extensions. If your site contains links to files with any of these
extensions, the URLs of these links appear in the File Downloads report.
linkExternalFilters If your site contains many links to external sites, and you don't want to track all exit links,
linkExternalFilters can be used to report on a specific subset of exit links.
linkInternalFilters Determines which links on your site are exit links. It is a comma-separated list of filters that
represent the links that are part of the site.
linkLeaveQueryString Determines whether or not the query string should be included in the Exit Links and File
Download reports.
linkName An optional variable used in Link Tracking that determines the name of a custom, download,
or exit link. The linkName variable is not normally needed because the third parameter in the tl()
function replaces it.
linkTrackEvents Contains the events that should be sent with custom, download, and exit links. This variable is
only considered if linkTrackVars contains "events."
linkTrackVars A comma-separated list of variables that will be sent with custom, exit, and download links. If
linkTrackVars is set to "", all variables that have values are sent with link data.
linkType An optional variable used in link tracking that determines which report a Link Name or URL
will appear (custom, download, or exit Links). linkType is not normally needed because the
second parameter in the tl() function replaces it.
mediaName Specifies the name of the video or media item. It is only available via the Data Insertion API
and Full Processing Data Source.
Media.trackEvents Identifies which events should be sent with a media hit. It is only applicable with
JavaScriptActionSource..
167
Variable Description
Media.trackVars Identifies which variables should be sent with a media hit. It is only applicable with
JavaScriptActionSource..
mobile Controls the order in which cookies and subscriber ids are used to identify visitors.
s_objectID A global variable that should be set in the onClick event of a link. By creating a unique object
ID for a link or link location on a page, you can improve visitor click map tracking or use visitor
click map to report on a link type or location, rather than the link URL.
pageName Contains the name of each page on your site. If pageName is blank, the URL is used to represent
the page name in Analytics.
pageType Used only to designate a 404 Page Not Found Error page. It only has one possible value, which
is "errorPage." On a 404 Error page, the pageName variable should not be populated.
pageURL In rare cases, the URL of the page is not the URL that you would like reported in Analytics. To
accommodate these situations, Analytics offers the pageURL variable, which overrides the actual
URL of the page.
plugins On Netscape and Mozilla-based browsers, lists the plugins installed in the browser.
products Used for tracking products and product categories as well as purchase quantity and purchase
price. The products variable should always be set in conjunction with a success event. Optionally,
the products variable can track custom numeric and currency events, as well as Merchandising
eVars.
propN Used for building custom reports within the AnalyticsTraffic Module. props may be used as
counters (to count the number of times a page view is sent), for pathing reports, or in correlation
reports.
purchaseID Used to keep an order from being counted multiple times by Analytics. Whenever the purchase
event is used on your site, you should use the purchaseID variable.
resolution Displays the monitor resolution of the visitor viewing the Web page.
server Shows either the domain of a Web page (to show which domains people come to) or the server
serving the page (for a load balancing quick reference).
trackDownloadLinks Set trackDownloadLinks to 'true' if you want to track links to downloadable files on your site. If
trackDownloadLinks is 'true,' linkDownloadFileTypes determines which links are downloadable
files.
trackingServer Used for first-party cookie implementation to specify the domain at which the image request and
cookie is written. Used for non-secure pages.
trackingServerSecure Used for first-party cookie implementation to specify the domain at which the image request and
cookie is written. Used for secure pages.
transactionID Ties offline data to an online transaction (like a lead or purchase generated online). Each unique
transactionID sent to Adobe is recorded in preparation for a Data Sources upload of offline
information about that transaction. See the Data Sources Guide.
s_usePlugins If the s_doPlugins function is available and contains useful code, s_usePlugins should be set to
'true.' When usePlugins is 'true,' the s_doPlugins function is called prior to each image request.
visitorID Visitors may be identified by the visitorID tag, or by IP address/User Agent. The visitorID may
be up to 100 alphanumeric characters and must not contain a hyphen.
visitorNamespace If visitorNamespace is used in your JavaScript file, do not delete or alter it. This variable is used
to identify the domain with which cookies are set. If visitorNamespace changes, all visitors
reported in Analytics may become new visitors. In short, do not alter this variable without approval
from an Adobe consultant.
Merchandising Variables
When measuring the success of external campaigns or external search terms, you typically want a single value
to receive credit for any success events that occur. For example, if a customer clicks a link in an email campaign
to visit your website, all purchases made as a result should be credited to that campaign.
But what about events that are driven by internal search or by category browsing when a customer is looking
for multiple items? For example, a customer searches your site for "goggles" and then adds a pair to the cart:
169
Before checkout, the customer searches for "winter coat", and then adds a down jacket to the to the cart:
When this purchase is completed, assuming the allocation wasn't changed from Most Recent, you'll have an
internal search for "winter coat" credited with the purchase of a pair of goggles. Good for "winter coat", but bad
for marketing decisions:
Internal Search Term Revenue
goggles $38
Setting Description
Expire After
Determines how long merchandising values should persist.
Merchandising
Implementing Using Product Syntax on page 171: The value is set within s.products.
Implementing Using Conversion Variable Syntax on page 172: The value is set in the designated merchandising
s.eVar.
Merchandising Binding
Indicates when a product should be tied to the current merchandising category. Multiple events may be selected
Event (Conversion
by holding down Ctrl and clicking on multiple items in the list.
variable syntax only)
Note: When "Product Syntax" is selected, you can not choose an event (it is disabled, but not grayed
out). You can select an event only when the "Conversion Variable Syntax" is selected.
• Example
s.events="prodView"
s.products=";Fernie Snow Goggles;;;;eVar1=goggles"
In
The value "goggles" for eVar1 is assigned to the product "Fernie Snow Goggles". All subsequent success events
(product adds, checkouts, purchases, and so on) that involve this product are credited to "goggles".
171
Implementing Using Conversion Variable Syntax
Conversion Variable Syntax should be used when the eVar value is not available to set in s.products. This
typically means that your page has no context of the merchandising channel or finding method. In these cases
you must set the merchandising variable before you arrive at the product page, and the value persists until the
binding event occurs.
When the binding event selected during configuration occurs, the persisted value of the eVar is associated with
the product. For example, if prodView is specified as the binding event, the merchandising category is tied to
the current product list only at the time the event occurs. Only subsequent binding events can update a
merchandising eVar that has already been assigned to a product.
• Syntax
On the same or previous page before the binding event:
s.eVar1="merchandising_category"
On the page where the binding event occurs:
s.events="prodView"
s.products="category;product"
• Example
Page 1 of the visit:
s.eVar1="Outdoors:Ski Goggles"
Page 2 of the visit:
s.events="prodView"
s.products=";Fernie Snow Goggles"
The value "Outdoors:Ski Goggles" for eVar1 is assigned to the product "Fernie Snow Goggles". All subsequent
success events (product adds, checkouts, purchases, and so on) that involve this product are credited to "goggles".
Additionally, the current value of the merchandising variable is tied to all subsequent products until one of the
following conditions is met:
• eVar expires (based on the "Expire After" setting)
• The merchandising eVar is overwritten with a new value.
For more information, see "Advanced Conversion Syntax Merchandising" at analyticsdemystified.com.
Note: The current functionality for counting instances on merchandising variables is being reviewed and
is scheduled to change in an upcoming release.
Implementation
Upon generating code within the code manager, you are given the following at the bottom of the page code:
var s_code=s.t();if(s_code)document.write(s_code)//--></script>
<script language="JavaScript"
type="text/javascript"><!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')//--></script>
<noscript><img
src="http://yournameserver.112.2o7.net/b/ss/yourreportsuiteid/1/H.23.6--NS/0"
height="1" width="1" border="0" alt="" /></noscript>
Each line of code has a specific purpose:
var s_code=s.t();if(s_code)document.write(s_code)//-->
This line of code is what actually fires the Javascript function. The s_code variable and it's accompanying
document.write method is for browsers that don't support image objects (Netscape browsers prior to version 3
and Internet Explorer prior to version 4; estimated less than .5% of all internet users).
<script language="JavaScript"
type="text/javascript"><!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')//--></script>
<noscript><img
src="http://yournameserver.112.2o7.net/b/ss/yourreportsuiteid/1/H.23.6--NS/0"
height="1" width="1" border="0" alt="" />
For any additional questions about the s.t() function, contact your organization's Account Manager. They can
arrange a meeting with an Adobe Implementation Consultant, who can provide assistance.
173
The s.tl() Function - Link Tracking
Navigation title:
File downloads and exit links can be automatically tracked based on parameters set in the AppMeasurement for
JavaScript file.
If needed, these types of links can be manually tracked using custom link code as explained below. In addition,
custom link code can be used to track generic custom links that can be used for a variety of tracking and reporting
needs.
Variable Description
this
The first argument should always be set either to this (default) or true. The argument refers to the object being
clicked; when set to "this," it refers to the HREF property of the link.
If you are implementing link tracking on an object that has no HREF property, you should always set this
argument to "true."
Because clicking a link often takes a visitor off the current page, a 500ms delay is used to ensure that an image
request is sent to Adobe before the user leaves the page. This delay is only necessary when leaving the page,
but is typically present when the s.tl() function is called. If you want to disable the delay, pass the keyword 'true'
as the first parameter when calling the s.tl() function.
linkType
s.tl(this,linkType,linkName, variableOverrides, doneAction)
linkType has three possible values, depending on the type of link that you want to capture. If the link is not a
download or an exit link, you should choose the Custom links option.
linkName This can be any custom value, up to 100 characters. This determines how the link is displayed in the appropriate
report.
variableOverrides (Optional, pass null if not using) This lets you change variable values for this single call, It is similar to other
AppMeasurement libraries.
useForcedLinkTracking
This flag is used to disable forced link tracking for some browsers. Forced link tracking is enabled by default
for FireFox 20+ and WebKit browsers.
Default Value
true
Example
s.useForcedLinkTracking = false
forcedLinkTrackingTimeout
The maximum number of milliseconds to wait for tracking to finish before performing the doneAction that was
passed into s.tl . This value specifies the maximum wait time. If the track link call completes before this
timeout, the doneAction is executed immediately. If you notice that track link calls are not completing, you
might need to increase this timeout.
Default Value
250
Example
s.forcedLinkTrackingTimeout = 500
doneAction
An optional parameter to specify a navigation action to execute after the track link call completes when
useForcedLinkTracking is enabled.
Syntax
s.tl(linkObject,linkType,linkName,variableOverrides,doneAction)
doneAction : (optional) Specifies the action to take after the link track call is sent or has timed out, based on
the value specified by:
s.forcedLinkTrackingTimeout
The doneAction variable can be the string navigate, which causes the method to set
document.location to the href attribute of linkObject. The doneAction variable can also be a
function allowing for advanced customization.
If providing a value for doneAction in an anchor onClick event, you must return false after the s.tl call to
prevent the default browser navigation.
To mirror the default behavior and follow the URL specified by the href attribute, provide a string of navigate
as the doneAction .
Optionally, you can provide your own function to handle the navigation event by passing this function as the
doneAction.
Examples
<a href="..."
onclick="s.tl(this,'o','MyLink',null,'navigate');return
false">Click Here</a> <a href="#"
onclick="s.tl(this,'o','MyLink',null,function(){if(confirm('Proceed?'))document.location=...});return
false">Click Here</a>
Example
The following example of an s.tl() function call uses the default 500 ms delay to ensure data is collected before
leaving the page.
s.tl(this,'o','link name');
The following example disables the 500 ms delay, if the user is not going to leave the page, or whenever the
object being clicked has no HREF.
s.tl(true,'o','link name');
The 500ms delay is a maximum delay. If the image requested returns in less than 500 ms, the delay stops
immediately. This allows the visitor to move onto the next page or next action within the page.
175
The following examples are for handling custom links on WebKit browsers:
<a href="..." onclick="s.tl(this,'o','MyLink',null,'navigate');return
false">Click Here</a>
<a href="#" onclick="s.tl(this,'o','MyLink',null,
function(){if(confirm('Proceed?'))document.location=...});return false">Click
Here</a>
Note: Uses of custom link code are often very specific to your Web site and reporting needs. You can
contact your Adobe Consultant or Customer Care before implementing custom link code to understand
the possibilities available to you and how best to leverage this feature based on your business needs.
The basic code to track a link using custom link code is shown in the following example:
<a href="index.html" onClick="s.tl(this,'o','Link Name')">My Page</a>
Note: The s_gi function must contain your report suite ID as a function parameter. Be sure to swap out
rsid for your unique report suite ID.
Note: If the link name parameter is not defined, the URL of the link (determined from the "this" object)
is used as the link name.
Example 1
The file types jpg and aspx are not included in linkDownloadFileTypes above, therefore no clicks on them
are automatically tracked and reported as file downloads.
The parameter linkLeaveQueryString modifies the logic used to determine exit links. When
linkLeaveQueryString=false, exit links are determined using only the domain, path, and file portion of the link
URL. When linkLeaveQueryString=true, the query string portion of the link URL is also used to determine an
exit link.
//HTML file
<a href='http://othersite.com/index.html?r=mysite.com'>Visit Other Site!</a>
Example 3
With the following settings, the link below is not counted as an exit link:
//JS file
s.linkInternalFilters="javascript:,mysite.com"
s.linkLeaveQueryString=true
//HTML
<a href='http://othersite.com/index.html?r=mysite.com'>Visit Other Site</a>
Note: A single link can be tracked only as a file download or exit link, with file download taking priority.
If a link is both an exit link and file download based on the parameters linkDownloadFileTypes and
linkInternalFilters, it is tracked and reported as a file download and not an exit link. The following table
summarizes the automatic tracking of file downloads and exit links.
177
To work around this behavior, H.25 (released July 2012) includes an overloaded track link method ( s.tl )
that forces browsers with this behavior to wait for the track link call to complete. This new method executes the
track link call and handles the navigation event, instead of using the default browser action. This overloaded
method requires an additional parameter, called doneAction, to specify the action to take when the link tracking
call completes.
To use this new method, update calls to s.tl with an additional doneAction parameter, similar to the following:
<a href="http://anothersite.com"
onclick="s.tl(this,'e','AnotherSite',null,'navigate');return false">
Passing navigate as the doneAction mirrors the default browser behavior and opens the URL specified by the
href attribute when the tracking call completes.
In JavaScript H.25.4 (released February 2013), the following scope limitations were added to links tracked when
useForcedLinkTracking is enabled. The automatic forced link tracking applies only to:
• <A> and <AREA> tags.
• The tag must have an HREF attribute.
• The HREF can't start with #, about:, or javascript:.
• The TARGET attribute must not be set, or the TARGET needs to refer to the current window (_self, _top,
or the value of window.name).
Setting Additional Variables for File Downloads, Exit Links, and Custom Links
Navigation title:Setting Additional Variables for File Downloads, Exit Links, and Custom Links
Two parameters (linkTrackVars and linkTrackEvents) control which Analytics variables are set for file downloads,
exit links, and custom links.
They are, by default, set within the JS file as follows:
s.linkTrackVars="None"
s.linkTrackEvents="None"
Note: The variable pageName cannot be set for a file download, exit link, or custom link, because each
of the link types is not a page view and does not have an associated page name.
Note: If linkTrackVars (or linkTrackEvents) is null (or an empty string), all Analytics variables (or events)
that are defined for the current page are tracked. This most likely inflates instances of each variable
inadvertently and should be avoided.
Best Practices
The settings for linkTrackVars and linkTrackEvents within the JS file affect every file download, exit link, and
custom link. Instances of each variable and event can be inflated in situations where the variable (or event)
applies to the current page, but not the specific file download, exit link, or custom link.
To ensure that the proper variables are set with custom link code, Adobe recommends setting linkTrackVars and
linkTrackEvents within the custom link code, as follows:
<a href="index.html" onClick="
var s=s_gi('rsid');
s.linkTrackVars='prop1,prop2,eVar1,eVar2,events';
s.linkTrackEvents='event1';
s.prop1='Custom Property of Link';
s.events='event1';
s.tl(this,'o','Link Name');
">My Page
The values of linkTrackVars and linkTrackEvents override the settings in the JS file and ensure only the variables
and events specified in the custom link code are set for the specific link.
Note: In the above example, the value for prop1 is set within the custom link code itself. The value of
prop2 comes from the current value of the variable as set on the page.
function trackClickInteraction(name){
var s=s_gi('rsid');
s.linkTrackVars='prop42,prop35';
179
s.prop42=name;
s.prop35=s.pageName;
s.tl(true,'o','track interaction',null,'navigate');
}
/* Set Click Interaction values (without timeout – pre H25 code*/
function trackClickInteraction(name){
var s=s_gi('rsid');
s.linkTrackVars='prop42,prop35';
s.prop42=name;
s.prop35=s.pageName;
s.tl(true,'o','track interaction');
}
Note: If needed, you can pass the link type and link name as additional parameters for the JavaScript
function.
You can use code similar to the following to call these functions:
<a href=”http://www.your-site.com/some_page.php”
onclick=”trackClickInteraction('this.href');”>Link Text</a>
linkType
Contains the automatically determined link type, if any. Can be set to If set with linkURL or linkName, a
one of the following: server call is sent as a download, custom, or
• d (download) exit link.
• e (exit)
• o (custom/other)
linkName
The name that will appear in the custom, download or exit link report. If set with linkType , an image request
Truncated at 100 characters. Can be set to any string. will be sent as a download, custom or exit link
This is the pev2 parameter in the image request.
linkURL
The URL of the link, which acts as the name if a linkName does not If set with linkType, an image request
exist. Can be set to any URL string. will be sent as a download, custom or exit link
This is the pev1 parameter in the image request.
linkObject
The clicked object for reference. This is read-only. No direct impact on measurement.
Example
function s_doPlugins(s) {
if (s.linkType == "d" && s.linkURL.indexOf(".aspx?f=") {
//special tracking for .aspx file download script
s.eVar11 = s.linkURL.substring(s.linkURL.lastIndexOf("?f=") + 3,
s.linkURL.length);
}
181
s.eVar10 = s.LinkURL;
}
}
Implementation Examples
Sending video data to one report suite while sending the rest to another:
// Set in the core JS file by default
var s=s_gi('prodrsid');
Note: clearVars() is included in About AppMeasurement for JavaScript on page 67, it is not available
in H code and previous.
s=s_gi('rsid1') A copy of the object created earlier, but not the original.
s=s_gi('rsid1,rsid3') A copy of the object created earlier, but not the original.
s=s_gi('rsid3') A new, empty object, with no config variables set (e.g. linkTrackVars is empty,
as is linkDownloadFileTypes).
183
Util.cookieRead
Gets the value for a cookie.
Syntax:
s.Util.cookieRead(key)
Parameters:
Parameter Description
Returns:
Cookie value or an empty string if the cookie is not found.
Example:
var myCookie = s.Util.cookieRead("my_cookie");
Util.cookieWrite
Writes a value to a cookie.
Syntax:
s.Util.cookieWrite(key, value [,expire])
Parameters:
Parameter Description
expire (optional) Date object containing the expiration date for the cookie. Default is to use a session cookie.
Returns:
Example:
//set a cookie with an expiration 6 months from now
var date = new Date();
date.setMonth(date.getMonth() + 6);
var success = s.Util.cookieWrite("my_cookie", "my_value", date);
Util.getQueryParam
Returns the value of a specified query string parameter, if found in the current page URL or in the provided
string.
Because important data (such as campaign tracking codes, internal search keywords, etc.) is available in the
query string on a page, getQueryParam helps capture the data into Analytics variables.
This utility replaces the getQueryParam on page 219 plug-in.
Note: The syntax for the utility differs from the syntax for the plug-in.
Parameters:
Parameter Description
key (required) The name of the query string parameter that you want to get. This parameter is case sensitive.
url (optional) Default url is s.pageURL or window.location. Specifying a value for this parameter overrides
the URL from which the query parameter is retrieved to the one specified.
delim (optional) Parameter delimiter in the URL. Default delimiter is "&". This lets you to specify an alternate query-string
delimiter, such as ";".
Returns:
This function returns the value of the query-string variable or an empty string if it's not found.
Example:
s.doPlugins = function(s) {
s.campaign = s.Util.getQueryParam("cid");
};
Offline Tracking
The following variables and functions let you store measurement calls when the application is offline.
Note: To enable offline tracking, your report suite must be timestamp-enabled. If timestamps are enabled
on your report suite, your trackOffline configuration property must be true. if your report suite is
not timestamp enabled, your trackOffline configuration property must be false. If this is not configured
correctly, data will be lost. If you are not sure if a report suite is timestamp enabled, Contact and Legal
Information on page 287.
185
Property or Method Description
Maximum number of offline hits stored in the queue.
Examples:
s.offlineHitLimit=100;
offlineThrottleDelay Default: 0
Specifies a cadence (or delay), in milliseconds, for sending buffered hit data when AppMeasurement
detects an active network connection. Doing so mitigates the performance impact of sending multiple
hits on the application.
For example, if offlineThrottleDelay=1000, and it takes 300ms to send the hit data, AppMeasurement
waits 700ms before sending the next buffered hit.
s.offlineThrottleDelay=1000;
forceOnline Manually set the online or offline state of the measurement object. The library automatically detects
when the device is offline or online, so these methods are needed only if you want to force measurement
forceOffline
offline. forceOnline is used only to return to the online state after manually going offline.
When measurement is offline:
• If trackOffline is true: hits are stored until measurement is online.
• If trackOffline is false: hits are discarded.
Examples:
s.forceOffline();
s.forceOnline();
Data Collection
<my.a>red</my.a>
or:
<my><a>red</a></my>
Each of these examples result in
a context data value of my.a
= red. Multiple key-value
pairs can be specified.
In the query string, this context
data variable would appear as
c.my.a=red
c1-c75 s.prop1-s.prop75 All Custom Traffic reports Traffic variables used in custom
traffic reporting
ch s.channel Site Content | Site Sections The Site Sections variable used
in traffic reporting
D dynamicVariablePrefix None
See Dynamic Variables on page
127.
events or ev s.events Site Traffic | Purchases, Shopping The commerce and custom events
Cart, Custom Events that occurred on the page; used
in conversion reports
187
Parameter Analytics Variable Report Populated Description
the remaining bytes appearing
later in the query string in the -g=
query parameter.
oid s.objectID Site Content | Links | ClickMap Object identifier for last page;
used in ClickMap
ot None Site Content | Links | ClickMap Object tag name for last page;
used in ClickMap
pageName (or gn) s.pageName Site Content | Pages The page's designated name in
reporting
pageType (or gt) s.pageType Site Content | Pages Not Foun Indicates whether it is a 404 page
or not (Either 'error' or blank)
pe s.linkType Site Content | Links | Exit Links, Determines the type of custom
File Downloads, Custom Links link hit fired
pev1 None Site Content | Links | Exit Links, URL the custom link hit occurred
File Downloads, Custom Links on
pev2 None Site Content | Links | Exit Links, Custom link friendly name
File Downloads, Custom Links
pid None Site Content | Links | ClickMap Page identifier for last page; used
in ClickMap
pidt None Site Content | Links | ClickMap Page identifier type for last page;
used in ClickMap
server (or sv) s.server Site Content | Servers The page's server; used in traffic
reporting
state s.state Visitor Profile | Visitor State Specifies the state as defined by
the variable.
ts None
timestamp The custom timestamp calculated
and sent in with the hit. Typically
used for offline tracking.
189
Data Collection HTTP Headers
HTTP request and response headers are used to collect additional data beyond what is collected by
AppMeasurement. This section describes the headers used during data collection.
Header Usage
Cookie
Reading cookies previously created by our data collection servers.
As of 2014, Adobe servers will discard all cookies that accompany a server call except those set by Adobe.
See Cookies Used in the Marketing Cloud for the full list of Adobe's cookies.
User-Agent Used for browser, operating system, and mobile device detection.
X-Device-User-Agent Used as an alternative to User-Agent for correct browser, operating system, and mobile device detection
for some browsers like OperaMini.
X-Original-User-Agent Used as an alternative to User-Agent for correct browser, operating system, and mobile device detection
for some browsers like OperaMini.
X-OperaMini-Phone-UA Used as an alternative to User-Agent for correct browser, operating system, and mobile device detection
for some browsers like OperaMini.
X-Skyfire-Phone Used as an alternative to User-Agent for correct browser, operating system, and mobile device detection
for some browsers like OperaMini.
X-Bolt-Phone-UA Used as an alternative to User-Agent for correct browser, operating system, and mobile device detection
for some browsers like OperaMini.
UA-Pixels Used as an alternate source for the screen resolution of the client screen.
UA-Color Used as an alternate source for the color depth of the client screen.
X-moz Detecting that the data collection request was made as part of pre-fetching a webpage.
X-Purpose Detecting that the data collection request was made as the browser was showing a preview of a webpage.
Accept Used to identify the image formats supported by the browser so we know if we need to send back a GIF
or WBMP image.
Referrer Used as a fallback for getting information about the page URL the data collection request was made from
when it wasn't passed in on the query-string or when it's different from the value in the query-string.
X-Forwarded-For Used to find the correct IP address for the client that made the data collection request. The IP address is
used to generate geographic region, mobile carrier, and other reports.
Note: Implementations using dynamic variables have the option of reading in other HTTP request headers
not listed above.
Header Usage
Access-Control-Allow-Origin Used to enable support for cross-origin resource sharing style data collection requests to our servers.
P3P Provides the default or custom P3P policy for the data collection request.
Status Contains "SUCCESS" or "FAILURE" status for a no content request. Used only when the request specifies
that no content should be returned.
Reason Contains the reason for the failure status of a no content request. Used only when the request specifies
that no content should be returned.
Location Used to redirect the client making the data collection request off to a different URL. An example is our
cookie handshake to detect the ability to set the visitor ID cookie.
Content-Type Specifies the type of content sent back to the client (GIF, text, Javascript, etc).
Content-Length Specifies the size of the content sent back to the client.
Note: Other HTTP headers may be set in the response for internal status monitoring. Some of these
headers might be returned to the browser, but it is not necessary that they receive them.
Variable Overrides
Navigation title:Variable Overrides
Variable overrides let you change a variable value for a single track or track link call.
To override variables, create a new object, assign variable values, and pass this object as the first parameter to
s.t(), or as the fourth parameter to s.tl():
s.eVar1="one";
s.eVar2="two";
s.eVar3="three";
s.t(overrides);
// values passed: eVar1="1_one", eVar2="", eVar3="three"
s.linkTrackVars="eVar1,eVar2,eVar3,events";
s.eVar1="one";
s.eVar2="two";
s.eVar3="three";
s.tl(this,'e','AnotherSite',overrides,'navigate')
// values passed: eVar1="1_one", eVar2="", eVar3="three"
191
Report Suite IDs - Dynamic Accounts
The .js file can be configured to automatically select a report suite ID. The .js file automatically sends the
image request to the report suite based on the URL. For example, if the URL is www.mysite.com, the image
request is automatically sent to report suite A. If the URL is www.mysite1.com, the image request is
automatically sent to report suite B.
These strings can be found within any of the following:
• Host/domain (default setting)
• Path
• Query String
• Host/domain and Path
• Path and Query String
• Full URL
For more information on configuring Analytics to automatically select a Report Suite ID, contact Adobe Live
Support.
Path directory1/directory2/filename.html
URL http://www.client.com/directory1/directory2/filename.html?param1=1234¶m2=4321
Portion s.dynamicAccountmatch
Path window.location.pathname
URL window.location.href
In the case above, if the host/domain name did not contain either "qa.client.com" or "client.com," the report suite
"defaultreportsuiteid" would be used.
Common Errors
Common errors in dynamic accounts are described in the following sections.
In the case above, defaultreportsuiteid is always used after the other two lines are removed.
Placement of Code
Defining s_account after the lines of code does not override the dynamic account selection, as shown below.
var s_account="defaultreportsuiteid"
s.dynamicAccountSelection=true
s.dynamicAccountList="devreportsuite1=qa.client.com;reportsuite1=client.com"
s_account="anotherreportsuiteid"
In the example above, the account "anotherreportsuiteid" overrides "defaultreportsuiteid," but does not override
any matches that occur in s.dynamicAccountList. The function that evaluates s.dynamicAccountList is actually
executed much later in the .JS file.
Multi-Suite Tagging
Multi-suite tagging may be used in conjunction with dynamic account selection, as shown below.
s.dynamicAccountSelection=true
s.dynamicAccountList="suiteid1,suiteid2=client.com"
193
Dynamic Account Match
Do not put the dynamic account match variables in quotes. The options are displayed below.
GET Method
If your form uses a GET method to submit data, you have access to the desired data in the query string of the
URL on the page following form submission. You can use the getQueryParam plug-in to capture this data out
of the query string automatically and place it into the variable of your choosing.
POST Method
If your form uses a POST method to submit data (which is more common), you have the results for each specific
form element available to you in the $_POST superglobal. To capture this in a variable, you want to determine
the form element name in question. Using the music genre example mentioned before, part of the form element
in question look like this:
<input type="radio" name="music_genre" value="rock">
This radio button belongs to the "music_genre" form element. You then have access to the user's selected value
by using $_POST['music_genre']. This can be written to a variable on the page following the form submission:
s.eVar1="<?=$_POST['music_genre'];?>"
The eVar1 variable receives a copy of whatever value was submitted to your server through the form, as specified
in the value= property.
If you need additional information regarding this custom implementation method, contact your organization's
Account Manager. They can arrange a meeting with one of our Implementation Consultants to provide the help
you need.
Implementation Guidelines
Navigation title:Implementation Guidelines
Following these guidelines results in using the same cookie domains, which lets visits be tracked between various
types of implementations.
• RSID: The report suite ID
• VNS: Visitor name space, the subdomain of 2o7.net or omtrdc.net used to store the visitor ID cookie
• COOKIEDOMAIN: Your VNS + trackingServer. Depending on your data center and RDC configuration,
these can greatly vary. See Correctly populate the trackingServer and trackingServerSecure variable or Contact
and Legal Information on page 287 if you are unsure about you data collection domain.
Javascript:
var s_account="RSID"
s.visitorNamespace="VNS"
s.trackingServer="VNS.COOKIEDOMAIN.net"
Hardcoded image request:
AppMeasurement:
var s_account="RSID"
s.visitorNamespace="VNS"
s.trackingServer="VNS.COOKIEDOMAIN.net"
Hardcoded image request:
Hardcoded image request:
<img border="0" alt="" src="https://VNS.COOKIEDOMAIN.net/b/ss/RSID/5?ns=VNS"
width="1" height="1" />
<!-- Note that the visitor namespace is defined twice in hardcoded image
requests; once in the http subdomain, and another using the ns= query string
parameter! -->
If using a first-party cookie implementation, VNS.COOKIEDOMAIN.net can be replaced with the first-party
cookie domain used. For example, first-party cookies on adobe.com would be replaced with something similar
to metrics.adobe.com.
Implementation Example
Navigation title:Implementation Example
Using adobe.com as an example, the implementations described here reference the same visid cookie.
195
Javascript:
var s_account="omniturecom"
s.visitorNamespace="omniture"
s.trackingServer="omniture.112.2o7.net"
Hardcoded image request:
<img border="0" alt=""
src="https://omniture.112.2o7.net/b/ss/omniturecom/5?ns=omniture" width="1"
height="1" />
Appmeasurement:
s.account="omniturecom";
s.visitorNamespace="omniture";
s.trackingServer="omniture.112.2o7.net";
And if first-party cookies are utilized:
Javascript:
var s_account="omniturecom"
s.visitorNamespace"omniture"
s.trackingServer="metrics.omniture.com"
Hardcoded image request:
<img border="0" alt="" src="https://metrics.omniture.com/b/ss/omniturecom/5"
width="1" height="1" />
Appmeasurement:
s.account="omniturecom";
s.visitorNamespace="omniture";
s.trackingServer="metrics.omniture.com";
What to Track
One of the most commonly asked questions with RIA is how to track micro-level activity separate from
macro-level activity, and when it is appropriate to do either. For example, say you have an application that allows
customers to uniquely configure a product. The application may have significant steps the users are exposed to.
Are these steps considered page views? In addition, there are micro-level activities within each step. Should
these activities be tracked as page views?
Macro-Level Activity
Macro-level activity usually constitutes the loading of the application. This provides information on visits,
visitors, instances, value to future actions, and so forth. It can, and should, also represent major steps in the
process. A good rule of thumb is that if an RIA action changes the application more than 50% (or whatever is
considered significantly changing the user experience or content), then it is macro-level, and should be tracked
as a page view.
Micro-Level Activity
Micro-level activity includes any changes less than 50% (or not considered as significantly changing the user
experience or content). Toggling between color selections, for instance, would be considered micro-level activity.
Adobe recommends that micro-level tracking be related to features. For example, in the case of toggling between
colors, is it really important to understand which colors were considered? Or is it more important to know that
the color selection feature was used? Perhaps both are important, and if so, capture both, but when measuring
the effectiveness of RIA, consider the feature level activity as being more valuable.
All micro-level activity should be tracked as custom links with specifics measured through associated traffic
variables (props and eVars if the use needs to be measured against success events). This ensures that page views
are not inflated by micro-level activity, and allows for path analysis through the traffic variable.
What to Analyze
It is important to understand how effectively your RIA is driving success. Success is most commonly measured
through conversions. A macro-level analysis provides insight into RIA effectiveness as a whole. Micro-level
analysis may provide insight into which features help drive conversion.
You should measure efficiency of your RIA. This is an analysis of micro-level activity relative to the RIA macro
metrics. Do users go through more steps than necessary to arrive at the same goal? Analysis metrics might include
visits/features activity; page views/feature activity, visitors/feature activity, and so forth.
Conduct analysis on path flow and fall out. Are users avoiding the RIA and finding another path to the goal?
Run fallout reports built around the site and RIA flow. Run path analysis from landing pages to gauge the true
traffic patterns. Look at barriers and incentives to guide users toward the goal.
Suggested Metrics
• RIA Visits
• RIA Visitors
• RIA Page Views
• RIA Feature Activity (Custom Links) measure click activity by feature
Suggested Analysis
• RIA Feature Activity / RIA Page Views
• RIA Feature Activity / RIA Visits -
• RIA Page Views / Success Metric - Conversion Ratio: measures application effectiveness
• Total RIA Activity / Success Metric - Conversion Ratio: measures application efficiency
• Feature RIA Activity / Success Metric - Conversion Ratio: measures application feature efficiency
197
• Path Flow to and from RIA
• Fallout Rates through RIA conversion process
Example
Note: Before you call s.t(), you must clear any values on the s object that you do not want to persist.
if you are using AppMeasurement for JavaScript, you can call s.clearVars(). If you are using H
code, write a simple routine to set variables to an empty string.
s.clearVars();
s.pageName="New Page"
s.prop1="some value"
void(s.t());
The following example shows a tracking call in the done callback of the JQuery .ajax function:
$.ajax({
url: "test.html",
dataType: "html"
})
.done(function( response ) {
Syntax
//set linkTrackVars and linkTrackEvents> (if applicable)
//set new variables
s.tl(this,'o','Link Name');
Example
s.linkTrackVars="prop1,eVar1,events"; s.linkTrackEvents="event1";
s.prop1="some value"; s.eVar1="another value"; s.events="event1";
s.tl(this,'o','My Link Name');
Placement of Code
There are generally two places to track data with AJAX: at the time of the request or in the reply. In most cases,
macro-data (page information) should be sent at the time of reply by having the code embedded in the HTML
of the new content. For micro-data tracking (links, etc.) it is more common to use a custom links approach by
inserting the code in the onClick attribute of the link, button, etc.
Click-throughs Displays the number of click-throughs tracked from the email to the landing page.
Purchases and/or Successes Displays the number of purchases resulting from the email.
199
Metric Description
Orders Displays the number of orders placed as a result of the email.
Yield Displays the dollar amount per visit generated from the email.
Conversion Displays the number of leads, registrations, or any other success event generated from
the email.
Modifications to the HTML email body and the JavaScript library are required in order to capture the key metrics
shown above.
Implementation
There are several steps to follow in order to successfully display email campaign analysis data. The steps are
described as follows:
1. Create unique tracking codes.
Often, users ask for tracking recommendations for each unique campaign. This is entirely up to them, based
on what works best. Each user is different. Adobe recommends that each user generate friendly tracking
codes, as shown in the example below:
• sc_cid=A1123A321 > "A" flags affiliate campaign
• sc_cid=EM033007 > "EM" flags email campaign
• sc_cid=GG987123 > "GG" signifies Google and is a paid search campaign
Contact Adobe Customer Care for details on setting up and using tracking codes.
2. Add query string parameters to HTML email links.
In order to track a user click-through and subsequent success events, a query string parameter needs to be
added to each link within the HTML email. You can choose to track each link separately or track all links
together. Each link can have a unique tracking code, or all links can have the same tracking code. Consider
the following hypothetical link within the email to a website:
<a href="http://www.mycompany.com/index.asp">Visit our home page</a>
The following query string parameters ?sc_cid=112233B should be added to the link above:
<a href= "http://www.mycompany.com/index.asp?sc_cid=112233B">Visit our
home page</a>
201
Privacy policy recommendations
Adobe recommends that you provide your website visitors with easy-to-find and easy-to-understand information
regarding the ability to opt out of having their browsing information collected by Adobe products or services.
Visitors can learn more about how Adobe generally uses information it collects in connection with providing
our products and services to our customers in the Adobe Privacy Center. However, because you exclusively
control how to implement our services on your web sites, it is up to you to describe to your website visitors the
specific ways in which they use our products and services. You are responsible for the creation of your own
privacy policy, for complying with your privacy policy, for complying with your service agreement with Adobe,
and for complying with all applicable laws.
Opt-outs for Adobe Analytics (including reports & analytics, data warehouse, ad hoc analysis
and SearchCenter+)
Adobe offers three types of opt-outs for Adobe Analytics (including reports & analytics, data warehouse, ad hoc
analysis and SearchCenter+):
• If you implement Adobe Analytics products with your own first-party cookie, you need to Add an Opt-Out
Link on page 202 for your website visitors.
• Adobe also provides an opt-out mechanism to the public for websites using cookies set from Adobe’s 2o7.net
and omtrdc.net domains. This opt-out mechanism can be accessed from the Adobe Privacy Center.
• Your customers have the option of enabling opt-out using the browser's cookie settings. See Enable privacy
settings for browser cookies.
Regardless of the opt-out mechanism you choose, Adobe recommends that you clearly describe the availability
of the opt-out mechanism in your privacy policy or as otherwise required by law or recommended according to
current best practices.
Implementation Plug-ins
Navigation title:Using Implementation Plug-ins
AppMeasurement for JavaScript plug-ins are programs or functions that perform several advanced functions.
203
These plug-ins extend the capabilities of your JavaScript file to give you more functionality that is not available
with a basic implementation. Adobe offers a number of other plug-ins as part of advanced solutions. Contact
your Account Manager if you want to capture data using JavaScript but are unsure how to proceed.
Code Example
The code example below is what the doPlugins function looks like in your JavaScript file:
AppMeasurement for JavaScript:
/* Plugin Config */
s.usePlugins=true
s.doPlugins=function(s) {
/* Add calls to plugins here */
}
H code:
/* Plugin Config */
s.usePlugins=true
function s_doPlugins(s) {
/* Add calls to plugins here */
}
s.doPlugins=s_doPlugins
Note: H code and earlier versions use a different syntax to support some very old browsers (such as IE
4 and 5).
Using doPlugins
The doPlugins function provides an easy way to give default values to variables or to take values from query
string parameters on any page of the site. Using doPlugins is often easier than populating the values in the
HTML page because only one file must be updated. Keep in mind that changes to the JavaScript file are not
always immediate. Return visitors to your site are often using cached versions of the JavaScript file. This means
that updates to the file may not be applied to all visitors for up to one month after the change is made.
// if campaign doesn't have a value, get cid from the query string
if(!s.campaign)
s.campaign=s.getQueryParam('cid');
Installed Plug-ins
To find out whether a plug-in is included in your JavaScript file and ready for use, look in the Plugins Section
of the JavaScript file. The following example shows the getQueryParam function.
/************************** PLUGINS SECTION *************************/
/* You may insert any plugins you wish to use here. */
/*
* Plugin: getQueryParam 1.3 - Return query string parameter values
*/
s.getQueryParam=new Function("qp","d",""
+"var s=this,v='',i,t;d=d?d:'';while(qp){i=qp.indexOf(',');i=i<0?qp.l"
//
// ... more code below ...
//
s.abort flag
The abort flag can be set inside doPlugins to cause the current track call to not be sent.
The abort flag is reset with every tracking call, so if a subsequent tracking call also needs to be aborted the flag
will need to be set again inside doPlugins.
s.doPlugins = function(s) {
s.campaign = s.getQueryParam("cid");
if ((!s.campaign) && (!s.events)) {
s.abort = true;
}
};
This lets you centralize the logic you use to identify activity that you do not want to track, such as some custom
links or external links in display ads.
appendList
The apl (or appendList) plug-in lets you append a value to any delimited lists, with the option of a case-sensitive
or case-insensitive check to ensure that the value does not already exist in the list. The APL plug-in is referenced
by several standard plug-ins but can be used directly in a variety of situations.
This plug-in is useful for:
• Adding an event to the current events variable
205
• Adding a value to a list variable without duplicating a value in the list
• Adding a product to the current products variable based on some page logic
• Adding values to the parameters linkTrackVars and linkTrackEvents
Use Case 1
Scenario Add event1 to the current events variable while ensuring the event
isn't duplicated.
s.events="scCheckout"
Code s.events=s.apl(s.events,"event1",",",1)
Results s.events="scCheckout,event1"
Use Case 2
Scenario Add the value history to the list variable prop1, with history and
History considered the same value.
s.prop1="Science,History"
Code s.prop1=s.apl(s.prop1,"history",",",2)
Results s.prop1="Science,History"
history is not added because History is already in the list.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
Implementation
Follow these steps to implement the APL plug-in.
1. Request the plug-in code from Customer Care or your currently assigned Adobe consultant.
2. Add call(s) to the API function as needed within the s_doPlugins function
Here is how the code might look on your site:
/* Plugin Config */
s.usePlugins=true
function s_doPlugins(s) {
s.events=s.apl(s.events,"event1",",",1)
s.doPlugins=s_doPlugins
Supported Browsers
This plug-in requires that the browser supports JavaScript version 1.0.
Plug-in Information
Parameters apl((L,v,d,u)
v = value to append
d = list delimiter
The source list L can be an empty list, such as L="". The returned value will either be an empty list, or a list of
one value.
Plug-in Code
/********************************************************************
*
* Main Plug-in code (should be in Plug-ins section)
*
*******************************************************************/
/*
* Plugin Utility: apl v1.1
*/
s.apl=new Function("l","v","d","u",""
+"var s=this,m=0;if(!l)l='';if(u){var i,n,a=s.split(l,d);for(i=0;i<a."
+"length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCas"
+"e()));}}if(!m)l=l?l+d+v:v;return l");
/********************************************************************
*
* Commented example of how to use this is doPlugins function
*
*******************************************************************/
/********************************************************************
*
* Config variables (should be above doPlugins section)
*
*******************************************************************/
None
/********************************************************************
*
* Utility functions that may be shared between plug-ins (name only)
*
*******************************************************************/
207
s.split
doPlugins Function
JavaScript plug-ins are usually called by the doPlugins function, which is executed when the t() function
is called in the Code to Paste.
Consequently, if you set a variable in the doPlugins function, you may overwrite a variable you set on the
HTML page. The only time the doPlugins function is not called is when the usePlugins variable is set to
false.
Code Example
The doPlugins function is typically called s_doPlugins. However, in certain circumstances (usually when
more than one version of Analytics code may appear on a single page), you can change the doPlugins function
name. If the standard doPlugins function needs to be renamed to avoid conflicts, assign doPlugins the
correct function name, as shown in the example below.
/* Plugin Config */
s_mc.usePlugins=true
function s_mc_doPlugins(s_mc) {
/* Add calls to plugins here */
}
s_mc.doPlugins=s_mc_doPlugins
Using doPlugins
This function provides an easy way to give default values to variables, or to take values from query string
parameters on any page of the site. Using doPlugins can be easier than populating the values in the HTML
page, because only one file must be updated. Changes to the JavaScript file are not always immediate. Return
visitors to your site are often using cached versions of the JavaScript file. Meaning, updates to the file may not
be applied to all visitors for up to one month after the change is made.
The following examples show how you can use the doPlugins function to set a default value for a variable
and to get a value from the query string.
/* Plugin Config */
s.usePlugins=true
function s_doPlugins(s) {
/* Add calls to plugins here */
// if prop1 doesn't have a value, set it to "Default Value"
if(!s.prop1)
s.prop1="Default Value"
// if campaign doesn't have a value, get cid from the query string
if(!s.campaign)
s.campaign=getQueryParam('cid');
}
s.doPlugins=s_doPlugins
Installed Plug-ins
To find out whether a plugin is included in your JavaScript file and ready for use, look in the Plugins Section
of the JavaScript file. The following example shows what the getQueryParam function looks like in the
Plugins Section.
/************************** PLUGINS SECTION *************************/
getAndPersistValue
The getAndPersistValue plug-in obtains a value of your choosing and populates it into a Analytics variable for
a determined period. A common use is to see how many page views a campaign generates after a click-through,
which enables you to easily see the most common pages for each campaign.
Important: This plug-in has not been validated to be compatible with About AppMeasurement for
JavaScript on page 67. See AppMeasurement Plug-in Support on page 69.
For example, you might use this plug-in to set a campaign tracking code from the campaign variable into a
Custom Traffic (s.prop) variable on each visitor's page view made for the next 30 days. This example lets you
determine how many page views the tracking code generated as a result of the original click-through.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
209
getDaysSinceLastVisit
Determines the number of days since a user last visited your site, and captures this information in a Analytics
variable.
This return frequency data can be used to answer the following questions:
• How frequently do users revisit my site?
• How does return frequency correlate with conversion? Do repeat buyers visit frequently or infrequently?
• Do users who click through my campaigns then return frequently?
The plug-in can also generate values used for segmentation. For example, you can create a segment to view all
of the data for only those visits that were preceded by 30 or more days of non-visitation by the user.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
getLoadTime
Gets the page load time in tenths of a second and lets you store the value in a prop, eVar, and/or a numeric event.
To use this plugin, you insert the function code, then call the function twice in your s_code.js file. Once at
the beginning of the file, and then again in the doPlugins section. This plugin is intentionally not defined as
a method of the s object. Doing so would have added to the calculated page load time.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
getNewRepeat
Determines whether a visitor is a new visitor or a repeat visitor, and captures this information in a Analytics
variable.
211
Use this plug-in to answer the following questions:
• What percentage of my visitors are new (as opposed to repeat) visitors?
• Do return visitors generate higher conversion per capita than new visitors? What is this ratio?
• Do my marketing campaigns cause persistence across visits? For example, do users who click through my
campaigns then return later?
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
getPageVisibility
Navigation title:getPageVisibility
Records the number of seconds your page was the active tab within the browser, and passes that value into a
metric on the next page view.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics. This plug-in is compatible only with AppMeasurement tracking libraries.
Event Definition
Total Page Visibility The amount of time the page was active within the browser
Seconds (Numeric)
Total Page Seconds The amount of time the page was loaded in the browser, regardless of its visibility state
(Numeric)
Total Page Visibility The total number of times a value was recorded for the previous two events
Instances (Counter)
Sample Calls
//Page Visibility Event List (total page visibility seconds, total page
seconds, total page visibility instances)
s.pvel='event7,event8,event9'
doPlugins Section
To initialize the plug-in, two lines of code are required in the doPlugins section of your s_code, preferably
after you have designated the s.pageName variable.
Sample Calls
/* Page Visibility */
s.eVar9 = s.getPreviousValue(s.pageName,'gpv_v9',''); //Record the previous
page name in the designated eVar of your choice
s.getPageVisibility();
213
Plug-ins Section
/* Page Visibility Plugin 0.1 (BETA) */
s.getPageVisibility=new Function("",""
+"var s=this;if(s.getVisitStart()){s.Util.cookieWrite('s_pvs','');s.U"
+"til.cookieWrite('s_tps','');}if(s.Util.cookieRead('s_pvs')&&s.pvt<1"
+"){if(parseInt(s.Util.cookieRead('s_pvs'))<=parseInt(s.Util.cookieRe"
+"ad('s_tps'))){s.pve=s.pvel.split(',');s.events=s.apl(s.events,s.pve"
+"[0]+'='+(parseInt(s.Util.cookieRead('s_pvs'))),',',2);s.Util.cookie"
+"Write('s_pvs','');s.events=s.apl(s.events,s.pve[1]+'='+(parseInt(s."
+"Util.cookieRead('s_tps'))),',',2);s.Util.cookieWrite('s_tps','');s."
+"events=s.apl(s.events,s.pve[2],',',2);}}s.pvi=setInterval(s.pvx,100"
+"0);s.wpvi=setInterval(s.wpvc,5000);");
s.gbp=new Function("",""
+"if('hidden'in document){return null;}var bp=['moz','ms','o','webkit"
+"'];for(var i=0;i<bp.length;i++){var p=bp[i]+'Hidden';if(p in docume"
+"nt){return bp[i];}}return null;");
s.hp=new Function("p",""
+"if(p){return p+'Hidden';}else{return'hidden';}");
s.vs=new Function("p",""
+"if(p){return p+'VisibilityState';}else{return'visibilityState';}");
s.ve=new Function("p",""
+"if(p){return p+'visibilitychange';}else{return'visibilitychange';}");
s.pvx=new Function("",""
+"s.pvt+=1;");
s.wpvc = function(){var tempDate = Date.now();s.Util.cookieWrite('s_tps',
Math.ceil((tempDate - s.totalTime)/1000));s.Util.cookieWrite('s_pvs', s.pvt)}
document.addEventListener('visibilitychange',function(event){if(document.hidden){s.visibility
=
false;clearTimeout(s.pvi);}else{s.visibility=true;s.pvi=setInterval(s.pvx,1000);}});s.totalTime=new
Date();s.pvt=0;s.prefix=s.gbp;s.hidden=s.hp(s.prefix);s.visibility=true;s.visibilityState=s.vs(s.prefix);s.visibilityEvent=s.ve(s.prefix);
Notes
• Always test plug-in installations to ensure that data collection is as expected before deploying in a production
environment.
• Because the plug-in passes the page visibility seconds and total seconds as they are associated with the previous
page, data is not collected for the final page view of the visit.
• This plug-in relies on the ability to set cookies in the user's web browser. If the user does not accept first-party
cookies, the plug-in will not pass data into Analytics.
• The plug-in creates its own first-party cookies named s_tps and s_pvs.
• A very small percentage of users will not pass percentage of page viewed data due to browser limitations, and
logic is contained within the plugin to ensure that the data is not skewed as a result. However, this plug-in has
been successfully tested in IE, Firefox, Chrome, and Safari.
• Due to the way the plugin measures total seconds and associates that value with the previous page name, there
will be differences between default time spent on page metrics and total seconds metrics.
• Calculated metrics can be created to aid in summarizing and understanding visitor behavior associated with
these metrics:
• Page Visibility Ratio (Total Page Visibility Seconds / Total Page Seconds)
• Total Hidden Seconds (Total Page Seconds – Total Page Visibility Seconds)
• Average Page Visibility Seconds (Total Page Visibility Seconds/Total Page Visibility Instances)
• Average Page Hidden Seconds ((Total Page Seconds - Total Page Visibility Seconds)/Total Page Visibility
Instances)
getVisitStart
Determines if a new visit is starting.
Configuration Variables
None
Parameters
c = (string) cookie name for tracking.
Returns
(integer) 1 on first page of visit, otherwise 0.
Sample Calls
s.eVar50 = s.getVisitStart("s_visit");
getPercentPageViewed
Record the portion of a page (0-100%) that the user views and pass the value into a variable on the next page
view. This plugin lets you determine how much of your content users are seeing on average, so that you can
optimize your page lengths and layouts based on user behaviors.
You can also use classifications to group percentages (such as Less than 25% or Less than 50%) so that you can
identify page-viewing trends.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
215
Plug-in Code and Implementation
Config Section: No changes required for this section.
Sample Calls
/*
* Add one of the following examples in s.doPlugins(), after s.pageName has
been assigned:
*/
//Example 2: Get entire percent page viewed array and save metrics
Plugins Section: Add the following code to the area of the s_code.js file labeled PLUGINS SECTION. Do
not make any changes to this portion of the plug-in code.
/*
* Plugin: getPercentPageViewed v1.71
*/
s.getPercentPageViewed=new Function("n",""
+"var s=this,W=window,EL=W.addEventListener,AE=W.attachEvent,E=['load"
+"','unload','scroll','resize','zoom','keyup','mouseup','touchend','o"
+"rientationchange','pan'];W.s_Obj=s;s_PPVid=(n=='-'?s.pageName:n)||s"
+".pageName||location.href;if(!W.s_PPVevent){s.s_PPVg=function(n,r){v"
+"ar k='s_ppv',p=k+'l',c=s.c_r(n||r?k:p),a=c.indexOf(',')>-1?c.split("
+"',',10):[''],l=a.length,i;a[0]=unescape(a[0]);r=r||(n&&n!=a[0])||0;"
+"a.length=10;if(typeof a[0]!='string')a[0]='';for(i=1;i<10;i++)a[i]="
+"!r&&i<l?parseInt(a[i])||0:0;if(l<10||typeof a[9]!='string')a[9]='';"
+"if(r){s.c_w(p,c);s.c_w(k,'?')}return a};W.s_PPVevent=function(e){va"
+"r W=window,D=document,B=D.body,E=D.documentElement,S=window.screen|"
+"|0,Ho='offsetHeight',Hs='scrollHeight',Ts='scrollTop',Wc='clientWid"
+"th',Hc='clientHeight',C=100,M=Math,J='object',N='number',s=W.s_Obj|"
+"|W.s||0;e=e&&typeof e==J?e.type||'':'';if(!e.indexOf('on'))e=e.subs"
+"tring(2);s_PPVi=W.s_PPVi||0;if(W.s_PPVt&&!e){clearTimeout(s_PPVt);s"
+"_PPVt=0;if(s_PPVi<2)s_PPVi++}if(typeof s==J){var h=M.max(B[Hs]||E[H"
+"s],B[Ho]||E[Ho],B[Hc]||E[Hc]),X=W.innerWidth||E[Wc]||B[Wc]||0,Y=W.i"
+"nnerHeight||E[Hc]||B[Hc]||0,x=S?S.width:0,y=S?S.height:0,r=M.round("
+"C*(W.devicePixelRatio||1))/C,b=(D.pageYOffset||E[Ts]||B[Ts]||0)+Y,p"
+"=h>0&&b>0?M.round(C*b/h):0,O=W.orientation,o=!isNaN(O)?M.abs(o)%180"
+":Y>X?0:90,L=e=='load'||s_PPVi<1,a=s.s_PPVg(s_PPVid,L),V=function(i,"
+"v,f,n){i=parseInt(typeof a==J&&a.length>i?a[i]:'0')||0;v=typeof v!="
+"N?i:v;v=f||v>i?v:i;return n?v:v>C?C:v<0?0:v};if(new RegExp('(iPod|i"
+"Pad|iPhone)').exec(navigator.userAgent||'')&&o){o=x;x=y;y=o}o=o?'P'"
+":'L';a[9]=L?'':a[9].substring(0,1);s.c_w('s_ppv',escape(W.s_PPVid)+"
+"','+V(1,p,L)+','+(L||!V(2)?p:V(2))+','+V(3,b,L,1)+','+X+','+Y+','+x"
+"+','+y+','+r+','+a[9]+(a[9]==o?'':o))}if(!W.s_PPVt&&e!='unload')W.s"
+"_PPVt=setTimeout(W.s_PPVevent,333)};for(var f=W.s_PPVevent,i=0;i<E."
+"length;i++)if(EL)EL(E[i],f,false);else if(AE)AE('on'+E[i],f);f()};v"
+"ar a=s.s_PPVg();return!n||n=='-'?a[1]:a");
Notes
• Always test plug-in installations to ensure that data collection is as expected before deploying in a production
environment.
• Because the plug-in passes the percentage of page viewed on the previous page, data is not collected for the
final page view of the visit. One way around this is to use a function on all exit links to call
s.getPercentPageViewed().
• This plug-in relies on the ability to set cookies in the user's web browser. If the user does not accept first-party
cookies, the plug-in will not pass data into Analytics.
• The plug-in creates its own first-party cookie named s_ppv.
217
• A very small percentage of users will not pass percentage of page viewed data due to browser limitations.
However, this plug-in has been successfully tested in IE, Firefox, Chrome, Safari, and Opera.
getPreviousValue
Captures the value of a Analytics variable on the next page view. For example, you can use plug-in to capture
the s.pageName value from the previous page view into a Custom Traffic variable. It also has an option to capture
a previous value only when designated success events are set.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
getQueryParam
Returns the value of a specified query string parameter, if found in the current page URL. Because important
data (such as campaign tracking codes, internal search keywords, etc.) is available in the query string on a page,
getQueryParam is helps capture the data into Analytics variables.
Important: This plug-in is used by H code only. About AppMeasurement for JavaScript on page 67
provides this functionality natively using Util.getQueryParam on page 184.
Once installed in your AppMeasurement for JavaScript code, the plug-in is configured by selecting a Analytics
variable to populate using data found in the query string, and specifying which query string values to capture.
The plug-in detects the specified query string, if present, and populates the chosen variable with its value. If no
query string parameter is found with that value, an empty string is returned. If a query string parameter exists
but does not have a value (such as param1 in ?param1¶m2=value), the word true is returned.
Note: The base code for the plug-in must be installed in your AppMeasurement for JavaScript code before
the examples below will work.
If you wanted to use s.campaign to capture campaign tracking codes available as values of the cid query parameter,
you would enter the following in the doPlugins() function in your AppMeasurement for JavaScript code:
s.campaign=s.getQueryParam('cid')
In this example, if the user arrived at a landing page on your site where the URL was
http://www.yoursite.com/index.html?cid=123456, then s.campaign would receive a value of
123456. This could be seen using the DigitalPulse Debugger, which should show v0=123456 as part of the image
request.
Note: The parameter cid and others are used here as examples. You can replace them with any query
string parameters that exist on your site.
The getQueryParam plug-in has two additional arguments (options) that can be used to capture data into Analytics
variables:
s.getQueryParam('p','d','u')
where:
p = comma-separated list of query parameters to locate (can also be a single
value with no comma)
d = delimiter for list of values (in case more than one specified parameter
is found)
u = where to search for value (e.g., document.referrer); set to current
page URL by default
If p is a list of query string parameters and more than one query string parameter is found in the URL, all values
are returned in a list separated by the delimiter, d, which can be a single character or a string of characters, such
219
as " : " (space-colon-space). If d is omitted, no delimiter is used between values. If one query string parameter
should take precedence over another, when both are found, use an if statement as shown below.
// cid takes precedence over iid if both exist in the query string
s.campaign=s.getQueryParam('cid');
if(!s.campaign)
s.campaign=s.getQueryParam('iid');
As of version getQueryParam v2.0, the plug-in accepts an optional third argument, u, which allows you to
specify the URL from which you would like to extract query string parameters. By default (i.e. if this third
argument is omitted or left blank), the plug-in uses the page URL. For example, if you would like extract a query
string from the referrer, you can use the following code:
// take the query string from the referrer
s.eVar1=s.getQueryParam('pid','',document.referrer);
The flag "f" should be used in this third argument with frames, when the necessary query string parameter is
found in the address bar rather than the current frame's URL:
// take the query string from the parent frame
s.eVar1=s.getQueryParam('pid','',f);
When using frames and the f parameter, it is recommended that the getValOnce plug-in be used to prevent the
campaign tracking code to be sent with each page view.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
Plug-in Code
/********************************************************************
*
* Main Plug-in code (should be in Plug-ins section)
*
*******************************************************************/
/*
* Plugin: getQueryParam 2.3
*/
s.getQueryParam=new Function("p","d","u",""
+"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati"
+"on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p"
+".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-"
+"1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i="
+"=p.length?i:i+1)}return v");
s.p_gpv=new Function("k","u",""
+"var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v"
+"=s.pt(q,'&','p_gvf',k)}return v");
s.p_gvf=new Function("t","k",""
+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"
+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."
+"epa(v)}return ''");
/********************************************************************
*
* Commented example of how to use this is doPlugins function
*
*******************************************************************/
/* Plugin Example: getQueryParam 2.3
//single parameter
s.campaign=s.getQueryParam('cid');
*/
/********************************************************************
*
* Config variables (should be above doPlugins section)
*
*******************************************************************/
None
/********************************************************************
*
* Utility functions that may be shared between plug-ins (name only)
*
*******************************************************************/
None
getTimeParting
The getTimeParting plug-in populates custom variables with hour of day, day of week, and weekend and weekday
values into custom variables. Analysis Workspace offers out-of-the-box Time Parting dimensions. The plug-in
should be used if time parting dimensions are needed in other Analytics solutions, outside of Analysis Workspace.
This plug-in captures the date and time information available in the user's web browser. It obtains the hour of
the day and the day of the week from this information. It then converts this data to the time zone of your choosing.
It also accounts for Daylight Savings Time.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
Plug-in Code
Config Section
Place the following code in the area of the s_code.js file labeled CONFIG SECTION, and make the necessary
updates as described below.
s._tpDST - an array of DST values. The array is structured in the following format: YYYY:'MM/DD,MM/DD'
//time parting configuration
//Australia
s._tpDST = {
2012:'4/1,10/7',
2013:'4/7,10/6',
2014:'4/6,10/5',
2015:'4/5,10/4',
2016:'4/3,10/2',
2017:'4/2,10/1',
2018:'4/1,10/7',
221
2019:'4/7,10/6'}
//US
s._tpDST = {
2012:'3/11,11/4',
2013:'3/10,11/3',
2014:'3/9,11/2',
2015:'3/8,11/1',
2016:'3/13,11/6',
2017:'3/12,11/5',
2018:'3/11,11/4',
2019:'3/10,11/3'}
//Europe
s._tpDST = {
2012:'3/25,10/28',
2013:'3/31,10/27',
2014:'3/30,10/26',
2015:'3/29,10/25',
2016:'3/27,10/30',
2017:'3/26,10/29',
2018:'3/25,10/28',
2019:'3/31,10/27'}
Note for Northern Hemisphere clients: in the array DST values are DST start, DST end.
Note for Southern Hemisphere clients: in the array DST values are DST end, DST start.
Parameters
var tp = s.getTimeParting(h,z);
• h = (required) Hemisphere - Specify what hemisphere you are converting the time to. This is a value of 'n' or
's'. This is used to determine how to use the DST array passed. If 'n' is passed the plugin uses the dates when
DST is on. If 's' is passed the plugin uses the dates when DST is off.
• z = (optional) Time Zone - If you would like the data to be based upon a specific time period, then that will
need to be specified as the hours different from GMT here. Note this should be the GMT during non DST. If
no value is specified, it defaults to GMT (i.e. '-5' for US Eastern Time)
Returns
Returns a concatenated value of time at minute level and day of week, for example:
8:03 AM|Monday
You can then use Classifications to group visits into time periods. For example, you could set up a rule in
Classification Rule Builder to bucket visits between 9:00 AM and 9:59 AM to "9:00 AM - 10:00 AM". As an
alternative to classifications, you could provide additional client-side logic to bucket visits in JavaScript.
Example Call
var tp = s.getTimeParting('n','-7');
s.prop1 = tp;
PLUGINS SECTION
Add the following code to the PLUGINS SECTION in the s_code.js file.
/*
* Plugin: getTimeParting 3.4
*/
s.getTimeParting=new Function("h","z",""
+"var s=this,od;od=new Date('1/1/2000');if(od.getDay()!=6||od.getMont"
getValOnce
The getValOnce plug-in prevents a given variable from being set to the previously defined value. It uses a cookie
to determine a variable's last seen value. If the current value matches the cookie value, the variable is overwritten
with a blank string before it is sent to Adobe's processing servers. This plug-in is useful to prevent conversion
variable instance inflation caused when users refresh the page or click the Back button.
Important: This plug-in has not been validated to be compatible with About AppMeasurement for
JavaScript on page 67. See AppMeasurement Plug-in Support on page 69.
Parameters
s.eVar1=s.getValOnce(variable,cookie,expiration,minute);
• Variable: The variable that will be checked. This is typically the same as the variable being defined.
• Cookie: The name of the cookie that stores the previous value to compare against. The cookie can be any value.
• (Optional) Expiration: The number of days the cookie will expire. If not set or set to 0, the default expiration
is the browser session.
• (Optional) Minute: If you set this to the string value m, the expiration value is defined in minutes instead of
days. If not set, days is the default expiration.
Properties
• This plug-in is commonly used on conversion variables. However, you can use it on any Analytics variable.
• When Javascript encounters this function, it compares the defined value to what is stored in the cookie. If the
defined value is different from the cookie value, the defined value is set. If the defined value is the same as the
cookie value, an empty string is returned.
• The cookie can only store a single value, meaning the plug-in only looks as the last defined value.
• The plug-in does not stop all values from defining the variable after it is defined. The plug-in only prevents
the last value from being set multiple times consecutively.
• If the end user blocks or rejects cookies, the original value is always returned.
• The plug-in's session is different from what Analytics defines as a session (or visit). Analytics terminates a
session after 12 hours of activity or 30 minutes of inactivity. Because the plug-in uses the browser's session
definition, it is terminated only after the user closes the tab or exits the browser.
• If a user closes your page, opens a different tab and navigates back to your site within 30 minutes, the plug-in
creates a new session while keeping the Analytics visit open.
• If a user keeps the browser window open without clicking on a link for more than 30 minutes, the Analytics
visit expires while keeping the browser session open.
223
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
Implementation
Note: If your organization uses Marketing Channels and has rules set up based on s.campaign, it is
recommended that you not use the getValOnce plugin when setting the s.campaign value. Doing so
could lead to an incorrect channel being assigned on a secondary campaign click-through.
To implement this plug-in, place the following code within your s_code.js file
/********************************************************************
*
* Main Plug-in code (should be in Plug-ins section)
*
*******************************************************************/
/*
* Plugin: getValOnce_v1.11
*/
s.getValOnce=new Function("v","c","e","t",""
+"var s=this,a=new Date,v=v?v:'',c=c?c:'s_gvo',e=e?e:0,i=t=='m'?6000"
+"0:86400000,k=s.c_r(c);if(v){a.setTime(a.getTime()+e*i);s.c_w(c,v,e"
+"==0?0:a);}return v==k?'':v");
Once the above code is implemented, define the desired variable using the getValOnce function. The following
are several examples on how it can be implemented:
Preventing the same campaign value from being defined if a duplicate value is detected within 30 days of
cookie being set:
s.campaign=s.getValOnce(s.campaign,'s_cmp',30);
Prevents the same eVar1 value from being defined if a duplicate value is detected within 30 minutes of
the cookie being set:
s.eVar1=s.getValOnce(s.eVar1,'s_ev1',30,'m');
Prevents the same eVar2 value from being defined multiple times in the same browser session:
s.eVar2=s.getValOnce(s.eVar2,'s_ev2');
Notes
• Always test plug-in installations extensively to ensure that data collection is as expected before deploying in
a production environment.
• Make sure you delete the cookie or use new, unique values during testing or variables will not be sent.
getVisitNum
The getVisitNum plug-in determines how many visits a user has made to your site and captures this number in
a Analytics variable.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should only be done by a developer with experience using and implementing
Analytics.
PLUGINS SECTION: Add the following code to the area of the s_code.js file labeled PLUGINS SECTION.
Do not make any changes to this portion of the plug-in code.
/*
* Plugin: getVisitNum - version 3.0
*/
s.getVisitNum=new Function("tp","c","c2",""
+"var s=this,e=new Date,cval,cvisit,ct=e.getTime(),d;if(!tp){tp='m';}"
+"if(tp=='m'||tp=='w'||tp=='d'){eo=s.endof(tp),y=eo.getTime();e.setTi"
+"me(y);}else {d=tp*86400000;e.setTime(ct+d);}if(!c){c='s_vnum';}if(!"
+"c2){c2='s_invisit';}cval=s.c_r(c);if(cval){var i=cval.indexOf('&vn="
+"'),str=cval.substring(i+4,cval.length),k;}cvisit=s.c_r(c2);if(cvisi"
+"t){if(str){e.setTime(ct+1800000);s.c_w(c2,'true',e);return str;}els"
+"e {return 'unknown visit number';}}else {if(str){str++;k=cval.substri"
+"ng(0,i);e.setTime(k);s.c_w(c,k+'&vn='+str,e);e.setTime(ct+1800000);"
+"s.c_w(c2,'true',e);return str;}else {s.c_w(c,e.getTime()+'&vn=1',e)"
+";e.setTime(ct+1800000);s.c_w(c2,'true',e);return 1;}}");
s.dimo=new Function("m","y",""
+"var d=new Date(y,m+1,0);return d.getDate();");
s.endof=new Function("x",""
+"var t=new Date;t.setHours(0);t.setMinutes(0);t.setSeconds(0);if(x=="
+"'m'){d=s.dimo(t.getMonth(),t.getFullYear())-t.getDate()+1;}else if("
+"x=='w'){d=7-t.getDay();}else {d=1;}t.setDate(t.getDate()+d);return "
+"t;");
Parameters
• tp = (string, optional) Tracking period. use "d" for day, "w" for week, "m" for month, or a number for a custom
number of days.
• If day, week, or month is selected then the visit number will reset at the end of the day/week/month.
• If a custom number of days is selected then the visit number will reset after that number of days.
• If no value is provided then "m" will be used.
• c = (string, optional) Specify the persistent cookie name. Default is 's_vnum'.
• c2 = (string, optional) Specify the session cookie name. Default is 's_invisit'
Returns
• returns the visit number (1,2,3,etc) of the visit. This number is incremented only on the first page of each visit.
• returns "unknown visit number" if the plug-in is unable to identify the visit number (cookies are blocked).
Examples
s.prop1=s.getVisitNum(365); //custom length, 365 days. Default cookie names
s.prop1=s.getVisitNum('w'); //resets weekly
s.prop1=s.getVisitNum('m','s_vmonthnum','s_monthinvisit'); //resets montly,
custom cookie names
s.prop1=s.getVisitNum('d'); //resets daily
Notes
225
• Always test plug-in installations extensively to ensure that data collection is as expected before deploying in
a production environment.
• This plug-in relies on the ability to set cookies in the user's web browser. If the user does not accept cookies,
all visits will appear to be first visits.
performanceTiming
This plug-in operates by using the Navigation Timing JavaScript API for accurately measuring performance on
the web. This provides a native method to get accurate and detailed timing statistics for page load events & asset
load times. Previously, measurements of this sort have either utilized the JavaScript Date object for timing
metrics, or a rudimentary extrapolation of the Navigation Timing metrics. Both methodologies, even though
they provide some trended data for page load times, are unreliable.
Important: This is a beta version of the plugin, and additional updates may be forthcoming.
This plug-in utilizes the following detailed events to track the individual timing components of a page load:
The following graph illustrates the timing attributes defined by the PerformanceTiming interface and the
PerformanceNavigation interface with or without redirect, respectively.
Note: The following instructions require you to alter the data collection code on your site. This can affect
data collection on your site, and should be done only by a developer with experience using and implementing
Adobe Analytics. This plugin is compatible only with AppMeasurement tracking libraries.
227
--][- 10 -]
s.ptc = false;
doPlugins Section:
To initialize the plug-in, one line of code is required in the doPlugins section of your s_code, preferably after
you have designated the s.pageName variable. If you wish to utilize the asset load time functionality within
the plug-in, you must pass in the name of the list variable to be used. Otherwise, only the performance timing
entries will be tracked in the events you previously specified in the s.pte variable.
Note: In order to correlate performance timing entries with pages on your site, you must also initialize
the getPreviousValue plug-in. We recommend comparing these performance entries with either the
previous page name or the previous page URL value.
Sample Calls
/* Performance Timing */
s.eVar9 = s.getPreviousValue(s.pageName,'gpv_v9',''); //Record the previous
page name in the designated eVar of your choice
s.performanceTiming('list2')
Plugins Section:
Lastly, add the plug-in itself to your JavaScript implementation.
/* Plugin: Performance Timing Tracking - 0.11 BETA */
s.performanceTiming=new Function("v",""
+"var s=this;if(v)s.ptv=v;if(typeof performance!='undefined'){if(perf"
+"ormance.timing.loadEventEnd==0){s.pi=setInterval(function(){s.perfo"
+"rmanceWrite()},250);}if(!s.ptc||s.linkType=='e'){s.performanceRead("
+");}else{s.rfe();s[s.ptv]='';}}");
s.performanceWrite=new Function("",""
+"var s=this;if(performance.timing.loadEventEnd>0)clearInterval(s.pi)"
+";try{if(s.c_r('s_ptc')==''&&performance.timing.loadEventEnd>0){try{"
+"var pt=performance.timing;var pta='';pta=s.performanceCheck(pt.fetc"
+"hStart,pt.navigationStart);pta+='^^'+s.performanceCheck(pt.domainLo"
+"okupStart,pt.fetchStart);pta+='^^'+s.performanceCheck(pt.domainLook"
+"upEnd,pt.domainLookupStart);pta+='^^'+s.performanceCheck(pt.connect"
+"End,pt.connectStart);pta+='^^'+s.performanceCheck(pt.responseStart,"
+"pt.connectEnd);pta+='^^'+s.performanceCheck(pt.responseEnd,pt.respo"
+"nseStart);pta+='^^'+s.performanceCheck(pt.loadEventStart,pt.domLoad"
+"ing);pta+='^^'+s.performanceCheck(pt.loadEventEnd,pt.loadEventStart"
+");pta+='^^'+s.performanceCheck(pt.loadEventEnd,pt.navigationStart);"
+"s.c_w('s_ptc',pta);if(sessionStorage&&navigator.cookieEnabled&&s.pt"
+"v!='undefined'){var pe=performance.getEntries();var tempPe='';for(v"
+"ar i=0;i<pe.length;i++){tempPe+='!';tempPe+=pe[i].name.indexOf('?')"
+">-1?pe[i].name.split('?')[0]:pe[i].name;tempPe+='|'+(Math.round(pe["
+"i].startTime)/1000).toFixed(1)+'|'+(Math.round(pe[i].duration)/1000"
+").toFixed(1)+'|'+pe[i].initiatorType;}sessionStorage.setItem('s_pec"
+"',tempPe);}}catch(err){return;}}}catch(err){return;}");
s.performanceCheck=new Function("a","b",""
+"if(a>=0&&b>=0){if((a-b)<60000&&((a-b)>=0)){return((a-b)/1000).toFix"
+"ed(2);}else{return 600;}}");
s.performanceRead=new Function("",""
+"var s=this;if(performance.timing.loadEventEnd>0)clearInterval(s.pi)"
+";var cv=s.c_r('s_ptc');if(s.pte){var ela=s.pte.split(',');}if(cv!='"
+"'){var cva=s.split(cv,'^^');if(cva[1]!=''){for(var x=0;x<(ela.lengt"
+"h-1);x++){s.events=s.apl(s.events,ela[x]+'='+cva[x],',',2);}}s.even"
+"ts=s.apl(s.events,ela[ela.length-1],',',2);}s.linkTrackEvents=s.apl"
+"(s.linkTrackEvents,s.pte,',',2);s.c_w('s_ptc','',0);if(sessionStora"
+"ge&&navigator.cookieEnabled&&s.ptv!='undefined'){s[s.ptv]=sessionSt"
Notes
• Always test plug-in installations to ensure that data collection is as expected before deploying in a production
environment.
• Because the plug-in passes the performance data as they are associated with the previous page, data is not
collected for the final page view of the visit.
• If you are tracking asset timing, this plug-in relies on the ability to set DOM storage values in the user's web
browser. If the user does not accept cookies and have DOM storage enabled, the plug-in will not pass data into
Analytics.
• A very small percentage of users will not pass navigation timing data due to browser limitations, and logic is
contained within the plugin to ensure that the data is not skewed as a result – particularly with a small portion
of mobile browsers. However, this plug-in has been successfully tested in IE, Firefox, Chrome, and Safari.
• Calculated metrics should be created to aid in summarizing and understanding visitor behavior associated with
these metrics:
• Average Redirect Timing (Redirect Timing/Performance Timing Instances)
• Average App Cache Timing (App Cache Timing/Performance Timing Instances)
• Average DNS Timing (DNS Timing/Performance Timing Instances)
• Average TCP Timing (TCP Timing/Performance Timing Instances)
• Average Request Timing (Request Timing/Performance Timing Instances)
• Average Response Timing (Response Timing/Performance Timing Instances)
• Average Processing Timing (Processing Timing/Performance Timing Instances)
• Average onLoad Timing (onLoad Timing/Performance Timing Instances)
• Average Page Load Timing (Total Page Load Time/Performance Timing Instances)
trackTNT
Collects the information for the Target to Analytics integration. This plug-in is replaced by the Adobe Analytics
and Adobe target integration.
See Adobe Analytics and Adobe Target integration.
Pathing
Pathing is defined as the path that users take through your site.
229
For example, a visitor went to page A, then page B, then page C. Pathing is one of the very powerful features
of Analytics. The tremendous insight it brings is critical to businesses looking to understand visitor traffic patterns.
Out-of-the-box Analytics provides pathing at the page level. The basic idea behind pathing is you are shown the
order of pages that users saw during their visits. This data is presented in several different reports that format
the data in different ways, depending on what you are trying to see.
Note: To enable pathing, go to Admin > Report Suites > Edit Settings > Traffic > Traffic Variables.
To enable pathing on the Site Section and Server reports, contact Customer Care.
Note: To enable pathing, go to Admin > Report Suites > Edit Settings > Traffic > Traffic Variables.
To enable pathing on the Site Section and Server reports, contact Customer Care.
231
If the user is a registered user and visited the home page, the value in the prop displays as follows:
“Registered : Home Page”
If they click to another page named "Page 2", the value on that page displays as follows:
“Registered : Page 2”
With Pathing turned on, you see those two values in succession. If you want to know how registered users move
from the home page, find the value "Registered : Home Page" in one of the path reports and see the next pages
they visited. In this case, they next went to "Page 2."
Purchase Events
Navigation title:Purchase Events
For the purchase event, Analytics variables are used to capture specific purchase information. The s.purchaseID
variable is used to serialize (de-duplicate) the event.
The purchaseID is limited to 20 characters. The purchaseID variable serializes all events passed in the variable
s.events, and overrides any serialization value for events. If purchaseID is left blank, each instance of the purchase
event, even page reloads, is counted.
If a purchase event is called without a purchaseID, a unique one is automatically generated based on the s.products
and s.events variables. This automatically generated purchaseID is stored locally as a cookie value within the
visitor's browser, and is not sent to any report suite tables. Manually defined purchaseIDs on the other hand are
sent to a back-end table within the report suite. The last five purchases made by a visitor (with or without
purchaseID) are stored in the local cookie.
When a visitor makes any purchase, the following checks are made:
• Does the purchaseID match any of the five cookie values? If so, the image request is considered a duplicate
purchase. All conversion variables, including the purchase event, do not appear in reporting.
• If purchaseID is defined, does it match any value in the report suite's back-end table? If so, the image request
is considered a duplicate purchase. All conversion variables, including the purchase event, do not appear in
reporting.
• If the purchaseID is unique to both the last 5 stored values in the cookie and the report suite's purchaseID table,
the image request is unique and included in reporting. For example, if five purchases are already included in
the local cookie, the oldest one is overwritten.
Specific server-side code can be used to generate the unique number (alphanumeric value) embedded in the
HTML source. Usually the Order ID, or similar alphanumeric value, is used for this purpose. This value should
not change if the user refreshes the page. The following is a short example (note the purchaseID code in bold):
Syntax
s.products="Category;ProductName;Qty;total_price
[,Category2;ProductName2;Qty;total_price]"
s.state="XX"
s.zip="00000"
s.purchaseID="<%=getPurchaseID()%>"
s.events="purchase"
Examples
s.products="Footwear;Hiking Boots (1234);1;170.00"
s.state="UT"
s.zip="84097"
Additional Notes
• Be sure to use server-side code to generate the unique identifier for the event. Do not use a JavaScript
randomization function to generate a number, which generates unique numbers each time the page is loaded
(each instance/pageview counts).
• The unique identifiers are applicable to all users across all sessions. Therefore, ensure the identifier is unique
across users and sessions. For instance, if the Order ID repeats after 30 days, append the date of the order to
make the Order ID sufficiently unique.
• The serialization value may be alphanumeric values up to 20 characters in length. This is identical to the
limitations of s.purchaseID (replace s. with s_ for G Code).
• The s.purchaseID variable serializes all events passed in the variable s.events, and overrides any serialization
value for events. Do not use Event serialization for any events if the s.purchaseID variable is used on the
current page (replace s. with s_ for G Code).
Event Serialization
Event serialization is the process of implementing measures to prevent duplicate events from entering Analytics
reporting. This can commonly occur when a user refreshes the page multiple times, navigates to a certain page
multiple times, or saves the web page to their computer (for example, if a customer saves a purchase confirmation
page to their computer, every time they view it orders and revenue would be counted again if event serialization
was not in place).
Event serialization is useful in the following instances:
• A page may be reloaded or refreshed and repeatedly send an event. Event serialization prevents events from
being recounted by using a serial number for each event.
• The user saves the page to his/her machine for later review. This scenario is quite common on purchase
confirmation pages to review purchase receipts. Event serialization prevents the subsequent page reloads from
re-counting the events.
This document describes the process used to implement Event serialization for conversion and custom events.
To use Event serialization, you must first enable it in Admin > Report Suite > [select report suite] > Edit
Settings > Success Events. Then select which events you want recorded in the Unique Event Recording column.
Default Behavior
The default behavior is to count each instance of an event. An event is set for each pageviewthat is counted,
even on page reloads or page refreshes. The s.purchaseID variable is used in order to uniquely identify each
order (purchase). This allows a user to reload the order page without recounting the order, revenue, or products.
A similar feature is available for all events. This includes pre-defined events such as prodView and scCheckout,
as well as all custom events.
233
To use Event serialization, you must first enable it in Admin > Report Suite > [select report suite] > Edit
Settings > Success Events. Then select which events you want recorded in the Unique Event Recording column.
There are three different settings an event can be set to.
Always record event: This is the default behavior of all events when initially enabled. All events included in
image requests will be sent directly to Analytics, including page reloads.
Record once per visit: An event with this setting enabled will only track the first instance of that event in a
given visit. Once a new visit starts, each event with this setting enabled can be tracked again. This is an effective
way to mitigate duplicate events via browser refreshes.
Use event ID: This setting allows the capability to associate each event with a unique ID. If Analytics sees an
eventID it has already seen before with that variable, it will not be counted in reporting.
The only event that cannot have event serialization enabled is the purchase event, as this uses the s.purchaseID
variable. All other eCommerce events and custom events can have these settings enabled.
• Use a unique identifier to let an event fire once per unique ID.
• Send multiple events, then use configure Analytics to let an event fire once per visit.
To implement Event serialization, provide a unique ID for the event, for example event1:1234ABCD.
John User reloads the page (a form submit may fail, and event1:1000 1
cause the page to reload).
Stacy User reloads the page (a form submit may fail, and event1:1001 2
cause the page to reload).
Jill User views page for the first time, enters information event1:1002 3
correctly, and moves on to next page.
Jamie User forgets to fill in the last name field on the form. event1 5
The form is displayed again with the missing
information highlighted.
s.events Syntax
Use the following syntax for serializing events. In the first example, event1 is serialized, while event2 is not
serialized (an instance is counted for each pageview or page reload).
s.events="[event]:[serial number]"
Samples:
s.events="event1:12341234"
s.events="event1:12341234,event2"
s.events="purchase,event1:12341234"
235
Analytics Visitor ID Order
Adobe Analytics provides several mechanisms to identify visitors. The following table lists the different ways
a visitor can be identified in Analytics (in order of preference):
Analytics Visitor ID on page 237 Visitor had an existing s_vi cookie before you deployed the Visitor ID
service, or you have a visitor ID grace period configured.
mid (AMCV_ cookie set by Marketing Cloud Visitor Visitor's browser accepts cookies (first-party)
ID service)
IP Address, User Agent, Gateway IP Address on page Visitor's browser does not accept cookies.
237
In many scenarios you might see 2 or 3 different IDs on a call, but Analytics will use the first ID present from
the previous table as the official visitor ID. For example, if you are setting a custom visitor ID (included in the
"vid" query parameter), that ID will be used before other IDs that might be present on that same hit.
Note: Each Analytics visitor ID is associated with a visitor profile on Adobe servers. Visitor profiles are
deleted after at least 13 months of inactivity regardless of any visitor ID cookie expiration.
Custom Visitor ID
You can implement a custom method to identify visitors by setting the s.visitorID variable.
A custom Visitor ID can be used on sites where you have unique way to identify visitors. An example of this is
an ID generated when a user logs in to web site using a user name and password.
Should you have the ability to derive and manage the visitor IDs of your users, you can use the following methods
to set the ID:
Method Description
visitorID on page 163 If JavaScript is used on the browser, or if you are using any other AppMeasurement library, you can set the
variable visitor ID in a data collection variable.
Query string parameter on This lets you pass the visitor ID to Adobe via the vid query string parameter on a hard-coded image request.
the image request
Data Insertion API On devices using wireless protocols that don't accept JavaScript, you can send an XML post containing the
<visitorid/> XML element to Adobe collection servers from your servers.
URL re-writing and Some deployment architectures provide support for using URL re-writing to maintain session state when a
VISTA cookie cannot be set. In such cases, Adobe engineering services can implement a VISTA rule that would look
for the session value in the URL of the page, then format and place into the visid values.
Fallback ID Methods
If other visitor ID methods fail, Adobe sets a fallback cookie or uses a combination of IP address and user agent
to identify the visitor.
237
Identifying Mobile Devices
Most mobile devices accept browser cookies. However, in cases when devices do not accept cookies, another
method is used to uniquely identify wireless devices.
Adobe has identified a number of HTTP Subscriber ID Headers on page 238 that uniquely identify a majority
of mobile devices. Those headers often include the device phone number (or a hashed version of the number),
or other identifiers. The majority of current devices have one or more of the headers that uniquely identify the
device, and all Adobe data collection servers automatically use those headers in place of a Visitor ID.
In a typical image request, a '1' in the path (/b/ss/rsid/1) causes Adobe servers to return a gif image and
to attempt to set a persistent visitor ID cookie (AMCV_ or s_vi). However, if the device is recognized as a
mobile device based on the HTTP headers, a '5' is passed in place of the '1', which indicates that a wbmp format
image should be returned and that our list of recognized wireless headers (not a cookie) should be used to identify
the device.
The following table lists out the order of the ID methods used based on the return image type value ('1' or '5') in
the path:
Setting ID method order
/1/ Default:
• Custom visitor ID
• Cookie
• Subscriber ID Header
• IP Address-UserAgent-Gateway IP Address
/5/ /5.1/ Device was identified as a wireless device, or /5/ was manually sent in the image request:
/5.5/
• Custom visitor ID
• Subscriber ID Header
• Cookie
• IP Address-User Agent-Gateway IP Address
You can also pass a '1' or a '5' in manual image requests, but be aware that these codes are mutually-exclusive,
therefore always passing '5' does not leverage a cookie when it is supported. You can incorporate your own
mechanism to determine if a device supports cookies, and if so, pass a '1' in the image rather than a '5'. The
accuracy improvement in this situation is limited to the number of mobile devices supporting cookies.
Subscriber ID Headers
The subscriber ID method is generally more reliable than a cookie for user identification because of cookie
deletion, cookie acceptance issues, and gateway cookie management issues.
You can improve changes of identifying a visitor by being added to the white list for the carrier that your mobile
visitors use. To get access to the carrier's visitor ID, contact the carrier to add your domain to their white list. If
you are on a carrier's white list, you also have access to subscriber ID headers that you may not otherwise be
able to access.
The following list of headers is used to identify wireless devices. The algorithm for processing the headers is to
1. extract the HTTP header key (the name of the header, such as,"X-Up-Calling-Line-ID")
2. trim out all non alpha (A-Z and a-z) characters
3. convert the header key to lowercase
4. compare the end of the key to the ones in the following table to find a match:
For example "callinglineid" would match "X-Up-Calling-Line-ID" and "nokia-callinglineid." The header type
tells us what to expect in the header. The order of header priority is listed here (if a "callinglineid" header is
present it is used instead of "subno").
You can use Dynamic Variables on page 127 to extract specific values from a header.
239
in a cookie on each device are already associated with the same visitor profile. We recommend populating the
s.visitorID variable whenever possible in case the visitor ID cookie is deleted.
Visitor ID cookie ID generated automatically on the first visit from a device or browser and stored in the s_vi
cookie.
Visitor ID variable Optional visitor ID that is set using the s.visitorID variable. This value is populated
after a user authenticates and might match an ID that your company uses to track a user across
multiple digital marketing channels.
Effective Visitor ID The effective visitor ID is the actual ID for the user profile. This value is set to the visitor ID
cookie, or to the visitor ID variable if one is provided.
Example Visit
Example containing a sample of server calls sent in a common customer interaction.
Server Call Action Visitor ID Visitor ID Effective Visit Page Visit Number
Cookie Variable Visitor ID Number
1 A visitor clicks a 1 - 1 1 8
link in a
marketing email
and visits your
site from home
computer. This
visitor has visited
your site 7 other
times in the past.
Visitors
Analytics counts each unique effective visitor ID as a unique visitor.
241
If you look at the Example Visit on page 241, this occurred 3 times: at hits 1, 9, and 10. This occurs because the
effective visitor ID is the same for both server calls, and occurs even though the visits might be several hours
apart and on different devices.
This can increase the number of unique visitors you see when cross-device visitor identification is enabled. The
visitor might be counted twice on the same visit: once for the initial visit and again after the user is authenticated.
When a new visitor views your site, the s_vi cookie is populated and stored. On the data collection server, a
new visitor profile is created for this visitor ID, and the effective visitor ID on the profile is set to match the
cookie.
When cross-device visitor identification is enabled, if a visitor ID variable is provided in a subsequent hit (for
example, after authentication), the effective visitor ID is updated to match the custom value. This can cause the
effective visitor ID to change directly after authentication, resulting in multiple visitor counts.
After the initial association, visit counts return to normal because the visitor is associated through the visitor ID
cookie. If the visitor later views your site and then authenticates, the visitor count is not inflated because the
effective visitor ID doesn't change after authentication.
Visits
Analytics counts a visit each time a server call occurs with a Visit Page Number equal to 1.
If you look at the Example Visit on page 241, this occurred 4 times: at hits 1, 9, 11, and 12. Similar to visitors,
this value returns to normal after the initial association because the Visit Page Number is reset back to 1 due
to a change in the effective visitor ID.
Geo-Segmentation Data
Geo-Segmentation data is recorded based on the first hit of the visit, and does not change for a single visit
regardless of the device used.
If a customer browses your site from his or her home computer, and then from a mobile device within 30 minutes,
the Geo-Segmentation data is not changed. If you are using VISTA to populate an eVar with Geo-Segmentation
data, it is based on the IP address in each hit. This could result in multiple Geo-Segmentation data values if the
IP address changes for the same visit.
243
On the first data connection containing a previously unrecognized s.visitorID value (u999 above), the
new profile is created. Persistent values from the previous profile are transferred to the new profile.
• eVars set to expire on the visit are not copied to the authenticated profile. Note the value car above is not
persisted.
• eVars set to expire by other measures will be copied to the authenticated profile. Note the value apple is
persisted.
• For the eVars that are persisted, no Instance metric is recorded. This means when using cross-device visitor
identification, it is possible to see reports where the Unique Visits metric for an eVar value is larger than the
Instance metric.
On subsequent data connections
The example below is a representation of how data is sent to Adobe Analytics when a customer authenticates
on a new device, after having previously authenticated on a different device:
When the customer authenticates his or her id is matched to the previous 'authenticated' profile - 2947539300.
The profile used at the start of this visit (5477766334477) is no longer used and no data persists from the
file.
• Geo-Segmentation data is recorded based on the first hit of the visit and does not change for a single visit
regardless of the device used. This means on a subsequent data connection on a new device, geo-Segmentation
data is generally not included.
• Technology columns such as browser, operating system, and color depth are recorded on the first hit of a visit.
Like Geo-Segmentation values, they will not be copied to the stitched profile.
• A Marketing Channel such as Direct or Internal which is commonly set up to not overwrite another channel
will overwrite other channels on a subsequent data connection containing a first authentication for that device,
such as the first authentication shown in Unique Visitor and Visits Counts on page 240.
Special cases
In some other cases data is not persisted from the unauthenticated to the authenticated profile.
• If a user is new to your site (has never visited before on this device) AND that user authenticates within
approximately 3 minutes of arriving, no values will persist to the authenticated profile.
Visitor Migration
Navigation title:
Visitor migration is a process where the visitor ID cookie is migrated from one domain to another.
Visitor migration lets you preserve visitor identification cookies when changing data collection domains. Data
collection domains might change for the following reasons:
• Moving from 2o7.net to omtrdc.net (Regional Data Collection).
• You are implementing the Marketing Cloud Visitor ID Service and are moving from a CNAME/first-party data
collection domain to 2o7.net or omtrdc.net (Regional Data Collection)
Task Description
To get started: Contact Customer Care with the Create a list with the exact syntax for the domains you want to migrate to and migrate
domain(s) you want to migrate, and the migration from.
period you would like to enable (30, 60, or 90 days). • example.112.2o7.net > metrics.example.com
Make sure you include the non-secure and secure
• example.102.112.2o7.net > smetrics.example.com
domains.
The migration host names are configured on Adobe Data collection server. Customer
Care will let you know when the change is made so you can plan for the next step.
6+ hours after configuration change: Update the After you make this change, use a Packet Analyzers on page 259 to verify that the
s.trackingServer and Analtyics image request is going to the updated data collection server.
s.trackingServerSecure variables
in your Analytics JavaScript code to use the new
data collection servers.
Immediately after updating your Analytics code: Use a Packet Analyzers on page 259 to verify that when you access your site for the
Test your site to verify that the redirect to the first time, or after clearing cookies, you see three 302 (redirect) HTTP status codes
previous data collection domain is occurring. before the 200 (OK) HTTP status code. If any of these redirects fail, contact Customer
Care immediately to ensure that the migration is configured correctly.
For the entire migration period: Keep the DNS The previous hostname must resolve through DNS or the cookie migration will not
record for the previous hostname active. occur.
245
Note: Timestamps Optional is the default setting for all new report suites generated from a template.
New report suites copied from an existing report suite will inherit settings from the original.
Timestamped data could not be sent to a non-timestamped global Updating an app to collect and use timestamps required you to employ
report suite. Consequently, hit data sent from offline devices was a new report suite.
dropped when adding to a non-timestamped report suite.
You could not save to the existing report suite or integrate existing
Consequently, hit data sent from offline data was dropped when data when updating your app to use timestamps.
adding to a non-timestamped report suite.
With Timestamps Optional, you can integrate non-timestamped data from a live website with offline data from
mobile devices, or update your non-timestamped app to a timestamped app.
247
Important: Carefully plan the design for each component data set so the combination makes sense in a
global report suite.
• Using timestamps when setting a s.visitorID is not recommended. It can lead to out-of-order data.
249
1. User points his or her browser to www.google.com, and types, "discount airline tickets" into the search
field, and then clicks the Search button.
2. The browser displays the search results including a link to your site, http://www.flywithus.com/.
After displaying the search results, the browser's address bar displays the search terms that the user entered
in the search field
(http://www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets).
Notice that the search terms are included in the URL query string parameters that follow
http://www.google.com/search?.
3. The user clicks the link to your hypothetical site http://www.flywithus.com/. When the user clicks
this link and lands on the flywithus.com website, Analytics uses JavaScript to collect the referring URL
(http://www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets)
as well as the current URL (http://www.flywithus.com/).
4. Analytics reports the information collected during this interaction in various reports, such as Referring
Domains, Search Engines, and Search Keywords.
Implementing Redirects on page 250 discusses how to leverage Analytics variables to capture the data lost in the
redirect. Specifically, the section discusses how to fix the "discount airline tickets" situation described above.
Implementing Redirects
In order to capture Analytics data from redirects, four minor alterations need to be made to the code that creates
the redirect and the AppMeasurement for JavaScript file.
Completing the following steps will retain the information that the original referrer (for example,
http://www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets in the
scenario above) passes to your site:
Important: Set s.referrer only once on the page. Setting it more than once with every tracking call or
with every link click that is tracked causes double counting of the referrer and related dimensions, such
as search engines and keywords.
// H Code
var tempVar=s.getQueryParam('origref')
if(tempVar)
s.referrer=tempVar;
251
s.referrer="http://www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets"
// Setting the s.pageURL variable is optional.
s.pageURL="http://www.flytohawaiiforfree.com"
Ultimate Landing Page URL http://www.flywithus.com This value will NOT appear in the
DigitalPulse Debugger if the pageURL
variable is used.
The text that the debugger displays should correspond to the following example:
Image
http://flywithuscom.112.2o7.net/b/ss/flywithuscom/1/JS-1.4/s61944015791667?[AQB]
ndh=1
t=4/8/2014 13:34:28 4 360
pageName=Welcome to FlyWithUs.com
r=http://ref=www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets
cc=USD
g=http://www.flytohawaiiforfree.com
s=1280x1024
c=32
j=1.3
v=Y
k=Y
bw=1029
bh=716
ct=lan
hp=N
[AQE]
After verifying that the Adobe Debugger displays these variables, it is always helpful to confirm that the search
terms and the original referring domain (prior to the redirect) are registering traffic in reports.
JavaScript JS File
Navigation title:JavaScript JS File
Verify that the .JS file is correctly referenced from the page. The path can be specified either relative to the
current document, or an absolute path name can be used.
<script language="JavaScript"
src="http://www.sampleco.com/javascript/includes/s_code.js"></script>
If some pages of the site are loaded in a secure protocol (https:), and reference the AppMeasurement for JavaScript
file, ensure that the reference to the file is either secure (via https:) or code the reference as shown below. This
example adopts the protocol of the current page and prevents the warning that "some elements are non-secure."
<script language="JavaScript"
src="//www.sampleco.com/javascript/includes/s_code.js"></script>
253
Ensure that the .JS file on the web servers have permissions appropriately set so that the file may be downloaded
and executed by website visitors. If a different .JS file is used on development servers, set the "read only"
attribute for the .JS file on production servers to avoid an overwrite. If altered, ensure that the following settings
are set appropriately at the top of the .JS file:
/************************** CONFIG SECTION **************************/
/* You may add or alter any code config here. */
/* Link Tracking Config */
s.trackDownloadLinks=false /* true for download tracking */
s.trackExternalLinks=false /* true for exit link tracking */
s.trackInlineStats=false /* true for ClickMap support */
s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,doc,pdf,xls"
s.linkInternalFilters="javascript:"
s.linkLeaveQueryString=false
s.linkTrackVars="None"
s.linkTrackEvents="None"
If "s_account" is assigned a value at the top of the .JS file, ensure that the report suite ID (populated in the
s_account variable) is correct. Also ensure that the code in the page is not setting the Report Suite ID (s_account
variable).
Examine the image request and variables to ensure that the "fallback method" (the third part of the "split" code
in the example above) is not creating the image request instead of the .JS file. This can be determined since
the "fallback" method only creates an image request with minimal information.
Code Modifications
Navigation title:Code Modifications
Testing any modifications to the .JS file or HTML code is the responsibility of the customer. It should be
completed prior to publishing the modifications to production websites.
Ensure that the linefeeds/return characters are not stripped or altered from the code that is placed within the
HTML, or from within the .JS file. Ensure that the JavaScript executes without an error on all pages and page
templates (in Internet Explorer Internet Options, select the Advanced Tab, and click Display a Notification about
Every Script Error.
When testing for errors, paste the code into a default HTML page to determine if the error is occurring because
of other page elements/objects.
<html><head></head><body>
...paste code here to debug...
</body></html>
Validate that links are reported in the Custom Links report. Ensure that the correct parameters are passed to the
tl function. For more information on custom links, see The s.tl() Function - Link Tracking on page 174.
Custom Variables
Navigation title:Custom Variables
List of custom variables used in Analytics.
Variable Description
Traffic Variables Check the value of prop1 - 75. Here is a checklist of items to check.
• Is the correct case used? "ValueA" is a different record than "valueA." You can use all lowercase
since a small subset of browsers convert all variables to lower case.
• Are the values less than 100 characters in length? If not, some clipping of the values can occur.
• Are all the values in a single property variable related, or do some values look out of place?
Conversion Variables Econversion variables include eVar 1 - 75. Here is a list of issues to check for the following.
• Is the correct case used? "ValueA" is a different record than "valueA." You can use all lowercase
since a small subset of browsers convert all variables to lower case.
• Are the values less than 255 characters in length? If not, some clipping of the values can occur.
• Are all the values in a single eVar related, or do some values look out of place?
Custom Events Events include both standard values (prodView, scOpen, scAdd, scCheckout, purchase), as well
as custom events from event1 to event100. All events are sent in the events variable. Multiple events
on the same page should be comma-delimited (no white space).
• For all the standard conversion events, products should also be populated with the applicable products.
For all events except purchase, the qty and price elements are optional.
• The purchase event, must be set only once in a session after the purchase has been completed and
confirmed.
Implementation Acceptance
Navigation title:Implementation Acceptance
Implementation process steps.
The following steps outline the implementation process.
255
1. The Adobe Consultant gathers report requirements and creates a data collection plan based on those
requirements.
The data collection plan includes variable definitions, required VISTA rules and custom JavaScript, data
correlation, and all settings for each report suite. The client completes the Implementation Questionnaire.
2. Technical resources on the client-side implement the code, site-specific JavaScript, and server-side variables.
3. The Adobe Consultant addresses technical issues during the implementation and assists in devising solutions
as required.
4. Technical resources on the client-side unit test the implementation.
Testers log in to Analytics and verifying all variables (page name, channel, server, events, campaign,
econversion variables, custom traffic variables, products, and all other variables).
5. The client notifies Adobe that the implementation is complete.
The client provides a validation sample (data sample) to the Adobe Consultant to validate data accuracy.
(VISTA-generated report suites are validated by comparing appropriate metrics. A client-Adobe agreement
of the metrics to be validated for such report suites shall be made in advance, at the time of the VISTA rule
creation.)
6. The client faxes (or signs online) an Implementation Acceptance and Agreement for the appropriate site(s).
7. After the acceptance has been received, the Adobe Consultant enables the Adobe Best Practices -
Implementation Verification certification within the interface.
8. Optionally, the client can contract with Adobe for monitoring services for key pages of the implemented site
(generally, these are the primary templates, home page, and critical entry pages).
This monitoring software is described in a separate document, but tracks pages by loading and executing the
page, then comparing the image request to a baseline stored in a database. If any differences are detected,
the software notifies specified Adobe (AM/IE) and client personnel via email.
Note: Default pages, such as index.html, often receive automated or monitoring traffic. These pages
represent a greater difference to browser-based data collection than other visited pages.
Adobe Debugger
The Adobe Debugger (previously DigitalPulse Debugger) is a free tool provided by Adobe that lets you view
the data being collected from your site on any given page.
When executed in your browser, it shows the image requests that transmitted data from that page into Marketing
Cloud solutions, along with any variable values or parameters that were captured. This allows you and your
developers to check the validity of your implementation on any page on your site.
The DigitalPulse Debugger is officially supported for use in all recent versions and builds of Mozilla Firefox,
Google Chrome, Microsoft Internet Explorer, and Safari.
Note: Because the Debugger functions by creating a pop-up window when you access a special bookmark
in your web browser, certain ad-blocking plug-ins and pop-up blockers might interfere with the loading
of the Debugger.
1. Copy the following text to your clipboard (triple-clicking might help in highlighting all the text):
javascript:void(window.open("","dp_debugger","width=600,height=600,location=0,menubar=0,status=1,toolbar=0,resizable=1,scrollbars=1").document.write("<script
language='JavaScript' id=dbg
257
src='https://www.adobetag.com/d1/digitalpulsedebugger/live/DPD.js'></"+"script>"));
Mozilla Firefox
Instructions to create a bookmark for the Adobe Debugger (previously DigitalPulse Debugger) from within
Mozilla Firefox.
Google Chrome
Instructions to create a bookmark for the Adobe Debugger (previously DigitalPulse Debugger) from within
Google Chrome.
1. Right-click the Bookmarks bar (depending on your Chrome settings the Bookmarks bar might be on the
New Tab page), then click Add Page.
2. In the Name field, specify "Adobe Debugger" as the name for the new bookmark.
3. In the URL field, paste the code that you copied to your clipboard as explained in Adobe Debugger Installation
on page 257.
4. Browse to and specify the location you want to save the bookmark.
5. Click OK.
1.
In the Favorites Bar, click the Add to Favorites Bar icon ( ) icon.
If the Favorites Bar is hidden, right-click the browser header, then click Favorites Bar.
A new bookmark is created.
2. Right-click the bookmark, then click Rename.
3. In the New Name field, specify "Adobe Debugger" as the name, then click OK.
4. Right-click the newly created bookmark again, then click Properties.
5. In the URL field, paste the code that you copied to your clipboard as explained in Adobe Debugger Installation
on page 257.
6. Click OK.
1. From your browser, click the bookmark or bookmarklet to launch the DigitalPulse Debugger in a new window.
Packet Analyzers
Packet analyzers let you view the data sent by your implementation to Adobe Data Collection Servers.
Simliar to the DigitalPulse Debugger, a packet monitor shows what data parameters are being passed in an image
request; however, packet monitors provide added functionality:
• View custom link tracking image requests
• View image requests using implementation methods other than JavaScript, such as hard-coded image requests
or Appmeasurement
To view Analytics requests, filter outgoing requests using "b/ss".
In very rare cases, the debugger will report an image request although no request makes it to Adobe's Analytics
processing servers. Using a packet monitor is a great way to be 100% sure that a specific image request is being
fired successfully.
While Adobe does not provide an official packet monitor, there are a wide range of them on the internet. The
following are some packet monitors others have found useful.
Note: These lists are not meant to be comprehensive, but rather information on frequently used monitors.
If you have a packet monitor you successfully use and find useful, feel free to provide feedback using the
Feedback button on the right side of this window.
259
Firefox Internet Explorer Chrome Standalone Programs
Observe Point (tag viewer) HttpWatch Observe Point (tag viewer) Charles
HttpWatch
Firebug
Note: Adobe does NOT support or troubleshoot any issues you may experience with these packet monitors.
Consult the packet monitor's originating site for assistance instead.
Note: This section applies only to the legacy s_code.js implementation. About AppMeasurement for
JavaScript on page 67 supports deploying the library and page code in the <head> tag.
Previously, a common implementation practice was to place the Analytics JavaScript code between the <head>
and </head> tags. By placing the code between these tags it prevented the 1 x 1 pixel image that was returned
261
</body>
</html>
263
In this case, the semi-colon represents a placeholder for the product category. If the semi-colon is left out of the
product string, then "product name" would be counted as the category, the number of units to be counted as the
product name, the revenue to be counted as the units, and so on.
Using Quotes
Navigation title:Using Quotes
When you input values into a variable, there are a few best practices to follow.
You can use single quotes or double quotes, make sure you are consistent. If you are using single quotes, always
use single quotes. If you are using double quotes, always use double quotes. Both of the examples below are
correct.
s.prop2='test' (single quotes)
s.prop2="test" (double quotes)
Make sure that you have smart quotes turned off. If you are using single quotes, and you have an apostrophe in
the variable value, JavaScript interprets the apostrophe as a single quote. This means it is the end of the string.
Consider the following example:
s.pageName='John's Home Page'
In this case, JavaScript would interpret the apostrophe (which is also a single quote) in "John's" to be the end of
the string. Since ''s Home Page" has no meaning in JavaScript, it causes an error that prevents the image request
from occurring. Either of the following examples would work:
s.pageName='John\'s Home Page'
s.pageName="John's Home Page"
In the first example, you can escape the apostrophe by inserting a backslash (\) immediately before it. This tells
JavaScript that the apostrophe is not ending the string, but rather is part of it. The string then ends as intended,
at the closing single-quote. The second example uses double-quotes around the entire string. In this case, a
single-quote cannot indicate the end of the string. The same is true if a double-quote is part of the string. A value
of s.pageName="Team Says "We Win!"" would be incorrect because of the use of double-quotes within the
string, as well as surrounding it. This would be correct if entered as s.pageName="Team Says \"We Win!\"".
265
Plug-ins
Some customers implement plug-ins to enhance their Adobe experience. When you replace your code, do not
forget that you have plug-ins as part of that code. The code created in the Code Manager does not have any
plug-in code with it, so all plug-ins need to migrate manually to the newer code base. Make a copy of your
existing code just in case something happens, and you need to revert to your previous code.
s.products=";Nikon SB-600 Speedlight Flash for Nikon Digital SLR s.products=";Nikon SB-600 Speedlight Flash for Nikon Digital SLR
Cameras;1;229.9489183" Cameras;1;229.95" (round or truncate long prices)
var s_account="rsid1, rsid2" var s_account="rsid1,rsid2" (no space between report suite IDs when
doing multi-suite tagging)
s.events="event1, event2" s.events="event1,event2" (no space between event IDs when doing
multi-event tagging)
Additional Notes
Keep the closing HTML comment at the very end of the Adobe code (even if you are using the NOSCRIPT part
of the script).
Vulnerability Scanner
Navigation title:Vulnerability Scanner
Whenever users are allowed to input values that are stored in Analytics or any other JavaScript variables, values
should be properly escaped or URIEncoded.
We highly recommend using a vulnerability scanning service to avoid injection attacks and other potential
exploits that might be present in your code.
Page Naming
The pageName variable is used to identify each page that is tracked on the website.
If the pageName variable is not populated with a defined value (such as Home), Analytics uses the URL of the
page. Because the page name is central to your reports, make sure that all parties in your organization agree on
a strategy before you implement.
Depending on the content management system your site uses, it is helpful to add content elements to your system
that can be used to populate Analytics variables. Many companies find that most Analytics variables can be
populated from existing content management elements.
Prop2 Detailed Content Description Electronics : Notebook PC : Detailed Specs : IBM Thinkpad
T20
The more layered your site, the more variables should be used to identify page content. Companies also find
value in allowing for overlap between variables. For example, a more detailed variable may contain information
not only about the product being viewed, but also about the site section and sub-section. This is particularly
helpful when a product or article appears in more than one section of the site.
The following page naming strategies describe how to populate the pageName variable. While it is tempting to
choose the page naming strategy that is easiest to implement, the page naming strategy largely determines the
usability of all Path and Page reports. Use good judgment when deciding how pages are named.
267
Unique Name for Each Page
The most valuable method of naming pages is to give each page a unique identifier that is easily understood by
all Analytics users in your organization. Examples of page names include Home Page, Electronics Department
Home, and Sports : Local Sports : High School.
Most Analytics users find that hierarchical page names are useful in both identifying where the page is found
on the site and its purpose. The following table shows some sample page names for various industries:
Electronics : Notebook PCs Technology : New Gadgets Home Loans : Rate Compare
Electronics : Notebook PCs : Product Page Technology : New Gadgets : Article Page Home Loans : Rate Compare : 10 Year Fixed
HTML (document.title)
If you have invested time into making your HTML titles readable and intuitive, you might consider using the
same title as the value in the pageName variable. Adobe recommends using a server-side variable to populate
the pageName rather than using JavaScript's document.title. Some browsers interpret the HTML title
differently than others, which may cause Analytics to receive different page names from different browsers.
The best practice for using the HTML title is to copy the existing titles for each page into a separate variable or
content management element. When you decide to make changes to the HTML title for search engine optimization
or other purposes, the Analytics page names are not affected. If a page name changes in Analytics, it becomes
a new page and is not connected with the old page name, regardless of the associated URL.
Note: Most Analytics variables have a maximum of 100 characters (eVars have a maximum of 255).
Internet Explorer allows an overall maximum of 2,048 characters in a GET image request URL. The image
request limit applies not only to the variables, but also to information about the browser, operating system,
and browser plug-ins (Netscape/Mozilla only).
Caching Directives
Navigation title:Caching Directives
The JavaScript library file is intended to be cached in the user's browser after the first time the user loads a page.
Adobe customers should ensure that their Web servers are set up to take advantage of this functionality. For
example, make sure that the NO-CACHE setting is set to false. Additionally, ensure that the expiration date is
sufficiently long. Make sure any proxy caches are set up with the correct configuration. The customer's Web
server documentation provides more information.
Tables
Navigation title:Tables
Many Web browsers do not start displaying the contents of a table until the browser has compiled the entire
table.
If the entire contents of the page are inside one big table, the browser must compile the entire contents of the
page before anything is displayed.
Placing the call to the JavaScript library file outside table tags ensures that the call to the Analytics servers does
not impact the displaying of the page content.
Note: The file should be placed in a legal position for images and must appear between the opening
<body> tag and the closing </body> tag.
269
File Compression
Navigation title:File Compression
Customers can compress the JavaScript library file by using standards-based encoding (such as gzip).
Typical compression algorithms can reduce the size of the JavaScript file by 40-60% or more.
Note: Not all browsers support all file compression standards or interpret the compressed files in the
same manner. Adobe does not guarantee reliable file compression in all environments. Customers should
test compression in their supported browsers and configurations before deploying.
Secure Pages
Navigation title:Secure Pages
Secure pages (pages loaded under https://) encrypt the image request and add to the total download time.
Secure pages can add as much as 50-75% overhead to the image request.
Note: Because third-party Internet Performance Audit providers (such as Keynote Systems) download
page image elements sequentially, not concurrently, they do not mimic the typical user experience.
Peering
Navigation title:Peering
Private Network Peering enables data to pass from an ISP's network to the Analytics network more efficiently.
Purchases
Conversions and Averages s.events, s.products, s.purchaseID Set s.events to purchase, product detail, order
number
Revenue s.events, s.products, s.purchaseID Set s.events to purchase, product detail, order
number
Orders s.events, s.products, s.purchaseID Set s.events to purchase, product detail, order
number
Units s.events, s.products, s.purchaseID Set s.events to purchase, product detail, order
number
Shopping Cart
Custom Events
Products
Cross Sell s.products, s.events, s.purchaseID May vary depending on right column metrics
271
Campaigns
Customer Loyalty
Customer Loyalty s.products, s.events, s.purchaseID Variables set on the Order Confirmation
(Thank You!) page
Sales Cycle
Days Before First Purchase s.products, s.events, s.purchaseID Variables set on the Order Confirmation
(Thank You!) page
Days Since Last Purchase s.products, s.events, s.purchaseID Variables set on the Order Confirmation
(Thank You!) page
Visit Number s.products, s.events, s.purchaseID Variables set on the Order Confirmation
(Thank You!) page
Daily Unique Customers s.products, s.events, s.purchaseID Variables set on the Order Confirmation
(Thank You!) page
Monthly Unique Customers s.products, s.events, s.purchaseID Variables set on the Order Confirmation
(Thank You!) page
Yearly Unique Customers s.products, s.events, s.purchaseID Variables set on the Order Confirmation
(Thank You!) page
Finding Methods
Visitor Profile
Site Path
Customer Variables
Traffic Reports
The following table lists the traffic variables that are used to populate each report:
Calculated Metrics
Site Traffic
273
Finding Methods
Visitor Profile
Geo Segmentation
Technology
Segmentation
Segmentation
Custom Insight
… …
Hierarchies
Hierarchy 1 s.hier1
… …
Hierarchy 5 s.hier5
Pathing Reports
The following table lists the pathing variables that are used to populate each report within Analytics:
Pages
Page Summary s.pageName (or other pathed variable) Also depends on internal business rules
Page Value s.pageName (or other pathed variable) Also depends on internal business rules
Most Popular Pages s.pageName (or other pathed variable) Also depends on internal business rules
Reloads s.pageName (or other pathed variable) Also depends on internal business rules
Clicks to Page s.pageName (or other pathed variable) Also depends on internal business rules
Time Spent on Page s.pageName (or other pathed variable) Also depends on internal business rules
Pages Not Found s.pageName (or other pathed variable) Also depends on internal business rules
275
Entries and Exits
Entry Pages s.pageName (or other pathed variable) Also depends on internal business rules
Exit Pages s.pageName (or other pathed variable) Also depends on internal business rules
Exit Links s.pageName (or other pathed variable) Also depends on internal business rules
Complete Paths
Full Paths s.pageName (or other pathed variable) Also depends on internal business rules
Longest Paths s.pageName (or other pathed variable) Also depends on internal business rules
Path Length s.pageName (or other pathed variable) Also depends on internal business rules
Time Spent per Visit s.pageName (or other pathed variable) Also depends on internal business rules
Single-page Visits s.pageName (or other pathed variable) Also depends on internal business rules
Advanced Analysis
Previous Page s.pageName (or other pathed variable) Also depends on internal business rules
Next Page s.pageName (or other pathed variable) Also depends on internal business rules
Previous Page Flow s.pageName (or other pathed variable) Also depends on internal business rules
Next Page Flow s.pageName (or other pathed variable) Also depends on internal business rules
PathFinder s.pageName (or other pathed variable) Also depends on internal business rules
Fall-out s.pageName (or other pathed variable) Also depends on internal business rules
s.pageName
Conversion Reports > Path Reports > Page Value
Conversion Reports > Path Reports > Entry Page
Conversion Reports > Path Reports > Original Entry Pages
Traffic Reports > Site Traffic > Page Views
Traffic Reports > Site Traffic > Hourly Unique Visitors
Traffic Reports > Site Traffic > Daily Unique Visitors
Traffic Reports > Site Traffic > Monthly Unique Visitors
Traffic Reports > Site Traffic > Yearly Unique Visitors
Traffic Reports > Visitor Profile > Pages Viewed by Key Visitors
Traffic Reports > Segmentation > Most Popular Pages
Path Reports > Pages > Page Summary
Path Reports > Pages > Page Value
Path Reports > Pages > Most Popular Pages
s.channel
Conversion Reports > Site Path Reports > Site Section
Traffic Reports > Segmentation > Most Popular Site Sections
s.prop1 - s.prop20 Traffic Reports > Custom Insight > Custom Insight 1-20
s.campaign
Conversion Reports > Campaigns > Conversion & Averages
Conversion Reports > Campaigns > Tracking Code
s.zip Conversion Reports > Visitor Profile > ZIP/ Postal Codes
s.events
Conversion Reports > Purchases > Conversion & Averages
Conversion Reports > Purchases > Revenue
Conversion Reports > Purchases > Orders
Conversion Reports > Purchases > Units
Conversion Reports > Shopping Cart > Conversion & Averages
Conversion Reports > Shopping Cart > Carts
Conversion Reports > Shopping Cart > Cart Views
Conversion Reports > Shopping Cart > Cart Additions
Conversion Reports > Shopping Cart > Cart Removals
Conversion Reports > Shopping Cart > Checkouts
Conversion Reports > Custom Events > Custom Event 1-20
Conversion Reports > Products > Conversion & Averages
Conversion Reports > Products > Cross Sell
277
Variable Reports Populated
Conversion Reports > Products > Categories
Conversion Reports > Campaigns > Conversion & Averages
Conversion Reports > Customer Loyalty > Customer Loyalty
Conversion Reports > Sales Cycle > Days Before First Purchase
Conversion Reports > Sales Cycle > Days Since Last Purchase
Conversion Reports > Sales Cycle > Visit Number
Conversion Reports > Sales Cycle > Daily Unique Customers
Conversion Reports > Sales Cycle > Monthly Unique Customers
Conversion Reports > Sales Cycle > Yearly Unique Customers
Conversion Reports > Site Path > Page Value
s.products
Conversion Reports > Purchases > Conversion & Averages
Conversion Reports > Purchases > Revenue
Conversion Reports > Purchases > Orders
Conversion Reports > Purchases > Units
Conversion Reports > Shopping Cart > Conversion & Averages
Conversion Reports > Products > Conversion & Averages
Conversion Reports > Products > Cross Sell
Conversion Reports > Products > Categories
Conversion Reports > Campaigns > Conversion & Averages
Conversion Reports > Customer Loyalty > Customer Loyalty
Conversion Reports > Sales Cycle > Days Before First Purchase
Conversion Reports > Sales Cycle > Days Since Last Purchase
Conversion Reports > Sales Cycle > Visit Number
Conversion Reports > Sales Cycle > Daily Unique Customers
Conversion Reports > Sales Cycle > Monthly Unique Customers
Conversion Reports > Sales Cycle > Yearly Unique Customers
Conversion Reports > Site Path > Page Value
s.purchaseID
Conversion Reports > Purchases > Conversion & Averages
Conversion Reports > Purchases > Revenue
Conversion Reports > Purchases > Orders
Conversion Reports > Purchases > Units
Conversion Reports > Shopping Cart > Conversion & Averages
Conversion Reports > Products > Conversion & Averages
Conversion Reports > Products > Cross Sell
Conversion Reports > Customer Loyalty > Customer Loyalty
Conversion Reports > Sales Cycle > Days Before First Purchase
Conversion Reports > Sales Cycle > Days Since Last Purchase
Conversion Reports > Sales Cycle > Visit Number
Conversion Reports > Sales Cycle > Daily Unique Customers
Conversion Reports > Sales Cycle > Monthly Unique Customers
Conversion Reports > Sales Cycle > Yearly Unique Customers
Conversion Reports > Site Path > Page Value
279
Analytics for Digital Assistants
With recent advances in cloud computing, machine learning, and natural language processing, digital assistants
are moving out of the dark ages of "clippy" and becoming part of everyday life. Consumers are starting to talk
to their devices and expecting them to listen, understand, and respond in natural, human-like ways to phrases
like, "Alexa, turn on the family room lights," or "Okay Google, What's the weather like outside?"
As these platforms become more established, brands can present their services to consumers in these same
realistic and lifelike ways. For example, consumers can ask things like:
• "Alexa, ask my car when it needs an oil change."
• "Cortana, what is the balance of my checking account?"
• "Siri, send John $20 for dinner last night from my banking app."
This white paper provides an overview of how best to use the Adobe Analytics Cloud to measure and optimize
these types of experiences.
New Installs
For some of the digital assistants you will get a notification when someone installs the skill. This is especially
the case when there is authentication involved. At this time you should send Adobe an Install event by setting
the context data to a.InstallEvent=1. Note that this is not available on all platforms but is helpful when
it is present for looking at retention. The following code sample sends in Install, Install Date, and AppID.
Code Sample
GET
/b/ss/[rsid]/0?vid=[UserID]&c.a.InstallEvent=1&c.a.InstallDate=2017-04-24&c.a.AppID=Spoofify1.0&c
.OSType=Alexa&pageName=install
HTTP/1.1
Host: sc.omtrdc.net
Cache-Control: no-cache
281
User/Visitor Identification
The Analytics Cloud uses the Experience Cloud ID service (ECID) service to tie interactions across time to the
same person. Most of the digital assistants will return a userID that you can use to keep the activity for different
users separate in the ECID service. In most cases, this is what you should pass in as the ECID service. Some
platforms return a userID that is longer than the 100 characters that the Analytics limit allows. If that is the case,
Adobe recommends that you hash the userId to a fixed-length value using a standard hashing algorithm, such
as MD5 or Sha1.
While you can use the ECID service for this, doing so provides value only if you are trying to map ECIDs across
different devices (e.g. Web to Digital Assistant). If your app is a mobile app (e.g. a deep link) you should use
the SDK as is and send the information along. The userID can be attached to the ECID service using the
setCustomerID method, allowing for better device stitching. However, if your app is a service, use the userID
provided by the service as the ECID, as well as setting it in the setCustomerID. This allows you to see how
people are using the digital assistant over time.
Code Sample
GET /b/ss/[rsid]/0?vid=[UserID]&pageName=[intent] HTTP/1.1
Host: sc.omtrdc.net
Cache-Control: no-cache
Sessions
Because digital assistants are conversational, they often have the concept of a session. For example:
Consumer: "Ok Google, call a cab for me"
Google:: "Sure, what time would you like?"
Consumer: "8:30pm"
Google: "Sounds good, the Driver will be by at 8:30pm"
These sessions are important to keep in context. They help collect more details and make the digital assistants
more natural.
When implementing Analytics on a conversation, there are two things you should do when a new session is
started:
1. Reach out to Audience Manager: Get the relevant segments that a user is a part of so that you can customize
the response. (For example, this person currently qualifies for the multi-channel discount.)
2. Send in a new session or launch event: When you send the first response to Analytics, include a launch
event. Usually, this can be sent by setting context data of a.LaunchEvent=1.
Code Sample for Launch
GET
/b/ss/[rsid]/0?vid=[UserID]&c.a.LaunchEvent=1&c.Intent=[intent]&pageName=[intent]
HTTP/1.1
Host: sc.omtrdc.net
Cache-Control: no-cache
Intents
Each of the digital assistants has algorithms that detect intents and then passes the intent down to the "App" so
that the app knows what to do. These intents are a succinct representation of the request.
For example, if a user says, "Siri, Send John $20 for dinner last night from my banking app," the intent might
be something like sendMoney.
GET
/b/ss/[rsid]/0?vid=[UserID]&c.a.AppID=Penmo1.0&c.a.LaunchEvent=1&c.Intent=SendPayment&pageName=[intent]
HTTP/1.1
Host: sc.omtrdc.net
Cache-Control: no-cache
or
GET
/b/ss/[rsid]/0?vid=[UserID]&c.a.AppID=Penmo1.0&c.a.LaunchEvent=1&c.Intent=No_Intent_Specified&pageName=[intent]
HTTP/1.1
Host: sc.omtrdc.net
Cache-Control: no-cache
Parameters/Slots/Entities
In addition to the intent the digital assistant will often have a set of key value pairs that give the details of the
intent. These are called slots, entities or parameters. For example:
"Siri, Send John $20 for dinner last night from my banking app" would have the following parameters:
• Who = John
• Amount = 20
• Why = Dinner
There is usually a finite number of these with your app. To track these in Analytics, send them into context data
and then map each of the parameters to an eVar.
Code Sample
GET
/b/ss/[rsid]/0?vid=[UserID]&c.a.AppID=Penmo1.0=1&c.a.LaunchEvent=1&c.Intent=SendPayment&c.Amount=20.00&c.Reason=Dinner&c.ReceivingPerson=John&c.Intent=SendPayment&pageName=[intent]
HTTP/1.1
Host: sc.omtrdc.net
Cache-Control: no-cache
Session
Although not all apps will be revenue generating, it is important to think about what success looks like and
include some measurements for it. Adobe Analytics can measure revenue, ad-impressions and other forms of
success along with the user behavior.
Error States
Sometimes the Digital Assistant will provide the app with inputs that it doesn't know how to handle. For example.
"Siri, Send John 20 bags of coal for dinner last night from my banking app"
When this happens the app should ask for clarification. Additionally when it is responding to a request like this
you should send Analytics an event that indicates the App has an error state along with an evar that specifies
what type of error occurred.
Be sure to include errors where the inputs are not correct and errors where the "App" had a problem.
283
Code Sample
GET
/b/ss/[rsid]/0/?vid=[UserID]&c.a.AppID=Penmo1.0&c.Error=1&c.ErrorName=InvalidCurrency&pageName=[intent]
HTTP/1.1
Host: sc.omtrdc.net
Cache-Control: no-cache
Device Capabilities
While most of the platforms don't expose the actual device that the user spoke too. They do expose the capabilities
of the device as the available interfaces (e.g. Audio, Screen, Video, etc). This is useful information because it
defines the types of content that can be used when interacting with your users. When measuring the interfaces
it is best to concatenate them (in alphabetical order).
Example: :Audio:Camera:Screen:Video:
Notice the trailing and leading colons. These help when creating segments (for example, give me all interactions
with :Audio: capabilities).
Amazon Capabilities:
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interface-reference
Google Capabilities: https://developers.google.com/actions/assistant/surface-capabilities
Monitoring Intents
Most Apps have several intents and different things you can do. You could easily use Analysis Workspace to
keep track of the top intents by instances and by users
This lets you see which features are being used most often and can give you a view into the adoption of new
features.
Example
Pre-installed app
Play "My Heart "okay playing 'My Heart ChangeSong GET • Visitor ID
Will Go On" by Will Go On' by Celine /b/ss/[rsid]/0?vid=[UserID]&c.a.AppID=Spoofify1.0&c.Intent=ChangePlaylist&pageName= • App Version
Celine Dion Dion" • Intent
ActionPlaySong&c.SongID=[012345] • Song ID
HTTP/1.1 • Response
Host: sc.omtrdc.net
Cache-Control:
no-cache
Turn music off *no response, music turns Off GET • Visitor ID
off /b/ss/[rsid]/0?vid=[UserID]&c.a.AppID=Spoofify1.0&c.Intent=Off&pageName=TurnsOffMusic • App Version
HTTP/1.1 • Intent
Host: sc.omtrdc.net • Response
Cache-Control:
no-cache
285
Person Device Response Action / Intent Get Request Analytics Data
Play "My Heart "okay playing 'My Heart ChangeSong GET • Visitor ID
Will Go On" by Will Go On' by Celine /b/ss/[rsid]/0?vid=[UserID]&c.a.AppID=Spoofify1.0&c.Intent=ChangePlaylist&pageName= • App Version
Celine Dion Dion" • Intent
ActionPlaySong&c.SongID=[012345] • Song ID
HTTP/1.1 • Response
Host: sc.omtrdc.net
Cache-Control:
no-cache
Turn music off *no response, music turns Off GET • Visitor ID
off /b/ss/[rsid]/0?vid=[UserID]&c.a.AppID=Spoofify1.0&c.Intent=Off&pageName=TurnsOffMusic • App Version
HTTP/1.1 • Intent
Host: sc.omtrdc.net • Response
Cache-Control:
no-cache
Feedback
We welcome any suggestions or feedback regarding this solution. Enhancement ideas and suggestions can be
added to our Customer Idea Exchange.
Legal
© 2018 Adobe Systems Incorporated. All Rights Reserved.
Published by Adobe Systems Incorporated.
287