Reference the Analytics object
All variables sent to Adobe use the Analytics object. Most implementations use the s
object. Make sure that when referencing variables that you include the Analytics object in your reference.
For example, s.eVar1 = 'Value'
is valid, while eVar1 = 'Value'
is not.
Define each variable once
When a track function (s.t()
) runs, AppMeasurement takes all defined variables and compiles them into an image request. If you define a variable more than once in your implementation, only the latest value is used. Make sure that all variable values contain the correct value when the track function runs.
Correct variable capitalization
Some variables use uppercase letters. JavaScript variables are case-sensitive. Make sure that you use the correct case when defining variables. For example, s.eVar1 = 'Value'
is valid, while s.evar1 = 'Value'
is not.
Plug-ins
Some organizations use plug-ins to improve their implementation of Adobe Analytics. When upgrading AppMeasurement versions, do not forget to re-include any installed plug-ins. The code created in the Code Manager does not have any plug-in code with it. Make a copy of your existing code in case you need to revert to a previous version of AppMeasurement.
White space in variable values
In HTML there are several characters that create whitespace. These include a space, a tab, and a carriage return (or linefeed). Consider the following example:
<head>
<title>
Home Page
</title>
</head>
<body>
<script language="javascript">
s.pageName = document.title;
</script>
</body>
In this case, document.title
populates s.pageName
, which receives a value of “Home Page”. However, some browsers can interpret white space differently. The result can be either of two following examples:
s.pageName = "Home Page";
s.pageName = " Home Page";
These two variable values are considered separate in Adobe Analytics. However, the white space is automatically removed for display purposes. The result is a report that displays two seemingly identical “Home Page” line items. Make sure that variable values do not contain whitespace before or after the desired value.
Truncated image requests
Implementations that populate many variables with long values can sometimes run into truncated image requests. Some older browsers, such as Internet Explorer, impose a 2083-character limit on image request URLs. If your organization faces very long image requests, try the following:
-
Use the Experience Cloud ID service: AppMeasurement libraries 1.4.1 and later automatically send image requests using HTTP POST if they are too long. Data sent using this method is not truncated regardless of length. See Adobe Experience Cloud ID service for more information.
-
Use processing rules: Processing rules can copy values from one variable to another. This method saves you from setting the same value in multiple variables. For example:
Always execute:
Overwrite value of prop1 with eVar1
Overwrite value of eVar2 with eVar1
Overwrite value of prop2 with eVar1Then set eVar1 in your implementation:
s.eVar1 = "The quick brown fox jumps over the lazy dog";
-
Use dynamic variables: If your implementation populates many variables with the same value, you can use dynamic variables to shorten the request URL:
s.eVar1 = "The quick brown fox jumps over the lazy dog"; s.eVar2 = "D=v1"; s.prop1 = "D=v1"; s.prop2 = "D=v1";
-
Use classifications: If product or page names are unusually long, you can use an identifying value or code, then use classifications to display a more friendly name.
Analytics
- Implement Adobe Analytics
- Analytics Release Notes
- AppMeasurement release notes
- Analytics variables, functions, and methods
- Prepare to implement Adobe Analytics
- Implement Analytics using Experience Platform Edge
- Implement Analytics using the Adobe Analytics extension
- Implement Analytics using JavaScript
- Implement Analytics on other platforms
- Implement Analytics on mobile devices
- Implementation use cases
- Validate your implementation
- Frequently asked questions
- Review your implementation
Data Drip: Benefits of migrating from an old system to WebSDK
Data Drip
Thursday, Apr 10, 4:00 PM UTC
Join us as Adobe Technical Advisor, Arindam Agarwal, guides us through the benefits of implementing Adobe WebSDK. Arindam will provide an in-depth overview and answer questions live during the Q&A. Register today!
RegisterAdobe’s New Tools: Empowering Third-Party Developers
As marketing technology continues to advance, brands find themselves leveraging multiple solutions. Server-to-server integrations are...
Wed, Mar 19, 12:30 PM PDT (7:30 PM UTC)
Adobe Analytics: Using Advanced Metrics to Level Up Your Reporting
Calculated metrics are one of the most flexible tools available within Adobe Analytics. While you can use this tool to create metrics as...
Tue, Mar 18, 2:00 PM PDT (9:00 PM UTC)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more