Highlighted

utag.js conflict with RequireJS

Rookie Contributor
An anonymous define() function in the utag.js from lines 322-323 creates an error with RequireJS that keeps our site from working properly. Is this something we can fix on Tealium's side, or should we go with the solution proposed here? http://requirejs.org/docs/errors.html#mismatch Our developers recommend loading utag.js via the RequireJS API, which is not ideal since it would bring it to the bottom of the page instead of the top of the body where it currently is.
5 REPLIES 5
Highlighted

utag.js conflict with RequireJS

Tealium Employee
We may need more details here. Do you have a JS Code Extension in Tealium IQ that is creating the "define" function?
Highlighted

utag.js conflict with RequireJS

Rookie Contributor
Not that I know of. It's coming from these lines within the utag.js under the /*global unescape, define, utils */ section: if (typeof define === 'function' && define.amd) { define(function () { return md5; });
Highlighted

utag.js conflict with RequireJS

Rookie Contributor
And here is the error that pops in the console: Error: Mismatched anonymous define() module: function () { "use strict"; return md5; }
Highlighted

utag.js conflict with RequireJS

Tealium Employee
I found your code block in this library: https://github.com/blueimp/JavaScript-MD5/blob/master/js/md5.js Maybe someone has pasted this library in a JS Extension? (or a pasted in a library that uses this md5 library)?
Highlighted

utag.js conflict with RequireJS

Rookie Contributor
Argh! Found it. This code is included in the Adobe Heartbeat code for video measurement. Thank you!