Highlighted

Can I set tag firing rules based on device OS? Such as only fire a tag for iOS device? Does Tealium have way to read http header information?

Rookie Contributor
 
2 REPLIES 2
Highlighted

Can I set tag firing rules based on device OS? Such as only fire a tag for iOS device? Does Tealium have way to read http header information?

Employee Emeritus

Hi Chen, Tealium can't read HTTP headers as those are readable by the server only. Tealium runs strictly client-side. You'd have to have the server echo out the header information you want as a property in the UDO or some other JavaScript variable that would make it accessible. We can however access the values in the navigator.userAgent, which is what Patrick based this answer on here: https://community-beta.tealiumiq.com/t5/Mobile/How-do-you-build-a-load-rule-for-mobile-only-devices/... You could do something similar if you want to limit firing based to iOS devices only. If you need help writing the regular expression for your specific case, please contact your Account Manager.

Highlighted

Can I set tag firing rules based on device OS? Such as only fire a tag for iOS device? Does Tealium have way to read http header information?

Employee Emeritus
you can use a set data extension with the input set to javascript (/ipad|iphone|ipod/i).test( navigator.userAgent )?"true":"false"; (/android/i).test( navigator.userAgent )?"true":"false"; (/bb10/i).test( navigator.userAgent )?"true":"false"; etc... if you need these as load rules, you'll need to use a javascript extension scoped to preloader and set these as window.vars so you can use them as load rules Hope this points you in the right direction