Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adobe Experience Cloud without AEM | Triggering Adobe Target SPA view
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
You can’t perform that action at this time.