Hello All,
My company has set up an "XYZ - AI support" chatbot on one of our domains, and I could see it implemented as an element on pages. However, the companies whose AI support chatbot we have implemented have advised us to use their official web widget events instead of home-baked events for tracking in Adobe Analytics.
The process says:
1) To install the Web Widget API, you need to include the "XYZ - AI support" object in your HTML. For this step, I created a DOM-ready rule in Launch and passed that JavaScript snippet into the custom code
2) The next step is to start using all the events that they have provided to capture info into analytics like on Modal Open, on Moda close, on query submit, etc etc.
I am wondering will those events will go separately in the click-based event rule in Adobe Launch? where I need to create data elements for all those events with javascript and map them to the eVars for info capturing into analytics.
@PratheepArunRaj @Jennifer_Dungan any valuable thoughts on this? I can DM more info too incase you want
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Ok, just following up here after several back and forth conversations over Private Messaging.
Leaving out the specific vendor that was used, the working solution ended up using multiple rules:
- AppendScriptToPage (using the Library Loaded trigger)
- Rules for each "tracking scenario", such as Open, Close, Submit Question, etc
Within the AppendScriptToPage rule, we added both the vendor's code, and then each of the specific API Event Handlers. (It turned out that we couldn't listen for these directly inside the Adobe Rules, so we essentially daisy chained the Event Handlers from the vendor to trigger each tracking scenario rule.
In this case, despite the fact that we could have called the _satellite.track directly (since we had full control of both the code calling it and the rules themselves), the Satellite Track can be easily broken if the names of the rules are updated by someone who doesn't know the dependency (most rules the name are solely for identification, and don't have any impact on functionality, and we wanted to keep that same openness to these rules)... so we opted for creating Custom JS Rules inside the vendor's handlers, like so:
// Vendor Handler Start
var querySubmit = new Event("querySubmit ", { detail: { "threadId": threadId, "questionAnswerId": questionAnswerId, "question": question } });
window.dispatchEvent(querySubmit );
// Vendor Handler End
Then in each rule, we added custom code listeners:
window.addEventListener('querySubmit ', function (e) {
trigger();
}, false);
The trigger() is what tells Adobe to run the rule, and continue onto the conditions (if any) and the actions of the rule.
Then the clear vars, set variables, and send beacons were set up to perform the tracking as per the needs.
In the end, the tracking is now working and we didn't have to get the developers involved.
Other similar scenarios may differ depending on the vendor and code involved, but an implementation similar to this might help others out.
Views
Replies
Total Likes
From what you are describing, it sounds like their Chatbot has JS hooks / events that you can leverage for your tracking.4
Since there is an "installed" portion in your HTML (part 1) that sounds like something your developers would have to do...
Now, for the events, this may require a combination of developer work and your own work... Without seeing the documentation I don't know for sure.
While not a chatbot, I am currently working on a third party tracking implementation, and while their code has some hooks, I can't leverage it directly in Adobe, but our developers created a "helper" JS file (for their own integrations) and so I've been working with them to create the necessary bridge to analytics. Basically, the third-party system calls functions at various stages... so in the helper file, we added the functions, inside of those I either update our data layer (we are not using an event based data layer, but our own custom "page level" data layer), or call a custom JS event (passing the info I need).
In Launch, I look for the data layer info or have listeners for the events to track what I need.
You might be able to listen for the Chatbot events directly, I have another third-party integration that I can do that with...
It all depends on the code being used.
You might need to get support from your developers if you aren't comfortable with all this coding.
Views
Replies
Total Likes
1) For Installation it says
- ""To install the AI Support Web Widget API, you need to include AI Support object in our HTML. To do that we have to Add the following JavaScript snippet before <body> tag on every page where you are rendering the kapa Web Widget."" That's why I created DOM ready rule where I pasted the snippet of JavaScript snippet into the custom code. Or do I need to work on adding this snippet to the HTML Page Template of the site?
2) From what you are describing, it sounds like their Chatbot has JS hooks/events that you can leverage for your tracking.
-YES
3) In Launch, I look for the data layer info or have listeners for the events to track what I need.
- We don't have digitalDatalayer enabled for the documentation site else I could have passed the AI support data object to data layer to capture values
You might be able to add with Launch, it will require testing of course... at least it's a start.
As for how your Launch code triggers, that's up to you. We don't use the Adobe Data Layer either (our implementation was done long before that was a thing....) We use our own custom layer, and like I said, we use a lot of custom events...
Views
Replies
Total Likes
Ok, just following up here after several back and forth conversations over Private Messaging.
Leaving out the specific vendor that was used, the working solution ended up using multiple rules:
- AppendScriptToPage (using the Library Loaded trigger)
- Rules for each "tracking scenario", such as Open, Close, Submit Question, etc
Within the AppendScriptToPage rule, we added both the vendor's code, and then each of the specific API Event Handlers. (It turned out that we couldn't listen for these directly inside the Adobe Rules, so we essentially daisy chained the Event Handlers from the vendor to trigger each tracking scenario rule.
In this case, despite the fact that we could have called the _satellite.track directly (since we had full control of both the code calling it and the rules themselves), the Satellite Track can be easily broken if the names of the rules are updated by someone who doesn't know the dependency (most rules the name are solely for identification, and don't have any impact on functionality, and we wanted to keep that same openness to these rules)... so we opted for creating Custom JS Rules inside the vendor's handlers, like so:
// Vendor Handler Start
var querySubmit = new Event("querySubmit ", { detail: { "threadId": threadId, "questionAnswerId": questionAnswerId, "question": question } });
window.dispatchEvent(querySubmit );
// Vendor Handler End
Then in each rule, we added custom code listeners:
window.addEventListener('querySubmit ', function (e) {
trigger();
}, false);
The trigger() is what tells Adobe to run the rule, and continue onto the conditions (if any) and the actions of the rule.
Then the clear vars, set variables, and send beacons were set up to perform the tracking as per the needs.
In the end, the tracking is now working and we didn't have to get the developers involved.
Other similar scenarios may differ depending on the vendor and code involved, but an implementation similar to this might help others out.
Views
Replies
Total Likes
Views
Likes
Replies