Open
Conversation
# Conflicts: # AEPBrandConcierge/Sources/Views/ChatView.swift
Contributor
|
The changes look good to me overall but I just had a question about dispatchTrackingEvent. I noticed that some calls can possibly be made with an empty conversation or interaction id. Should we still dispatch tracking events in this case? Or should we consider a missing id as an invalid event? |
rymorale
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds SDK tracking events dispatched to the AEP Event Hub, following the Lifecycle for Edge Network paradigm. Users can construct Data Collection rules to forward these events to their datastream for tracking/XDM mapping.
All tracking events use:
com.adobe.eventType.conciergecom.adobe.eventSource.notificationconcierge.eventType(the granular event subtype for XDM mapping) plus event-specific dataconcierge.eventTypesession:initializedquery:submittedquerypromptSuggestion:clickedsuggestioncard:clickedelement(product details dict)response:startedconversationId,interactionIdresponse:completedconversationId,interactionIdcards:rendereddisplayMode,elementsfeedback:submittedconversationId,interactionId,feedbackType,selectedOptions,noteserror:occurrederrorMessageTracking infrastructure
ConciergeTrackingEventenum with atoEvent()factory that producesAEPCore.Eventobjects with the corresponding type, source, and payloadConciergeConstants.TrackingEventwith nestedName,XDMType, andEventData.Keyenums for all tracking constantsChatControllerat init time (same pattern asLifecycleV2)Concierge+PublicAPI.show()andConciergeHostingControllerpassMobileCore.dispatch(event:)as the dispatch closureDispatch integration in ChatController
sessionInitialized— dispatched inloadWelcomeIfNeededafter welcome content is set upquerySubmitted— dispatched insendMessagewhen the user sends a queryresponseStarted— dispatched on the first chunk received instreamAgentResponse(once per stream, guarded by a local flag)responseCompleted— dispatched when the stream completes successfullyerrorOccurred— dispatched when the stream failscardsRendered— dispatched inrenderMultimodalElementswhen product cards are appendedfeedbackSubmitted— dispatched insendFeedbackForafter feedback is sent to the serverpromptSuggestionClickedandcardClicked— exposed as public methods onChatController, called from the view layerCard tap tracking
ConciergeCardTapHandler(SwiftUIEnvironmentKey) so card views can report taps back toChatControllerwithout nested callback wiringChatViewinjects the handler,ProductDetailCardViewandChatMessageViewconsume it via@EnvironmentTests
ConciergeTrackingEventTests— verifies each event case produces the correctEventname, type, source, and payloadConciergeChatViewModelTests— 9 new tests:querySubmitted,responseStarted,responseCompleted,errorOccurred,cardsRendered,feedbackSubmitted,promptSuggestionClicked,cardClickedRelated Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: