Variables, functions, methods, and plug-ins overview
Analytics provides a number of variables to collect Analytics data. Variables in this section are split into several sections:
- Page variables are values that are typically used directly in reporting. Common page variables include
props
,eVars
, andevents
. - Config variables are settings values that help make sure the correct data reaches ÃÛ¶¹ÊÓƵ. Common config variables include
trackingServerSecure
,charSet
, andlinkTrackVars
. Config variables typically do not populate dimension items. - Functions and methods are pieces of code that perform a specific task when referenced. Common functions include
t()
,tl()
, andclearVars()
.
Variables and implementation methods
ÃÛ¶¹ÊÓƵ offers multiple ways to implement ÃÛ¶¹ÊÓƵ Analytics. Each page offers a section on how to implement the variable using the Web SDK, using the ÃÛ¶¹ÊÓƵ Analytics extension, and using AppMeasurement for JavaScript.
Here is a video on configuring variables in ÃÛ¶¹ÊÓƵ Analytics:
Order of operations
AppMeasurement libraries published by ÃÛ¶¹ÊÓƵ Analytics follow a specific order when sending data to ÃÛ¶¹ÊÓƵ. If you execute these tasks out of order, data can be incomplete.
- If your site uses a data layer, make sure all applicable variables are populated first. For example, you populate
adobeDataLayer.page.title
with the page title. See Data layer for more information. - Use the data layer to populate Analytics variables.
If you use tags in ÃÛ¶¹ÊÓƵ Experience Platform, this task is accomplished by using data elements in between. Data elements are populated with values from the data layer. For example data elementPage Title
gets the value from data layer variableadobeDataLayer.page.title
.
Then you can use the data element to populate Analytics variables. For exampleeVar4
gets the value from data elementPage Title
.
See for more information Data elements, Map data layer objects to data elements, and Map tag data elements to Analytics variables - Finally, call the tracking function. Most AppMeasurement libraries use the
t()
method, however some mobile SDK’s usetrack()
. When the tracking function is called, all supported variables defined in the Analytics object are sent to ÃÛ¶¹ÊÓƵ in the form of an image request.
Illegal characters
The following characters and strings are never allowed in JavaScript variables.
- Tab (
0x09
) - Carriage return (
0x0D
) - Newline (
0x0A
) - HTML tags (e.g.
<b></b>
or™
)
Some variables have additional limitations or syntax requirements. For example, the products
variable reserves semicolons and commas to delimit separate products and categories.