Migrate from the Adobe Analytics tag extension to the Web SDK tag extension

This implementation path involves a methodical migration approach to move from the Adobe Analytics tag extension to the Web SDK tag extension. Other implementation paths are covered on separate pages:

  • AppMeasurement to Web SDK JavaScript library: A smooth and methodical approach to migrate to the Web SDK, except it does not use tags. Instead, you manually remove the Adobe Analytics data collection library (AppMeasurement.js) and replace it with the Web SDK JavaScript library (alloy.js).
  • Web SDK tag extension: A fresh Web SDK installation where you manage the implementation using tags in Adobe Experience Platform Data Collection. It requires the Adobe Analytics ExperienceEvent field group, which includes typical Analytics variables to be included in your XDM schema.
  • Web SDK JavaScript library: A fresh Web SDK installation using the Web SDK JavaScript library (alloy.js). Manage the implementation yourself instead of using the tags UI. It requires the Adobe Analytics ExperienceEvent field group, which includes typical Analytics variables to be included in your XDM schema.

Advantages and disadvantages of this implementation path

Using this migration approach has both advantages and disadvantages. Carefully weigh each option to decide which approach is best for your organization.

Advantages
Disadvantages
  • No code changes on your site: Since your implementation already has tags installed, all migration updates can be made in the tags interface.
  • Uses your existing implementation: This approach does not require a net-new implementation. While it does require new rule actions, you can reuse your existing data elements and rule conditions with minimal changes.
  • Does not require a schema: For this stage of migrating to the Web SDK, you don’t need an XDM schema. Instead, you can populate the data object, which sends data straight to Adobe Analytics. Once migration to the Web SDK is complete, then you can create a schema for your organization and use datastream mapping to populate applicable XDM fields. If a schema were required at this stage of the migration process, your organization would be forced to use an Adobe Analytics XDM schema. Use of this schema makes it more difficult for your organization to use your own schema in the future.
  • Implementation technical debt: Since this approach uses a modified form of your existing implementation, it can be harder to track implementation logic and perform changes when needed. Custom code can be particularly difficult to debug.
  • Requires mapping to send data to Platform: When your organization is ready to use Customer Journey Analytics, you must send data to a data set in Adobe Experience Platform. This action requires that every field in the data object be an entry in the datastream mapping tool that assigns it to an XDM schema field. Mapping only needs to be done once for this workflow, and it doesn’t involve making implementation changes. However, it is an extra step that is not required when sending data in an XDM object.

Adobe recommends following this implementation path in the following scenarios:

  • You have an existing implementation using the Adobe Analytics tag extension. If you have an implementation using AppMeasurement, follow Migrate from AppMeasurement to the Web SDK instead.
  • You intend to use Customer Journey Analytics in the future, but do not want to replace your Analytics implementation with a Web SDK implementation from scratch. Replacing your implementation from scratch on the Web SDK requires the most effort, but also offers the most viable long-term implementation architecture. If your organization is willing to go through the effort of a clean Web SDK implementation, see Ingest data via the Adobe Experience Platform Web SDK in the Customer Journey Analytics user guide.

Steps required to migrate to the Web SDK

The following steps contain concrete goals to work towards. Click each step for detailed instructions on how to accomplish it.

1. Create and configure a datastream

Create a datastream in Adobe Experience Platform Data Collection. When you send data to this datastream, it forwards data to Adobe Analytics. In the future, this same datastream forwards data to Customer Journey Analytics.

  1. Navigate to experience.adobe.com and log in using your credentials.
  2. Use the home page or product selector in the top right to navigate to Data Collection.
  3. In the left navigation, select Datastreams.
  4. Select New Datastream.
  5. Enter the desired name, then select Save.
  6. Once the datastream is created, select Add Service.
  7. In the service drop-down menu, select Adobe Analytics.
  8. Enter the same report suite ID as the site you currently send analytics data to. Click Save.

Add Adobe Analytics service

Your datastream is now ready to receive and pass along data to Adobe Analytics.

2. Add the Web SDK extension to your tag property

This section prepares your tag for the bulk of the migration effort taking place in the next step.

  1. Click the hamburger icon in the top left of the Adobe Experience Platform interface, then select Tags.

  2. Select the desired tag property.

  3. In the left navigation of the tag property, select Extensions.

  4. Select Catalog near the top to see a list of all available extensions.

  5. Search for and select the Adobe Experience Platform Web SDK extension, then click Install on the right.

    Catalog

  6. The extension configuration settings appear. Locate the Datastreams section, and select the datastream that you created in the previous step.

    Datastream selection

  7. Select Save.

