A Dashboard component is added to the Wix user’s dashboard area—not to the website. It is added as a full page in the dashboard and is visible only to the user. Dashboard components also support deep linking.
With the Dashboard component, you can offer services to help users manage and grow their business beyond the website.
- Users can see your app in the Dashboard App Market and then add it to their dashboard area.
- Users will have to grant permission for your app once they add it.
- Users manage your app through their website’s dashboard.
- Users can add a Dashboard component only once.
- Only users can see and use the Dashboard component.
- Deleting the app will revoke the app permission.
A Dashboard consists of one part:
- The Dashboard iframe: The Dashboard’s content is provided as an iframe embedded in the user’s dashboard.
The App Instance is a signed parameter that allows you to identify the website and the Wix user, and verify that the calling party is indeed Wix. Each request to the Dashboard iframe includes the App Instance ID parameter as part of the iframe URL. Use the App Instance ID as the identifier for the user.
The Dashboard iframe opens as a full page. Any change to the iframe height will automatically be reflected in your app page.
A Dashboard component supports deep linking for its internal pages. Deep linking enables your app to update the content of your iframe without refreshing the whole iframe.
If the browser is showing this URL: http://www.wix.com/my-account/site/<metaSite>/app/<appID>?queryParams
when you call the method: Dashboard.pushState(“AppState”) the browser URL will change to http://www.wix.com/my-account/site/<metaSiteId>/app/<appID>?queryParams&appState=<appState>
but your Dashboard iframe will not reload.
When there is a request to render your Dashboard iframe with an internal state, Wix will call your Dashboard endpoint with the internal state as part of the iframe’s URL in the app-state path variable. You should load your Dashboard component at the intended internal state.
When a user clicks on a link with a URL such as:
We will load your Dashboard iframe using the URL:
If you want to notify a user about something that happened in your app or an action they should take, you can direct them to your app in a specific Wix site. Use the following URL:
Users can duplicate their site, which means that apps should be added to the duplicated site with their existing content and settings (not the default data).
Here’s what you should do:
- Check if the app is being copied from another site. When your app endpoint is called, check if the instance parameter has an originInstanceId property. If it does, this means that the app is being copied from another site. The value of originInstanceId is the instanceId of the app in the original site.
- Copy the content and settings of the app. Get the correct settings of the original app using its instanceId (the originInstanceId property).
In some cases, there may be content that shouldn’t be copied over between sites. Not sure if something should be copied? Talk to your account manager.
Query parameters for the Dashboard iframe:
|endpoint||The Dashboard URL, as supplied when you registered your app in the Dev Center. Make sure your dashboard URL uses HTTPS.|
|The signed instance|
|Current locale value|
|The cacheKiller is there to ensure no caching of the iframe content by the host browser|
|siteUrl||The address of the site the application is connected to||Relevant only if the site has already been published|
|Boolean indicating if the site is published|