Troubleshooting

When setting up EzoicAds on your site, it's important to ensure that everything is functioning properly. We provide a built-in JavaScript Integration Debugger that allows you to quickly diagnose issues with your ad setup. Below is a step-by-step guide on how to use this debugger and interpret its outputs.

Step 1: Trigger the Debugger

To activate the debugger, simply append the following query parameter to the URL of the page where your EzoicAds are integrated:

ez_js_debugger=1

For example:

https://www.yourwebsite.com?ez_js_debugger=1

Once the query parameter is added and the page loads, a green modal dialog will appear at the bottom center of the screen. This is the JavaScript Integration Debugger.

Step 2: Understanding the Debugger Output

The debugger modal contains several key pieces of information that will help you troubleshoot your setup. Here’s a breakdown of the information provided:

  • Script Detection: The debugger will check if the Ezoic script is correctly included on your page. If the script isn't found, you'll see an error message. Ensure that the Ezoic script tag is placed in the right location on your page.

  • Placeholder Detection: The number of defined placeholders on your page will be displayed. This helps verify whether the placeholders have been successfully recognized by the Ezoic system.

  • Ad Status: For each placeholder, the debugger will indicate whether an ad has been successfully rendered. It shows:

    • Whether an ad is assigned to a specific placeholder.
    • If a request was sent to Ezoic to retrieve an ad for that placeholder.
  • Request Success: The debugger also monitors whether the ad request was sent successfully. If there’s an issue, the modal will display error details to help identify the root cause (e.g., network problems, misconfiguration).

Step 3: Using the Debugger for Troubleshooting

The information provided in the debugger modal is invaluable for diagnosing common issues such as:

  • Ads Not Displaying: Check the placeholder detection and ad status to ensure placeholders are defined and ads are assigned.

  • Ad Requests Failing: If ad requests aren't being sent or are failing, the debugger will provide error messages that point to potential misconfigurations.

  • Script Loading Issues: If the script isn’t properly loaded, verify that the script tag is present in your source code and correctly configured.

Conclusion

The EzoicAds JavaScript Integration Debugger is a simple but powerful tool to help you ensure that your ad setup is functioning as intended. By following these steps, you can quickly identify and resolve common issues, ensuring that your ads display properly and without disruption.