Highlighted

Tealium on Electron app

Silver Contributor
Silver Contributor

Is Electron supported by Tealium?

 

Any gotchas to be aware of?

6 REPLIES 6
Highlighted

Tealium on Electron app

Tealium Employee

Hi @giacomo_ritucci

 

For the benefit of others reading this post in future, Electron is a framework that allows cross-platform development of desktop apps with HTML/JavaScript/CSS.

 

While we don't have official support for Electron, it should be possible to integrate all the Tealium products with it in some way, but there will be some things to watch out for:

 

* I'm pretty sure that Electron apps lowill load resources from the local filesystem (file://protocol). In this case, if you were to use utag.js, none of the utag files would load correctly, because Tealium uses protocol-relative URLs, which would result in all remote resources being loaded locally, and therefore you'd see lots of 404 errors. Therefore, utag.js is not an option without significant modification of templates.

 

* The best option would be to integrate Tealium's UDH products, and use Cloud Delivery for Analytics. This would allow you to integate our "Collect" endpoint (vdata) by way of a simple pixel, which you can send each time an action is performed in the app. This will allow full use of AudienceStream, DataAccess and Cloud Delivery.

 

Does this help? Please let me know if you have further questions.

 

Craig.

Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

Tealium on Electron app

Silver Contributor
Silver Contributor

Thanks for your answer @craig_rouse.

 

I got past the first point by adding the https:// protocol in the Tealium tag and by setting the full path in the publish settings. Now I managed to load Tealium and the GA tag.

 

Now I need to setup GA for using localStorage to store the clientId value.

 

I guess that any other other tag that uses cookies would need a similar customization.

 

Should we choose to use the UDH solution, do we need anAudienceStream license?

Highlighted

Tealium on Electron app

Tealium Employee
@giacomo_ritucci the UDH/Cloud Delivery solution is a separate license. It's not included with either an AudienceStream or iQ license as standard. Please speak to your account manager if you need further information.

For the GA localStorage solution, you can now map the clientId variable in the GA tag, which will be passed along with the "create" call, so you can use an extension to set the value in localStorage, and then read the value into a TiQ variable, which is mapped to clientId in the GA tag. I hope this helps.

Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

Tealium on Electron app

Silver Contributor
Silver Contributor

Hi Craig,

 

 

thanks, now GA works as expected.

 

We notice a new problem on the Tealium side: since utag.js cannot write cookies, visit count is inflated and this would reflect in billing.

 

How can we set Tealium to correctly count visits without cookies?

Highlighted

Tealium on Electron app

Tealium Employee
@giacomo_ritucci There is currently no workaround for this, as this is not usually a supported configuration (we rely on the ability to use our single, first-party cookie in utag.js). The best approach would still be Cloud Delivery for this use case. Please speak to your account manager if you would like to discuss this further. Sorry I can't be more helpful on this occasion.

Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

Tealium on Electron app

Tealium Employee

@giacomo_ritucci, it might be worth to take a look at the electron-cookies package https://github.com/expo/electron-cookies as a possible way to interface utag.js cookie requirements into your electron app.