This article shares some possible use cases you can support, as well as an example flow that supports each use case.
You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your implementation.
For detailed instructions, see Add an Embedded Script Extension to a Self-Hosted App.
To listen to the predefined Wix event clickProduct
, add it to your embedded script code.
Create an Embedded Script extension in your app and select a script type.
For example:
Replace <APP_ID> with your own unique app ID, as found in the OAuth page of your app's dashboard.
Listen to the to App Instance Installed.
When a Wix user installs your app, call Embed Script to embed the script in their site, with the relevant values for your dynamic parameters.
For example:
When a site visitor clicks a product, your function will run.