- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Has anyone referenced session storage variables in any data field created, or javascript extension for a browser?
If yes what are the options of doing so?
Thanks in advance.
Robert
Hi @robert_wing, by default Tealium does not leverage session storage, but our Data Layer Enrichment service for AudienceStream does, as well a page performance feature that we have leverage local storage. Both are required opt-in features.
I guess the point I'm trying to make is that the iQ library is JS based, so code can easily be written to make use of any browser storage option leveraging the JavaScript extension. Just remember that session/local storage is sub-domain based so if you move from www. to shop. the storage does not persist between.
I invite any user to state specific examples.
Assuming you Window.sessionStorage it is pretty straightforward to access that within the Tealium IQ data layer. Using a Javascript Extension in Tealium you can set map it to the b object. Lets say you have a sesion storage value of user type. The code extension would look something like this:
b.userType = sessionStorage.getItem('userType');
Then it would just be a matter of including userType as a variable in your data layer and you are good to go.
Copyright All Rights Reserved © 2008-2023