Our New JS API and HTML Attributes Are Here!

4 min. readlast update: 10.17.2023
Don't have an OpenWidget account yet? Don't worry! We prepared a dedicated article that will guide you through the entire process. Click here to check it out!

At OpenWidget, we're committed to enhancing your online customer engagement and providing tools that simplify your interaction with visitors. Today, we're excited to unveil two new features that put you in the driver's seat when it comes to creating custom interactions with the OpenWidget – the JavaScript API and HTML Attributes options.

undefined

JavaScript API: Tailoring Interactions to Your Needs

We understand that each business has unique requirements, and developers often want more control over how widgets behave. That's why we're thrilled to introduce the JavaScript API for OpenWidget. This powerful tool empowers developers to create custom interactions and controls for the OpenWidget on your website or app.

With the JavaScript API, you'll have the ability to:

  • Minimize: Collapse the OpenWidget to a discreet bubble (OpenWidget's launcher) – shape recognized by millions across the web.
  • Maximize: Expand the OpenWidget to its full view.
  • Hide: Conceal the OpenWidget temporarily.
  • Destroy: Remove the OpenWidget completely, making it unavailable until your customer refreshes a page or an app.

What's more, with the JS API, you can now use our new AsyncInit option to load your OpenWidget on demand, useful when you'd like to trigger the widget after your customers agree to cookies or only after they are logged into your app.

This API caters to developers who seek to fine-tune the widget's behavior, giving you the flexibility to design interactions that align with your specific user experience goals.

HTML Attributes: Effortless Customization with No Coding Skills Required

We understand that not everyone is a developer, yet we also believe that customization should still be accessible to all. Say hello to our new HTML Attributes – a user-friendly solution that empowers anyone to create tailored interactions without delving into JavaScript. These attributes can be added directly to elements like buttons on your website or app.

With a straightforward process that does not require knowledge of JavaScript, you will be able to create simple buttons triggering interactions that will allow your customers to, for example, maximize your OpenWidget and be redirected straight to a Contact Form, Feedback Form, Bug Report or your Frequently Asked Questions (FAQ) Template.

Don't believe us? With just those three easy steps:

  1. Add the data-openwidget-action attribute to your button element.
  2. Choose from two actions: minimize or maximize.
  3. Optionally, include the data-openwidget-feature attribute if you're maximizing and want to open a specific OpenWidget feature.

You can modify or create a new button that will maximize the OpenWidget and open the Contact Form feature. Here's a simple example of how it looks like:

<button type="button" data-openwidget-action="maximize" data-openwidget-feature="form-contact">Contact us</button>

We Have a Dedicated Documentation for Developers (and not only!) As Well!

To learn more about these new features and how to implement them, visit our comprehensive Developers Documentation. Together with the included Developers Guide section, our docs should answer the questions like: 

  • How to get started with JS API?
  • How to create a custom button using our HTML Attributes and add it to WordPress?
  • What are the most common scenarios when it comes to using AsyncInit?

We're excited to see the creative ways you'll use these features to enhance your online presence!

Start Enhancing Your OpenWidget Experience

We believe in empowering you to craft the ideal user experience for your customers. Whether you're a developer looking to fine-tune interactions or someone seeking a no-code solution, our new JavaScript API and HTML Attributes options have got you covered. These features seamlessly integrate with OpenWidget, allowing you to effortlessly create the interactions you envision.

Don't have an OpenWidget installed on your website yet? We're here to help! We prepared a dedicated article that will tell you how to add it to your site. Click here to check it out!

Stay tuned for more updates as we continue to evolve and refine OpenWidget to better serve your needs. Thank you for being part of our journey to enhance customer engagement and provide you with the tools to succeed.

Was this article helpful?