Data Element Change Event Not Working | Community
Skip to main content
MktgCloudUser
Level 4
March 10, 2019
Solved

Data Element Change Event Not Working

  • March 10, 2019
  • 1 reply
  • 3955 views

Hello,

We have an AEM video component that updates a data layer whenever an event occurs such as Playback started, percentage reached, etc.  Using the function below, I can see the data layer is in fact being updated by testing for the values existence after the events have occurred.  Is there a reason why the Data Element Change isn’t activating? Also, since I don’t have access to the AEM source code, does that mean a Direct Call isn’t an option?

Thanks

function updateDataLayer (actionName, percentComplete) {

  if (dl != undefined) {           

     Object.assign(dl.event, {

        action:             actionName,

        percentViewed:      percentComplete

     });

  } else {

     console.error('"' + dataLayerName + '" Data Layer Object Not Found');

  }

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jantzen_b

I believe the data element value is set the first time the data element is called. From there you can set the storage duration within Launch for that data element. Since this is happening on the same page you'd likely need to use the none duration. That way each time the data element is called it should run the code necessary to retrieve the value from your data layer. 

1 reply

jantzen_b
Adobe Employee
jantzen_bAdobe EmployeeAccepted solution
Adobe Employee
April 7, 2020

I believe the data element value is set the first time the data element is called. From there you can set the storage duration within Launch for that data element. Since this is happening on the same page you'd likely need to use the none duration. That way each time the data element is called it should run the code necessary to retrieve the value from your data layer.