Hi,
I have one query regarding setting the correct page name in adobe dtm.
how to set the page in dtm , how i will proceed?
Please help me in steps.
Thanks,
pay
Solved! Go to Solution.
Hi Pay,
You'd need to use either CSS selectors or JSON to scrape that information from the page. Once you've gathered those values from the page, you can use javascript to combine them into whatever format you'd like. You can combine them in the custom section of the data element and return them as the value you are looking for, or you could use multiple data element to store each value and combine them in the rule using the custom section.
Thanks,
Jantzen
There are a number of ways to set s.pageName for each page, In DTM, the conditions for your rules answer questions like: What’s the visitor doing? Where are they doing it? When is it happening? You can set any number of variables, trigger different tags or tools, and execute any number of scripts from within the same rule, as long as you want all those things to happen in response to the same conditions.
For example, if you want document.title to be the source for the value of the s.pageName variable, you could create a Data Element with a name of Page Name, a Type of JS Object, a Path of document.title, a Default Value of None, and Remember this value for Pageview.
Then, you could create a global Page Load rule and assign that Data Element to s.pageName, either in the interface, or in the Custom Editor code window. It will then be dynamically populated with the value of document.title for each page that meets your conditions.
Hi Ramesh,
Thanks for your quick reply.
I need one more help, if my customer has set wring page name and they want me to set the correct page like -
Previously page name- product:product:1
New Requirement - model:abcd123 like this they want result.
In that case how i will proceed, how i will create the data element for those.
Please help asap.
Thanks,
pay
Hi Pay,
You'd need to use either CSS selectors or JSON to scrape that information from the page. Once you've gathered those values from the page, you can use javascript to combine them into whatever format you'd like. You can combine them in the custom section of the data element and return them as the value you are looking for, or you could use multiple data element to store each value and combine them in the rule using the custom section.
Thanks,
Jantzen
Views
Likes
Replies
Views
Likes
Replies