Your tag property now has the Web SDK installed.

3. Create a data object data element

The data object data element provides an intuitive framework to configure a payload that the Web SDK uses to send to a datastream. Most rules that you update in the following step interact with this data element.

  1. In the left navigation of the tags interface, select Data Elements.

  2. Select Add Data Element

  3. Give the data element the following settings:

    • Name: Anything you’d like, such as “Data layer” or “Data object”
    • Extension: Adobe Experience Platform Web SDK
    • Data Element Type: Variable
    • Check boxes can remain as-is
  4. On the right, select the following settings:

    • Property radio button: Data
    • Solution: Adobe Analytics
  5. Select Save.

Create data element

Your tag property now has everything needed to update each rule.

4. Update rules to use the Web SDK extension instead of the Analytics extension

This step contains the bulk of the effort required to migrate to the Web SDK, and requires knowledge of how your implementation works. An example is provided below as an example of how to edit a typical tag rule. Update all tag rules in your implementation to replace all references to the Adobe Analytics extension with the Web SDK extension.

  1. In the left navigation of the tags interface, select Rules.

  2. Select a rule to edit.

  3. Select the action Adobe Analytics - Set Variables

  4. Note all Analytics variables set within this rule. Include both variables set in the drop-down menus and variables set within custom code.

  5. Change the Action Configuration to the following settings:

    • Extension: Adobe Experience Platform Web SDK
    • Action type: Update variable
  6. Ensure that your data object is selected in the drop-down on the right.

  7. Set the Analytics variables to their same respective values as they were configured in the Analytics extension.

    • Variables set within the tags interface can directly translate to the same values.
    • String variables set within custom code require minimal adjustments. Instead of using the s object, use data.__adobe.analytics instead. For example, s.eVar1 would translate to data.__adobe.analytics.eVar1.
    • Analytics configuration variables and method calls in custom code can require modified implementation logic. See each respective variable to determine how to achieve its equivalent using the Web SDK.
  8. Once all rule logic is replicated using the Web SDK extension, select Keep Changes.

  9. Repeat these steps for every action configuration that uses the Adobe Analytics extension to set values. This step includes both variables set using the tags interface and variables set using custom code. Custom code blocks cannot reference the s object anywhere.

The above steps apply only to rules that set values. The following steps replace all actions that use the Action Configuration Send Beacon.

  1. Select a rule that sends a beacon.

  2. Select the action Adobe Analytics - Send Beacon.

  3. Note the current value of the Tracking radio button on the right (s.t() or s.tl()).

  4. Change the Action Configuration to the following settings:

    • Extension: Adobe Experience Platform Web SDK
    • Action type: Send event
  5. On the right, change the action settings to the following:

    • Type: For s.t(), use Web Webpagedetails Page Views. For s.tl(), use Web Webinteraction Link Clicks. If you use s.tl(), you must also include the following fields in your data object. These fields are listed under Additional properties when performing the Update variable action configuration:

  6. Select Keep Changes.

  7. Repeat these steps for every action configuration that uses Adobe Analytics to send a beacon.

5. Publish updated rules

Publishing updated rules follows the same workflow as any other change to your tags configuration.

  1. In the left navigation of the tags interface, select Publishing Flow.
  2. Select Add Library.
  3. Give this tag commit a name, such as “Upgrade to Web SDK”.
  4. Select Add All Changed Resources.
  5. Select Save.
  6. The publishing workflow displays an orange dot, indicating that it is building. Once the dot turns green, your changes are available in your development environment.
  7. Test your changes in your development environment to ensure that all rules are firing properly, and that the data object is populating with expected values.
  8. When ready, submit the library for approval, build to staging, then ultimately approve and publish to production.

Publishing flow

6. Disable Analytics extension

Once your tag implementation is fully on the Web SDK, you can disable the Adobe Analytics extension.

  1. In the left navigation of the tags interface, select Extensions.
  2. Locate and select the Adobe Analytics extension. On the right, select Disable.
  3. Follow the same publishing workflow above to publish the removal of the Adobe Analytics extension.
  4. Once the extension is disabled in production, you can uninstall it entirely. Select the extension, select the three-dot menu on the right, then select Uninstall.
  5. Follow the same publishing workflow above to publish those changes to production.

At this point, your Analytics implementation is fully on the Web SDK and is adequately prepared to move to Customer Journey Analytics in the future.

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