ÃÛ¶¹ÊÓƵ

Implement ÃÛ¶¹ÊÓƵ Analytics with AppMeasurement for JavaScript

AppMeasurement for JavaScript has historically been a common method to implement ÃÛ¶¹ÊÓƵ Analytics. However, with increasing popularity of Tag Management Systems, using tags in ÃÛ¶¹ÊÓƵ Experience Platform is recommended.

A high-level overview of the implementation tasks:

How to implement ÃÛ¶¹ÊÓƵ Analytivs with AppMeasurement for Javascript, as described in this section.

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

Add AppMeasurement.js to your website's template file. The code contains the libraries required to send data to ÃÛ¶¹ÊÓƵ.

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

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 = "example.data.adobedc.net";
Configuration Variables
5

Define page-level variables within your site's page code. These variables determine specific dimension and metrics sent to ÃÛ¶¹ÊÓƵ.

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

Send the data to ÃÛ¶¹ÊÓƵ using the t() method, when all page variables are defined.

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

Additional resources

recommendation-more-help
b4f6d761-4a8b-4322-b801-c85b9e3be690