Using Launch to populate data elements from an AEM data layer.
I have an issue in Launch accessing the AEM data layer. The some of the data elements are not being populated. Here's the DL object:

I added pageName to a data element and pageTemplateName to another one, but they are not being populated. I tried a "direct" approach:
return window.adeptDataLayer.getState().page.pageInfo.pageName;
I got this error message:
Cannot read property 'pageName' of undefined TypeError: Cannot read property 'pageName' of undefined
I tried various ways to convert the object to text but it didn't solve the problem. Currently the s.pageName variable is populated by this other data element but it's pulling the wrong object:
var tx = adeptDataLayer.getState().page;
for (var key1 in tx){
var myPage="";
myPage=tx[key1]["dc:title"];
}
return myPage;
I tried changing the "dc:title" element to "pageName" but that also gave me the type error.
What should I try?