Widget API
The Changelogfy In-App Widget, provide interface to interact with widget.
It will clear the local storage and cookies related to the current user.
Open
changelogfy.open();
Close
changelogfy.close();
Disable the "Badge Alert"
let CLF_config = {
app_id: "YOUR_APP_ID",
alert: false,
};
Manual initialize
let CLF_config = {
selector: ".changelogfy-widget",
app_id: "YOUR_APP_ID",
init: false, // required,
callbacks: {
onLoaded: function () {
window.changelogfy.init();
},
},
};
Update User Data on the fly
changelogfy.user.update({
user_id: "123456", // required
user_name: "Paulo", // required
user_email: "paulo@changelogfy.com", // required
custom_data: {
company: "Changelogfy",
website: "https://changelogfy.com",
},
});
Clear User Data
changelogfy.user.clear()
It will clear the local storage and cookies related to the current user.
Callbacks
let 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");
},
onLoaded: function () {
console.log("script loaded");
window.changelogfy.init();
},
},
};
Updated on: 10/23/2023
Thank you!