Orientationchange in Adobe DTM for Adobe Analytics tool

Avatar

Avatar

azharu9843294

Avatar

azharu9843294

azharu9843294

24-05-2018

So I'm trying to get the orientationchange event in Adobe DTM to work and then fire an Adobe Analytics event. The built in orientationchange event in DTM is not working for me so I'm trying to implement my own solution. The code I've produced is:

(function () { var width = screen.width, height = screen.height; setInterval(function () { if (screen.width == height || screen.height == width) { width = screen.width; height = screen.height; alert("Orientation Changed"); } }, 50); }()); 

This is working as long as I place it in the JavaScript section. As soon as I place it in the Adobe Analytics Custom Code section it ceases to work. Is there a way that I can get an Adobe Analytics event to fire from the JavaScript section (adding s.events="event11" didn't work for me) or get this code to work in the Adobe Analytics custom code section?

Accepted Solutions (0)

Answers (0)