Build a Dashboard Page to Manage Your Site Plugin

When building a site plugin, you may want to provide users with a back office management interface for the plugin. You can create one either within the Wix dashboard, or as an external dashboard on a third-party platform. Learn about building a dashboard page extension

Add your plugin to a slot from a dashboard page

To let users add your plugin to their site through your app's dashboard page, create a user interface that triggers the Wix Dashboard API's addSitePlugin() function. Specify the desired slot when calling this function. This initiates a user flow where Wix requests the user's consent to add the plugin. If the selected slot is already occupied, the user can choose to replace the existing plugin with your plugin. Plugins for the checkout page must implement this functionality to enable users to add the plugin to their site.

Depending on the framework you're using to develop your dashboard page, use one of the following APIs:

The addSitePlugin() function takes the following parameters:

  • pluginId: ID of your site plugin, which you can find in your app's site plugin extension. To view the extension, go to your app's dashboard in the Wix Studio workspace.
  • placement: Details of the slot in which you want to add the plugin, including the hosting app's appDefinitionId, and the relevant widgetId and slotId. Learn more about the locations and identifiers of slots that are available on Wix app pages.

The following example shows how to use Velo in Blocks to add a site plugin to the checkout page when a user clicks an Add Plugin button in the dashboard:

Copy
1

Check your plugin's placement status

You can check whether your plugin is currently placed in a slot on a specific site. Depending on the framework you're using to develop your dashboard page, use one of the following APIs:

Both APIs return an array of objects indicating whether each of your app's site plugins is currently placed in a slot on the user's site.

For example:

Copy
1
Was this helpful?
Yes
No