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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Orientationchange in Adobe DTM for Adobe Analytics tool

Level 1
Level 1

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"event11" didn't work for me) or get this code to work in the Adobe Analytics custom code section?

0 Replies