DTM not capturing variables set on page

Avatar

Avatar

chads47842055

Avatar

chads47842055

chads47842055

15-10-2015

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

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jason_Egan

Avatar

Jason_Egan

Jason_Egan

15-10-2015

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

Answers (0)