// Wrapper function as seen inside of angular js integration
var track = function( ev, data ) {
var data = data || tealiumData.getDataLayer( $location.path() );
var ev = ev || "view";
var src = config.script_src;
if ( typeof utag == "undefined" ) {
getScript( src, function(){
utag.track( ev, data )
})
} else {
utag.track( ev, data )
}
};
Nothing for React/Redux specifically (yet), but the pattern should be similar to the following (if you'd like to build and share),..
(1) Create a tracking wrapper function that accepts an eventName, and dataLayer object of key/values)
(2) If the utag.js file is loaded, fire utag.track( eventName, dataLayer ); // eventName is typically "view" for a content-viewed event
(3) If the utag.js file is not-yet-loaded, get the utag.js script and fire utag.track when it completes
For more reading: