Guys last week am struggling with implementing page view in adobe analytics
These are the things in had done so far
Added adobe scripts in header and added an object like
const data = {
page: {
pageInfo: {
pageName: "",
},
},
};
function adobeONPageLoad(name) {
try {
if (name !== undefined && email != undefined) {
data.page.pageInfo.pageName = name;
window.digitalData = Object.assign(window.digitalData, data);
console.log("test", window.digitalData);
window._satellite.track("Page Load");
return true;
}
} catch (error) {
console.log("error);
}
}
and added a useEffect in home component and call one of the function like below
useEffect(() => {
adobeONPageLoad("Home");
}, []);
But its not triggering unless i reload page again. Also i do have another tabs , which will show another content but when i navigate to other tabs , no page-view get triggered only exit comes which i guess is the default behavior.
My Requirement is whenever i take another tabs from home page , it should fire new page view in omniture and update the new page name , which is not trigering by default , again when i reload page ,its coming , but i guess its not the right one , i even gave a click function , but that too is not coming in adobe analytics.
Mine is a React SPA application
Any feedback or helps is really appreciated , since am fed up with this