Implement Adobe Analytics with AppMeasurement for JavaScript

AppMeasurement for JavaScript has historically been a common method to implement Adobe Analytics. However, with increasing popularity of Tag Management Systems, using tags in Adobe Experience Platform is recommended.

A high-level overview of the implementation tasks:

How to implement Adobe Analytivs with AppMeasurement for Javascript, as described in this section.

More Information
Ensure you have defined a report suite
Report Suite Manager
Download the required JavaScript code for AppMeasurement from Code Manager. Unzip the file.
Code Manager

Add AppMeasurement.js to your website's template file. The code contains the libraries required to send data to Adobe.

code language-html
  <script src="AppMeasurement.js"></script>

Define configuration variables within AppMeasurement.js. When the Analytics object is instantiated, these variables make sure that data collection settings are correct.

code language-javascript
// Instantiate the Analytics tracking object with report suite ID
var s_account = "examplersid";
var s=s_gi(s_account);

// Make sure data is sent to the correct tracking server
s.trackingServer = "";
Configuration Variables

Define page-level variables within your site's page code. These variables determine specific dimension and metrics sent to Adobe.

code language-js
s.pageName = "Example page";
s.eVar1 = "Example eVar"; = "event1";
Page Variables

Send the data to Adobe using the t() method, when all page variables are defined.

code language-js
t() method
Extend and validate your implementation before pushing it out to production.

Additional resources