I might have missed it somewhere in the documentation but we plan to use adobe analytics and DTM on a site. I understand how to setup det datalayer at pageview with variables like pagename, sections, but
i would like to update a datalayer variable on a user interaction.
Lets say i have a js onclick function and there i want to update a variable in the datalayer and make sure that adobe registers the change, is that possible and how would i do that?
Thanks for reaching out to Adobe Dynamic tag Management Community. As per our understanding from the query, you are basically trying to create an event based data element such that the data element captures the value on a user interaction i.e. Click etc. Please see the following link for more information on How to create event based data element.