Articles on: Developers

Widget API

The Changelogfy In-App Widget, provide interface to interact with widget.



Open


This method will open the widget

changelogfy.open();


Close


This method will close the widget

changelogfy.close();


Manual initialize


This method init will initialize manually the widget, but you need set init to false.

var CLF_config = {
  selector: ".changelogfy-widget",
  app_id: "YOUR_APP_ID",
  init: false, // required
};

changelogfy.init(CLF_config);


Callbacks


The Changelogfy In-App Widget supports callback, its helpful to some custom integrations.

var CLF_config = {
  selector: ".changelogfy-widget",
  app_id: "YOUR_APP_ID",
  callbacks: {
    onReady: function () {
      console.log("widget ready");
      console.log(`unread entries count: ${changelogfy.getUnreadCount()}`);
    },

    onOpen: function () {
      console.log("widget opened");
    },
    onClose: function () {
      console.log("widget closed");
    },
  },
};


Destroy


This method will destroy the widget

changelogfy.destroy();


Logout


Clear all data created from changelogfy

changelogfy.logout();


If you still have questions, please contact us by chat.

Updated on: 03/30/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!