Update implementation code

Edit code on your site to utilize first-party cookies.

Prerequisites

After you have verified your hostname(s) are responding and forwarding to Adobe data collection servers, you can alter your implementation to point to your own data collection hostnames.

To update implementation code

  1. Open your core JavaScript file (s_code.js/AppMeasurement.js).
  2. If you want to update your code version, replace your entire s_code.js/AppMeasurement.js file with the newer version and replace any plugins or customizations (if any). Proceed to step 5.

    Or

    If you want to update the code only pertinent to first-party cookies, locate the s.trackingServer and s.trackingServerSecure (if using SSL) variables, and point them to your new data collection hostnames. Using mysite.com as an example:

    s.trackingServer = "metrics.mysite.com"
    s.trackingServerSecure = "smetrics.mysite.com"
  3. Upload the updated core JavaScript file to your site.
  4. If you are moving to first-party cookies from a long-standing implementation, or changing to a different first-party collection hostname, we recommend migrating visitors from the previous domain to the new domain.

    See Visitor Migration in the Analytics Implementation Guide.

After you have uploaded the JavaScript file, everything is configured for first-party cookie data collection. It is recommended to monitor Analytics reporting for the next several hours to ensure that data collection continues as normal. If it does not, verify that all above steps have been completed and have one of your organization's supported users contact Customer Care.