I'm trying to understand how to use duration metri...
# ask-questions
I'm trying to understand how to use duration metrics. If we would like to measure the time it takes between a signup to the site and conversion (let's say we have a timestamp for both), how should the "duration" type metric SQL (default example below) be structured? Should we calculate the difference between the two timestamps and put it under "duration" ?
Copy code
  user_id as user_id,
  anonymous_id as anonymous_id,
  duration as value,
  received_at as timestamp
The value column should be number of seconds. So in your case you would join signup and conversion tables and select the date diff in seconds. We should change that default example to
duration_in_seconds as value
to make that more clear.