I want to integrate WURFL.js as an extension for mobile device recognition. How would I do that?

Silver Contributor
Silver Contributor
WURFL.io provides a handy JS API for advanced mobile device detection. See www.wurfl.io for details. The HTML Code to integrate the script would be <script type='text/javascript' src="//wurfl.io/wurfl.js"></script> This results in a Javascript object called WURFL which supports getting advanced device information such as complete name, form factor and "is_mobile". I want to use this as part of an extension. What would be the best way to add it?
3 REPLIES 3

I want to integrate WURFL.js as an extension for mobile device recognition. How would I do that?

Tealium Employee
Hi Andreas, I would probably start with using the Tealium Generic Tag container and/or download the source code and host it inside the template depending on whether it is required to be hosted at their servers. If you go to the tag eco-system and search for "tealium" you will find it. Kind regards, Kevin

I want to integrate WURFL.js as an extension for mobile device recognition. How would I do that?

Employee Emeritus
That is an amazingly compact piece of code. You could paste the code source into a Javascript Extension (PreLoader scope) and follow by this code below: (check with them for permission to copy.) // Copy/paste wurfl.js source code // ... // After WURFL object is created, copy WURFL to data layer utag_data.is_mobile = WURFL.is_mobile; utag_data.form_factor = WURFL.form_factor; utag_data.complete_device_name = WURFL.complete_device_name;

I want to integrate WURFL.js as an extension for mobile device recognition. How would I do that?

Tealium Employee
Agree with Ty. If you want this library loaded on every page, pre-loader is the way to go.
Public