The t()
method is an important core component to Adobe Analytics. It takes all Analytics variables defined on the page, compiles them into an image request, and sends that data to Adobe data collection servers.
For example, consider the following JavaScript code:
// Instantiate the tracking object
var s = s_gi("examplersid");
// Define config variables and page variables
s.trackingServerSecure = "data.example.com";
s.eVar1 = "Example dimension item";
// Compile the variables on the page into an image request to Adobe
s.t();
Running the t()
method takes all Analytics variables defined and formulates a URL based on those variables. Some Analytics variables determine the URL of the image, while other variables determine query string parameter values.
https://data.example.com/b/ss/examplersid/1/?v1=Example%20dimension%20item
Adobe receives the image request, then parses the request header, URL, and query string parameters. Data collection servers then return a transparent 1x1 pixel image, invisibly displayed on your site.
Use an Action to configure sending XDM event data to Adobe. The Datastream receives this data, applies any configured mappings, and forwards that data to Adobe Analytics if it is an added service to that Datastream.
Use the sendEvent
command to send data to Adobe. The Datastream receives this data, applies any configured mappings, and forwards that data to Adobe Analytics if it is an added service to that Datastream.
alloy("sendEvent", {
"xdm": {}
});
See Track events in the Web SDK documentation for more information.
The Adobe Analytics extension in Adobe Experience Platform Data Collection has a dedicated location set a page view tracking call.
s.t()
radio button.Call the s.t()
method when you want to send a tracking call to Adobe.
s.t();
Optionally, you can use an object as an argument to override variable values. See variable overrides for more information.
var y = new Object();
y.eVar1 = "Override value";
s.t(y);
Previous versions of AppMeasurement used several lines of code to call this function. The additional code historically accommodated workarounds for different browsers. Standardization and best practices in modern browsers no longer require this block of code. Only the method call s.t()
is needed now.