- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-31-2018 08:16 AM - edited 10-31-2018 08:18 AM
Because variables are set once during the loading of a tag, the timestamp always contains the time the tag was loaded.
I want to send an event with a Custom dimension, containing the timestamp the event occurred. So we can analyze the order in which the events occurred.
4:00 PM - User opened page
4:01 PM - User visited an article
4:05 PM - User initiated a chat
gtag.event(x, y, z, custom-dimension-i-->timestamp)
But it would be much easier for us to maintain by having this set up through one extension in Tealium IQ. Otherwise we would have to continuously change each event trigger function, everytime we wanted to change the way timestamps are registered.
I spend a lot of time, and have attempted a lot of hacks to try and get the occurrence timestamp. But I have given up. There has to be an easier way. I hope someone here can assist me.
10-31-2018 08:27 AM
One of the wacky things I have tried was:
Unfortunately b.UnixTime did not seem to be the correct reference to the UDO variable that I declared in my DataLayer.
10-31-2018 12:23 PM
Each event that occurs with Tealium should already have a unique timestamp applied to it, even those post page view events. If you map any of the following UDO variables to your custom dimension it should do the unique event timestamp you are looking for:
Please give this a try and let me know how it works for you.
10-31-2018 01:09 PM
Thank you for your reply!
I had tried this before, but for good measure I've tried it again.
I've mapped tealium_timestamp_epoch to a custom dimension.
And it is sent with each event, as expected.
However, the value of this timestamp is always the same. (The time at which the variable was set, not the time at which the event was triggered.)
So when I load a page, each event I trigger has the same timestamp. Rather than incremnetal timestamps of at which they were fired at.
Did I miss something?
11-01-2018 10:52 AM
I am seeing the timestamps work correctly on my demo site.
If I visit http://www.tealiumecommerce.com/ the page load timestamps are:
Then if I click the add to cart button the event timestamps are:
I'm curious which version of utag Loader template you may be using?
Would you be able to screenshot the event data you're seeing passed through? Are there steps to reproduce as well? If not, then you may need to reach out to the AM team to get technical support.
11-02-2018 02:01 PM
Woah, I'm glad that it's possible the way I had anticipated this to work.
I'm using utag loader template 4.46.
I'm unable to post more details right now, I'll get back to this on monday with my setup and some steps.
Thank you for your help thus so far!
Copyright All Rights Reserved © 2008-2023