Set up Glad App events in GA4 #
Glad App emits events that can be used with analytic tools like Google Analytics for additional analysis. These events can help you better understand how Customers interact with Glad App.
Please note that Gladly does not have OOTB reports for these events.
- Availability:change
- conversation:ended
- conversation:started
- campaign:triggered
- customer:onboarded
- message:received
- Use to answer questions like:
- Which Agents drove the most revenue?
- Which Agents had the highest impact on the conversion rate?
- Use to answer questions like:
- message:sent
- quick-action:selected
- search:result-selected
- sidekick:closed
- sidekick:opened
See all events outlined here
<mark> tags in results #
GA4 may return search_result_selected with <mark> tags. These represent a search string within the relevant part of the content, and the API returns the content in this way.
If you’d like, you can strip the markup before the event is processed. Below is an example that logs to the console that you may repurpose:
Gladly.on(‘search:result-selected’, ([e]) => {
let tmp = document.createElement(“span”);
tmp.innerHTML = e.label;
let searchResult = tmp.textContent || tmp.innerText || “”;
console.log(searchResult)
});