Hide Drift widget on specific tabs

What’s the best way to hide the drift widget on specific tabs WITHOUT the CSS Tools plugin.

There’s an extensive thread on how to configure the widget for a multi-tabbed page, although it uses the plugin. I want to hide it using an HTML element on that specific tab but I can’t seem to override the header script.

.drift-widget-container {
  display: none !important;
}

Drift admin here: see show() and hide() in the dev docs:

So, JS to hide:

window.drift && window.drift.api.widget.hide()

1 Like

Thanks, @keith. Always have to remind myself to read the documentation first!

2 Likes

Eh, it’s not exactly easy to find, but yeah “RTFM… This is the way.”

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.