Expand my Community achievements bar.

SOLVED

DTM not capturing variables set on page

Avatar

Level 2

We have a website that we are migrating to DTM and have decided not to move all the variable-setting page code into DTM. For example:

                            
<script type="text/javascript">
  
 s.prop14 = s.eVar12 = !s.prop14 && window['readCookie'] && readCookie("ouid") || s.prop14;
 // Assume current user has the same account as before
 s.eVar58 = window['readCookie'] && readCookie("ut") || "";
  
 </script>

For some reason, DTM does not want to process that information. It appears to be skipping anything that is an s object outside the s_code that is hosted within DTM. Has anyone seen this before or can anyone offer any thoughts as to why it isn't setting those variables that are in the page code?

Thanks,
Chad

 

1 Accepted Solution

Avatar

Correct answer by
Adobe Champion

No problem, Chad. More often than not when a site is transitioning, you have valuable data on the page that you still want. In those cases, my first recommendation is to change the vars as I mentioned. If that's too difficult, I'd recommend changing the object in DTM to something other than "s" while ensuring that your vars on the page still have s defined so that they don't error out, and then set those as data elements in DTM and assign as needed in your rules.

- Jason

View solution in original post

1 Reply

Avatar

Correct answer by
Adobe Champion

No problem, Chad. More often than not when a site is transitioning, you have valuable data on the page that you still want. In those cases, my first recommendation is to change the vars as I mentioned. If that's too difficult, I'd recommend changing the object in DTM to something other than "s" while ensuring that your vars on the page still have s defined so that they don't error out, and then set those as data elements in DTM and assign as needed in your rules.

- Jason