React.js Web integration

Rookie Contributor

I have seen old posts asking about how to do a React.js implementation but there was no real answer. Is there a recommended approach to including Tealium Utag in a React.js (NOT React Native) Web/Electron app? I see Angular etc. wondering whats best practice to get reference to the utag instance?

What I have done so far: Included the scripts to load the utag.js provided in the `code center`, this loads fine and testing it on the website things work fine I can call the utag via window:

window.utag.link({...etc})

however I've tried using the exact same script in the electron version of the app, and the bundled tags/extensions (utag.3.js utag.18.js etc..) fail because the request url is set to file:// rather than an external source, is there a way to tell it to make a http request for the files not locally?

1 REPLY 1

React.js Web integration

Bronze Contributor
Bronze Contributor
I know this is an old question but it never got an answer but it seems to rank hi (for me at least) when searching for reference material for Tealium and React.js.

For anyone wanting some guidance, check https://docs.tealium.com/platforms/javascript/single-page-applications/ as a nice, generalized guide for making this work in your app/site.
__________
Phillip Marquez
Public