Hi @Davapriya - welcome to the forum.
What's your specific question? What's the final goal you're trying to accomplish in your implementation?
I would recommend taking some time to learn how Tealium works, order of operations, user interface, UDO, etc.
Start here to learn the data layer:
https://community.tealiumiq.com/t5/JavaScript-utag-js/How-the-Universal-Data-Object-utag-data-Works/ta-p/15369
Regarding the large chunk of code you've pasted here, generally the goal in Tealium TMS is to minimize the addition of huge chunks of raw javascript code unless absolutely necessary and to instead use the user interface and canned extensions to accomplish the tasks. It might help to break down your code block into smaller chunks for translation into extensions. A quick look at your code makes me think that it is part of your app's logic, not part of tag management/data collection logic.
Best of luck - come back with more questions and ideas and we'll work to help. Don't forget you can open a support ticket for Tealium engineers to help you as well, depending on the terms of your agreement with Tealium.
... View more