Forum Documentation Showcase Pricing Learn more

Show Drift chat on certains pages

Hi @levon , i installed the plugin Drift and it works like charm.

However, how can i disable the chat from certain pages?

Thank you

When I’ve used Drift, I also typically restrict it to one page.

Instead of using the Drift plugin, you can drop the Drift code snippet (from your Drift account) into the Page HTML Header for the specific pages you want for it to appear on. No plugins or other code necessary.

1 Like

Thank you @dan1 !
I don’t know why I haven’t think that way. :blush:

@dan25
i think you can do these from the settings when you log in to your Drift account, did you check?

Hi @levon , it seems that the simplest solution is:

1 Like

For those with a mobile one-page app architecture i’ve found a working solution. This will allow you to choose which ‘tabs’ the Drift widget appears on.

  1. Grab your JS Code from here.

https://app.drift.com/settings/widget

  1. Insert into your Header of your ‘top-level’ page and add this at the bottom, below the </script> tag

<style> iframe#drift-widget.drift-widget-welcome-online { display: none !important; } </style>

  1. Install the CSS Tools Plug In

  2. In Visual Builder create a CSS Tool Element on your page.

  3. Create 2 seperate workflows.

Workflow #1

When Page is loaded only when ‘tabs’ state is not ‘value of the page(s) you’d like Chat Widget to be visible’

Add Custom Style To Head CSSTools A:

iframe#drift-widget.drift-widget-welcome-online { display: none !important;}

Workflow #2

Do every 1 second only when ‘tabs’ state is ‘value of page(s) you’d like Chat Widget to be visible’

Add Custom Style To Head CSSTools A:

iframe#drift-widget.drift-widget-welcome-online { display: unset !important;}

For those with a bottom navigation bar, you can use this code for Workflow 2. This raises the position of the widget up the page, so it doesn’t cover your nav bar

iframe#drift-widget.drift-widget-welcome-online { bottom: 80px !important; display: unset !important;}

Hopefully this proves useful to someone out there!

Any feedback or suggestions are greatly welcomed and appreciated.

Rafe

You should repost this in the #tips category, think it would help a lot of people.

1 Like

I was wondering whether you could do this with Intercom as well?

Sweet @marcusandrews - Have reposted here.

1 Like