Adobe New SiteCatalyst JavaScript Library – AppMeasurement.js – Overview

AppMeasurement for JavaScript is a new version library that provides the same core functionality of old library H-Code s_code.js, but is lighter and faster for use on both mobile and desktop sites. It is light & fast enough to be used with mobile sites AND robust enough to be used on the full desktop web, allowing you to leverage a single JS file across all web measurement environments.  There are also a number of powerful new capabilities in the new JS file:

  • Smaller: 22k uncompressed & 8k gzipped (H.26 code is 33k uncompressed & 13k gzipped)
  • Faster: 3-7x faster than the H.25 code
  • Native Utilities: new native utilities provide product-level support for several common plugin use cases (getqueryparam, linkhandler, cookie handling, url encoding)
  • Modules: updated Integrate and Media Modules available from code manager
  • Head Tag Deployments: deploying s_code and page code inside the <head> tags is fully supported

While the new JS file will dramatically improve your efforts to unify web analytics deployments and increase the sophistication of your mobile implementations, there are two limitations you should be aware of:

  1. The new JS file doesn’t support TagManager.
  2. The new JS file doesn’t support all Consulting Plugins.  A partial list of supported and non-supported plugins may be found here. If you’ll be migrating an existing implementation to the new JS file, you will need to remove or update any plugins that aren’t supported. Consulting is currently working to test and upgrade (where necessary) commonly used plugins, and the plugin support documentation above will be regularly updated with these changes.


Adobe JavaScript code is zipped as (current version is 1.5.2) under Marketing Cloud Client Libraries from Adobe Marketing Cloud Code Manager. It contains below files, for now we are concerned only with AppMeasurement.js and VisitorAPI.js


Once you’ve downloaded the core JS file from the code manager, you’ll need to add the configuration settings to the top of the file. When complete, your code will look something like as below. You’ll notice the way the instance is instantiated (top two lines of code) is slightly different from the old method—be sure to use this new approach if you’re migrating to the new library.

1. Instantiate and configure the Marketing Cloud visitor ID service:

2. Instantiate and configure AppMeasurement:

At a minimum, configure the following three variables below, they can be copied directly from your s_code.js or AppMeasurement.js file.

  • s.account
  • s.trackingServer
  • s.visitor

You can find more AppMeasurement configuration details from our post JavaScript Implementation Guide of Adobe SiteCatalyst Omniture

AppMeasurement Plug-in Support

Plug-in support has changed in the new version of JavaScript AppMeasurement.

1. Tested Plugins

  • appendList
  • crossVisitParticipation
  • userAgentManager
  • getTimeParting
  • join
  • split
  • getDaysSinceLastVisit
  • getNewRepeat
  • getTimeToComplete
  • manageVars (requires plugin utility)
  • channelManager
  • Cookie Combining Utility
  • getPageName

2. Untested Plugins

  • getActionDepth
  • getAndPersistValue
  • getCookiesAccepted
  • getValOnce

3. Unsupported Plugins

  • callBack
  • channelExtract
  • detectRIA
  • deviceOrientationChanges
  • DynamicObjectIDs
  • Form Analysis
  • manageQueryParam
  • HTML5Storage

Leave a Reply

Your email address will not be published. Required fields are marked *