Adobe Global Community

Adobe DTM, Session Storage, & Single Page Applications

Published on by John Simmons on medium.com
Single page applications (SPAs) are great, but it can sometimes be difficult to collect their data effectively. This is due to the fact that, as the name suggests, they do not have the typical load events (page loads, hash changes, etc.) that most analytics collection tools base their collection rules upon. Especially rules about the state of the application (i.e. what page the user is on). Thus, it is up to the application to explicitly notify analytics tools when changes happen. Doing this may require committing custom analytics code to the application code. This is not ideal. I would like to share a strategy I have been using for data collection on single page applications: using Javascript’s sessionStorage property as a pseudo data-layer in conjunction with Adobe DTM’s “dataelementchanged” event.

Tags


comments powered by Disqus