web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

handle callback from the trackEvent function in Engagement Insights JS SDK

(1) ShareShare
ReportReport
Posted on by 16
Hi team, using the custom web/app trigger for journeys, everything works fine except one thing, i can not figure out how to handle the response object to indicate success or failure and update my frontend. Does trackEvent take any callback arguments? the response json looks like this when succesful {"acc":1,"webResult":{}} and i´ve tried a couple of different approaches to handle the response from the function without succeding. 

Any help or documentation references would be appreciated! 

this is the current version, but no response object is even logged to console
 
function track_msdynmkt_() {
    try {
        window["msdynmkt"].setUser({ authId: custID });
        window["msdynmkt"].trackEvent({
            name: "",
            ingestionKey: "",
            version: "1.0.0",
            properties: {
                "value": 10,
                "bindingid": "cart-abandon"
            }
        }, function (response) {
            // Handle the callback response
            console.log("Cart Abandon Response:", response);
            handleEventResponse(response, "cart-abandon-indicator");
        });
 
    } catch (error) {
        handleEventResponse(null, "cart-abandon-indicator");
    }
}
 
 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 102

#2
11manish Profile Picture

11manish 88 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 84

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans