This tutorial demonstrates how to generate a log from your site code. We will then view the generated log using Wix Logs.
In this tutorial, we will:
Note: In this tutorial, logs are generated from page code. However, you can also generate logs from code that runs on the site backend.
Add a button to your site and create an event handler:
Add a button labeled button1
to your site's home page.
In the site's home page code, add an event handler that runs whenever the button is clicked:
Preview or publish your site.
Note: You can generate logs when previewing your site, but some log information is available only when your site is published.
Generate a log and view it using Wix Logs as follows:
In a separate browser tab or window, open the Wix Logs dashboard page.
In your live site's homepage, click the button you created:
The log appears in the Wix Logs page:
Click the log to view its full details:
You can also view the site logs for frontend events in your browser's console: