How do I populate eVars using a tag management system?

This page outlines how to populate Custom Insight Conversion Variables (eVars) created in Adobe Analytics using a tag management system.
Note: For the easiest experience, DXA recommends using Adobe Experience Platform Launch with the DXA browser extension.

Using Adobe Experience Platform Launch

With the Decibel browser extensionTo populate eVars using using Adobe Experience Platform Launch with the Decibel extension, you must implement DXA with Adobe Experience Platform Launch using advanced implementation.Advanced implementation enables a processing rule to automatically send the following contextData variables to be automatically sent to Adobe Analytics:
contextData variableDescription
di_session_idDXA session ID, which must be sent by a processing rule and mapped to an eVar.
di_session_id_msTime in milliseconds for the session ID to be received and passed to Adobe Analytics. This can optionally be captured by a processing rule to measure performance.
di_session_lib_msTime in milliseconds for the Adobe Launch library to load. This can optionally be captured by a processing rule to measure performance.
To use a processing rule to populate the eVar with the DXA session ID:
  1. In Adobe Analytics, go to Admin > Report Suites.
  2. In the Report Suit Manager, go to Edit Settings > General > Processing Rules. Adobe Analytics Report Suite Manager
  3. Towards the bottom, click Add Rule.
  4. Enter a Rule Title. For example, "Decibel Session Id".
  5. (Optional) To add conditions, under Rule Title, click Add Condition.
  6. In the Always Execute section, in the left drop-down menu, select Overwrite value of.
  7. In the dropdown menu to the right, select your designated eVar for the Adobe Analytics integration with DXA.
  8. In the dropdown menu to the right of With, select di_session_id.

    Your configurations should look like those in the image below:DXA Session Id configurations example

  9. Click Save.
The eVar will be populated with the session ID. If necessary, repeat the steps above for any contextData variables.
Without the Decibel browser extension
  1. In Adobe Experience Platform Launch, create a new data element with the following criteria:
    • Name — Decibel session ID
    • Extension — Core
    • Date Element Type — Custom Code
    • Storage Duration — Session
  2. In the editor, paste the following code:
    if (sessionStorage && sessionStorage._da_da_sessionId) { return 'di-xxxxx-' + sessionStorage._da_da_sessionId;
    • Make sure to replace the xxxxx with your DXA Property ID.
      Note: For more information, see Tracking Code.
    • Save
  3. Link the Data Element to the eVar:
    • In Adobe Experience Platform Launch, go to Extensions.
    • Configure your Adobe Analytics Extension.
    • In the configuration accordion, expand the Global Variables.
    • Choose your designated eVar and Set As.
    • Beside the value text box, click Data Element and choose Decibel Session Id.
    • The following value should now be populated: %Decibel Session Id%.
    • Save
  4. Publish changes.

The Decibel Session ID will now be populated as part of the initial beacon call to Adobe Analytics.

Using other tag management systems
  1. To ensure that the eVar is sent as part of the initial beacon call, implement the Integrate Module in Adobe Analytics.
    Note: For more information, see Integrate Module in the Adobe Analytics implementation documentation.
  2. Modify the Integrate Module implementation to add custom code from DXA to make use of the Integrate Module and ensure your eVar is populated.
    Note: To receive the custom code, contact DXA support.