Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

DTM not capturing variables set on page

chads47842055
Level 2
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
Jason_Egan
Correct answer by
Level 3
Level 3

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
Jason_Egan
Correct answer by
Level 3
Level 3

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