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

 

View Entire Topic

Avatar

Avatar

Jason_Egan

Avatar

Jason_Egan

Jason_Egan

15-10-2015

Chad,

Are you trying to use the "Code Exists on the Page" option with in DTM, or are you letting DTM manage the analytics library and trying to set vars directly on the page using s.propX in addition to what you're in a DTM implementation?

If you're migrating anyway, I'd also suggest ditching the "s" object on the page in favor of something else that's not specific to Adobe nomenclature. Something along the lines of:

analytics.userAccount="[cookie value]";

Then setup a data element and in fact do it in DTM.

But, I think it would help if you could elaborate a little more on exactly how you are migrating.

- Jason