Currently we load and initialize Drift on every Kibana page load for Drift for trial users (+gap). We load it mostly to leverage Drift’s native targeting to determine if the chat button should be displayed. This comes with the performance overhead both for network and cpu.
We could minimize performance impact by loading Drift only on "chat" button click, the loading experience can look like this:
The advantage of this approach is that we significantly reduce any performance overhead caused by the chat integration.
Also the bug we currently have with unreliable playbookFired event is no longer relevant https://github.com/elastic/kibana/issues/167864 as we would show the chat button for all trial users
However we will lose the native Drift targeting system, as we will show the chat button independently from Drift. We can mitigate this in the following ways:
We can have a catch-all playbook that would fire for visitors who don’t meet any of the other playbook targeting conditions.
We can setup custom targeting through launchdarkly which is a lot cheaper in terms of performance overhead. The following fields are available:
// Static values
userId: string;
kibanaVersion: string;
trialEndDate?: string;
isElasticStaff?: boolean;
// Dynamic/calculated values
inTrial?: boolean;
hasData?: boolean;
We will still keep the targeting through Kibana config layer which only turns on Drift for trial users + draft
Currently we load and initialize Drift on every Kibana page load for Drift for trial users (+gap). We load it mostly to leverage Drift’s native targeting to determine if the chat button should be displayed. This comes with the performance overhead both for network and cpu.
We could minimize performance impact by loading Drift only on "chat" button click, the loading experience can look like this:
https://github.com/elastic/kibana/assets/7784120/87fa3592-d380-423e-8a15-2857defac2a2
playbookFired
event is no longer relevant https://github.com/elastic/kibana/issues/167864 as we would show the chat button for all trial usersHowever we will lose the native Drift targeting system, as we will show the chat button independently from Drift. We can mitigate this in the following ways:
// Static values userId: string; kibanaVersion: string; trialEndDate?: string; isElasticStaff?: boolean; // Dynamic/calculated values inTrial?: boolean; hasData?: boolean;