Skip to content

How to inject User/Sub account Properties in Iframes on Account Dashboards

You can now enhance your Stack dashboard by embedding dynamic content using iframes. This guide will walk you through the process of injecting user or account properties into your iframes.

Begin by opening your Account Dashboard. Switch to Edit mode to start customizing your dashboard.

Once you’re in Edit mode, locate and click on the Objects section.

From the Objects menu, select the Embed option to proceed with embedding content.

Input the URL of the content you wish to embed into your dashboard. This will serve as the source for your iframe.

After entering the URL, you can add specific parameters to tailor the embedded content to your needs.

To make your embedded content dynamic, you can inject account or user identifiers directly into the iframe source. Use placeholders such as {{location.id}} or {{location.name}} within your URL to achieve this flexibility.

For instance, you can create a dynamic URL like this:

https://app.stack.com/v2/location/`{{location.id}}`/conversations

This URL can be embedded as an iframe on your dashboard, allowing it to dynamically adjust based on the account or user.

Stack supports various user properties that can be included in your URL. Replace the userpropertyhere in {{user.userpropertyhere}} with any of the following:

  • companyId
  • email
  • phone
  • role
  • type
  • firstName
  • lastName
  • name
  • fullName

For example, to pass a user’s first name in the URL, you could use:

https://yourwebsiteurlhere.com/?user=`{{user.firstName}}`

Utilize these steps and properties to create a personalized and dynamic experience on your Stack dashboard.

Can't find what you need? Call or text +1 787 665-9212 or email support@stackapp.co.© Stack · Privacy · Terms