react-drift icon indicating copy to clipboard operation
react-drift copied to clipboard

Is there a possibility to pass a configuration to the widget?

Open chemic opened this issue 6 years ago • 4 comments

I would like to tweak some default settings of the widget, is there a possibility to pass config object to the widget anyhow?

Thanks!

Example from https://devdocs.drift.com/docs/widget-configuration

drift.config({
   locale: 'en-US',
    messages: {
     welcomeMessage: 'Hey there!',
      awayMessage: "Hey, we're not here right now, but leave a message.",
      emailCaptureMessage: "Leave your email so we can get back to you.",
      thankYouMessage: "Thanks we'll follow up soon."
    },
    enableWelcomeMessage: false,
    enableCampaigns: false,
    enableChatTargeting: false,
    backgroundColor: '#000000',
    foregroundColor: '#ffffff',
    activeColor: '#00ff00',
    textColor: '#ffffff',
    autoAssignee: {
      name: 'Trevor Rundell',
      title: 'Engineer',
      email: '[email protected]',
      avatarUrl: 'https://s.gravatar.com/avatar/...',
    },
    inboxId: 1,
    cookieDomain: '.example.com',
    welcomeMessageDelay: 5000,
    disableNewConversations: true,
})

chemic avatar Aug 13 '18 12:08 chemic

it doesn't support at the moment, but it should be straight forward to add. I'll try to add 'drift config' in the component as props.

chardmd avatar Aug 16 '18 01:08 chardmd

@chardmd I don't follow. How exactly would one go about adding this?

KD33 avatar Nov 28 '18 00:11 KD33

Any updates on this?

xbreid avatar Jan 25 '19 22:01 xbreid

Would love to be able to change welcomeMessageDelay and other configurations — any update on passing configurations through, @chardmd ? Code works great otherwise!

https://devdocs.drift.com/docs/widget-configuration

jeremychevallier avatar Feb 14 '19 04:02 jeremychevallier