How to Use the Privadsy WebSDK in WordPress (Part 2)

Author

Burak Esen

Date Published

Introduction

Using the Privadsy WebSDK in WordPress allows you to seamlessly display Billboards on your site. This tutorial will guide you through the integration process, ensuring you can set up and manage Billboards without any hassle. You don’t need any advanced technical skills—just follow these steps.

Step 1: Prepare Your Platform

Before integrating the WebSDK into WordPress, ensure that you have created a platform and obtained the PlatformID using the steps outlined in our previous guide. Copy the PlatformID to your clipboard.

Step 2: Add Custom HTML to Your WordPress Site

Log in to your WordPress dashboard.

Navigate to Appearance > Widgets if you want to add the Billboard to a widget area.

Alternatively, to add the Billboard to a specific page or post, navigate to Pages or Posts and select the desired item.

Use the Custom HTML block or widget, depending on your chosen location.

Step 3: Insert the WebSDK Code

• Copy the following template code:

1<script
2 src="https://cdn.privadsy.com/scripts/web-sdk/latest/script.min.js"
3 data-platform-id="YOUR_PLATFORM_ID"
4 defer
5></script>
6<div data-itemview></div>


• Replace YOUR_PLATFORM_ID with the actual PlatformID you copied earlier.

• Paste the modified code into the Custom HTML block or widget.

• Click Save or Update to apply the changes.

Step 4: Verify Your Integration

• Visit your site and navigate to the page or widget area where you added the Billboard.

• Ensure that the Billboard appears correctly. If it doesn’t display, try refreshing the page or clearing the cache.

Troubleshooting

  • Billboard Not Showing Up: Make sure you correctly pasted the PlatformID and that the WebSDK script is loaded without errors.
  • Styling Issues: Use CSS to adjust the size and position of the Billboard. You can add custom CSS through the WordPress Appearance > Customize > Additional CSS option.

Conclusion

By following these steps, you can easily integrate the Privadsy WebSDK into your WordPress site. With just a few adjustments, your Billboards will be live and ready to boost engagement. If you encounter any challenges, feel free to check our support resources.

Happy integrating!