How do I make my dashboard timezone listen to the timezone defined in my embed URL?

Knowledge Drop

Last tested: Nov 2020

  1. Enable User-Specific Timezones in the Admin panel.

  2. Add the user_timezone as one of the embed URL parameters when generating the embed URL.

  3. After the embed URL loads the dashboard, the embed user can switch to Viewer Timezone in the timezone dropdown menu at the top right.

But what if i want to have the embed dashboard loaded with the user-specific timezone by default?

Steps 1 and 2 stay the same. Instead of having the embed user switch the timezone in Step 3, use one of the following options.

Option 1: Save the dashboard with the default timezone "Viewer Timezone". This will use the user's timezone as default for both embed users and non-embed users.

Option 2: We can add &query_timezone=user_timezone as part of the dashboard URL. This will make the user's timezone selected by default even if it is not the saved default timezone for the dashboard. Note that the user_timezone is one of the embed URL parameters, but the query_timezone is not an embed URL parameter; it is part of the target URL.

Example of correct body for create_sso_embed_url call:

{"target_url":"https://instance.looker.com/dashboards/1527?query_timezone=user_timezone","external_user_id":"1024","permissions": ["access_data", "see_user_dashboards"],"models": ["the_model","mysql_model"],"user_timezone":"America/New_York"}

Resulting URL: https://instance.looker.com/login/embed/%2Fembed%2Fdashboards%2F1527%3Fquery_timezone%3Duser_timezone?permissions=%5B%22access_data%22%2C%22see_user_dashboards%22%5D&models=%5B%22the_model%22%2C%22mysql_model%22%5D&signature=dSJvLa12HrrRm55wVuriAS88vqk%3D&nonce=%229efba36c2749dd09c4b7dc193e391f54%22&time=1606708248&session_length=300&external_user_id=%221024%22&access_filters=%7B%7D&force_logout_login=true&user_timezone=%22America%2FNew_York%22

Example of INCORRECT body:

{"target_url":"https://instance.looker.com/dashboards/1527","external_user_id":"1024","permissions": ["access_data", "see_user_dashboards"],"models": ["the_model","mysql_model"],"user_timezone":"America/New_York","query_timezone":"user_timezone"  #DON'T DO THIS}
Comments
mallik_reddy-16
Explorer

Although the user timezone is set and query_timezone is passed as mentioned above, when creating a new tile in a dashboard, the timezone is set to Application timezone

Version history
Last update:
‎06-04-2021 05:37 PM
Updated by: