How to activate drift message box?

Hello Guys,

Today I will be sharing my experience on activating drift message box after certain specific time. I had achieved this by using javascript setTimeout() function. You can paste this code on theme custom js file or can use add_inline_script() function to add this script.

var showwelcome_msg = function () {
    setTimeout( function() { 
    	drift.on('ready', function(api, payload) {
    		api.showWelcomeMessage();
    	    
    	});
    }, 90000 );
    
}
window.onload = showwelcome_msg;

 

This above code will open drift message box after 90sec of page load , you can change time as per your requirement.

Let me know if you have any question or queries or any other best solution.You can ping me on adhsushil7@gmail.com

Best Regards
Sushil Adhikari

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: