Skip to main content
Solved

Setting event timestamp during import


Forum|alt.badge.img

Hello,

 

We have a stack using hightouch, rudderstack, and amplitude to import order data to amplitude.

 

When an event is created in amplitude, it seems to use the timestamp when it is imported, not a designated timestamp.  Am I missing something or can this value not be set?

Best answer by Yuanyuan Zhang

Hi @Ben Wright

I believe that rudderstack send in data through our HTTP v2 API. With this API, Amplitude uses the key “time” in the JSON event object to determine event time. 

time Optional. The timestamp of the event in milliseconds since epoch. If time isn't sent with the event, then it's set to the request upload time.

 

I checked the raw data for one of your projects, and saw the “time” field was passed with valid values. An example value is: 1685034104000. 

Could you please check with rudderstack what values they are passing to Amplitude for the “time” key? Thanks. 

View original
Did this topic help you find an answer to your question?

6 replies

Esther Trapadoux
Community Manager
Forum|alt.badge.img+9

@Ben Wright welcome! I’ve asked our technical team to dig into this for you.


Saish Redkar
Expert
Forum|alt.badge.img+10

Hey @Ben Wright 

I looked up some docs and here’s what I found.

Are you selecting the event timestamp column before syncing or is it empty?

 


Forum|alt.badge.img
  • Author
  • Novice
  • 4 replies
  • June 1, 2023

@Saish Redkar we set a timestamp to the created_at field in rudderstack at the time of sync. We also tried a few other variable names like time and event_time with no change.


Yuanyuan Zhang
Team Member
Forum|alt.badge.img+5

Hi @Ben Wright

I believe that rudderstack send in data through our HTTP v2 API. With this API, Amplitude uses the key “time” in the JSON event object to determine event time. 

time Optional. The timestamp of the event in milliseconds since epoch. If time isn't sent with the event, then it's set to the request upload time.

 

I checked the raw data for one of your projects, and saw the “time” field was passed with valid values. An example value is: 1685034104000. 

Could you please check with rudderstack what values they are passing to Amplitude for the “time” key? Thanks. 


Forum|alt.badge.img
  • Author
  • Novice
  • 4 replies
  • June 2, 2023

 

@Yuanyuan Zhang I’ve passed the time property in the order completed event here.  But you can see that the timeline and event time use the sync timestamp (created_at). 

 


Yuanyuan Zhang
Team Member
Forum|alt.badge.img+5

Hi @Ben Wright

Passing “time” as an event property will not work. “Time” is a key that should not be included under user property or event property, the general structure should look like this:

"api_key": "xxxxxxxxxx”,
      "raw_data": [
        {
          "app_version": "",
          "device_model": "",
          "os_version": "",
          "device_type": "",
          "language": "",
          "device_carrier": "",
          "device_manufacturer": "",
          "event_type": "xxx",
          "insert_id": "xxx",
          "user_id": "486448",
          "device_brand": "",
          "os_name": "",
          "time": 1684524688000,
          "event_properties": {XXXXXX}


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings