Adobe Experience Cloud without AEM | Triggering Adobe Target SPA view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.onRouteUpdate = ({ location, prevLocation }) => { | |
let viewName = location.pathname.substr(1, location.pathname.length - 2) || "home"; | |
if (typeof adobe != 'undefined' && adobe.target && typeof adobe.target.triggerView === 'function') { | |
adobe.target.triggerView(viewName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment