DTM not capturing variables set on page

Avatar

Avatar
Validate 1
Level 2
chads47842055
Level 2

Likes

3 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
chads47842055
Level 2

Likes

3 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
chads47842055
Level 2

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
Contributor
Level 3
Jason_Egan
Level 3

Likes

19 likes

Total Posts

11 posts

Correct reply

5 solutions
Top badges earned
Contributor
Shape 1
Ignite 1
Boost 5
Boost 3
View profile

Avatar
Contributor
Level 3
Jason_Egan
Level 3

Likes

19 likes

Total Posts

11 posts

Correct reply

5 solutions
Top badges earned
Contributor
Shape 1
Ignite 1
Boost 5
Boost 3
View profile
Jason_Egan
Level 3

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)