How do I populate eVars using a tag management system?
Using Adobe Experience Platform Launch
contextData variable | Description |
---|---|
di_session_id | DXA session ID, which must be sent by a processing rule and mapped to an eVar. |
di_session_id_ms | Time 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_ms | Time in milliseconds for the Adobe Launch library to load. This can optionally be captured by a processing rule to measure performance. |
- In Adobe Analytics, go to Admin > Report Suites.
- In the Report Suit Manager, go to Edit Settings > General > Processing Rules.
- Towards the bottom, click Add Rule.
- Enter a Rule Title. For example, "Decibel Session Id".
- (Optional) To add conditions, under Rule Title, click Add Condition.
- In the Always Execute section, in the left drop-down menu, select Overwrite value of.
- In the dropdown menu to the right, select your designated eVar for the Adobe Analytics integration with DXA.
- In the dropdown menu to the right of With, select di_session_id.
Your configurations should look like those in the image below:
- Click Save.
- 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
- 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
- Make sure to replace the
- 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
- Publish changes.
The Decibel Session ID will now be populated as part of the initial beacon call to Adobe Analytics.
-
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.
-
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.