-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MOB-6216] implement impression tracking listeners #576
[MOB-6216] implement impression tracking listeners #576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not a interface overridden methods?
The terminology on Android - on
MessageImpression with on
prefix usually says its an interface overriden method.
If its not supposed to be that, we can just call it - startMessageImpression. Just a thought.
I am using the convention from in-app. should we do a revisit on a separate PR? |
…dSessionManager-MOB-6232-implement-impression-tracking-listeners
…mbedded/EmbeddedSessionManager-MOB-6232-implement-impression-tracking-listeners
* sets up embedded impression data class for calculating duration and display counts * sets up impression tracking functions * adds impression data manipulation to session manager --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>
bd75493
into
feature/embedded/EmbeddedSessionManager
* creates embedded session manager startSession and endSession * removes print statements * [MOB-6216] implement impression tracking listeners (#576) * adds impression handlers to embedded session manager * [MOB-6217] implement impression tracking functions (#577) * sets up embedded impression data class for calculating duration and display counts * sets up impression tracking functions * adds impression data manipulation to session manager --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer>
* adds base embedded manager * creates separate json file for test embedded message payload * reads message json from file * Base manager class Iterable API initializes with embeddedmanager in memory constants class now have a constant to hit the right API embeddedmanager now has listeners interfaces and getter setter placeholders. It also has a timer placeholder. Not functional yet though Requestprocessor has offline mode assigned to embedded messages as well. embeddedmanager makes an api call. Incomplete state as of now * [MOB-5762] - Time based AutoSync Schedule sync happens after every determined duration. Still not perfect. Especially in situation of going to background and coming to foreground in time less than the autofetch interval. Possiblity of multiple looper posts * Delete json file in package * [MOB-5785] - Sync remote embedded messages 1. update the local list of messages with remote messages instead of directly assigning remote message to local list. 2. Keep placeholder places for places to call delivery and deletion where new message is identified and old message is identified gotten deleted * Fix Tests * Fixes a bug Fixes a bug where SDK would not resume the sync thinking there is already a sync scheduled but was indeed skipped due to app in background. * Adjusting TODO as per comments * [MOB - 5764] - Renaming Renaming autoFetchInterval names as per last PR suggestion * Removing comments and making it work with api * updates logs and parsing of incoming payload * minor edits * adds live data for local messages queue * adds mock embedded manager * Replacing hardcoded email with logged in email. Also adding a todo * Adding TODO for placementId * onMessageUpdate implementation * [MOB-5983] - Refactor code * removes redundant getEmbeddedManager call * removes test function from manager * rename route * adds boundary to auto fetching * minor edits * minor edits * removes autoFetchDuration from scheduleSync signature * adds called to custom track event * sets up click tracking using custom track event * rename for consistency * adds button identifier to the embedded click signature * adds button identifier to custom event payload * adds buttonIdentifier to trackEmbeddedClick call on IterableApiClient * addresses comments * aligns click event with corresponding iOS call * removes log statement * addes serialization of button action * updates message id throughout SDK * changes message id back to work with current backend * sets up trackEmbeddedMessageReceived function in IterableApiClient * removes custom event call * sets up embedded message received unit test * refactors assigning of userKey for embedded calls * adds connection to associated endpoint * removes jacoco.exec * updates .gitignore and refactor * Connects track embedded message click to endpoint * [MOB-6135] - Check SDK initialization before API call Similar implementation to getInAppMessages where SDK initialization is checked before making a call to API * Comment changes * addresses comments * updates addEmailOrUserIdToUserKeyJson method signatures across analytics calls * adds dependency * removes redundant dependency * sets up connection to impression tracking endpoint * adds embedded session test * addresses checkstyle comment * updates impression tracking payload * updates session id * removes non-null annotation * updates payload constants * updates session payload * addresses unit test error * unit test fixes * addresses check * adds missing dependency * remove dependency * updates message id to match backend update * Revert "updates message id to match backend update" This reverts commit d0be2a9. * updates message id across SDK * updates IterableApiClient * updates tests with message id:q * updates embedded payloads to include email or userid fields * [MOB - 6363] - Merge embedded session manager to Manager (#585) * creates embedded session manager startSession and endSession * removes print statements * [MOB-6216] implement impression tracking listeners (#576) * adds impression handlers to embedded session manager * [MOB-6217] implement impression tracking functions (#577) * sets up embedded impression data class for calculating duration and display counts * sets up impression tracking functions * adds impression data manipulation to session manager --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> * [MOB - 6115] EM feature flagging (#578) * [MOB-6115] - Feature flagging EM * scheduling next call for other types of failures * Adding Invalid Api Key in the gate too This will prevent app with invalid api key to not unnecessarily make EM requests * adds isEmbeddedEnabled flag for testing purposes * sets up auto fetch duration as a livedata * Revert "sets up auto fetch duration as a livedata" This reverts commit 5f5178c. * Revert "adds isEmbeddedEnabled flag for testing purposes" This reverts commit 6bb17a7. * Modifying the method call * [MOB - 6362] Update subscription status (#586) * New interface method * Fixing Test Setting EmbeddedMessaging disabled for test --------- Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”> --------- Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”> Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: Evan Greer <evan.greer@iterable.com> Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”> Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> Co-authored-by: Evan Takeo Kanaiaupuni Greer <56953678+evantk91@users.noreply.github.com>
commit 82f4d6b Author: Akshay Ayyanchira <ayyanchira.akshay@gmail.com> Date: Thu Jun 15 09:42:53 2023 -0700 Feature/embedded/manager (#527) * adds base embedded manager * creates separate json file for test embedded message payload * reads message json from file * Base manager class Iterable API initializes with embeddedmanager in memory constants class now have a constant to hit the right API embeddedmanager now has listeners interfaces and getter setter placeholders. It also has a timer placeholder. Not functional yet though Requestprocessor has offline mode assigned to embedded messages as well. embeddedmanager makes an api call. Incomplete state as of now * [MOB-5762] - Time based AutoSync Schedule sync happens after every determined duration. Still not perfect. Especially in situation of going to background and coming to foreground in time less than the autofetch interval. Possiblity of multiple looper posts * Delete json file in package * [MOB-5785] - Sync remote embedded messages 1. update the local list of messages with remote messages instead of directly assigning remote message to local list. 2. Keep placeholder places for places to call delivery and deletion where new message is identified and old message is identified gotten deleted * Fix Tests * Fixes a bug Fixes a bug where SDK would not resume the sync thinking there is already a sync scheduled but was indeed skipped due to app in background. * Adjusting TODO as per comments * [MOB - 5764] - Renaming Renaming autoFetchInterval names as per last PR suggestion * Removing comments and making it work with api * updates logs and parsing of incoming payload * minor edits * adds live data for local messages queue * adds mock embedded manager * Replacing hardcoded email with logged in email. Also adding a todo * Adding TODO for placementId * onMessageUpdate implementation * [MOB-5983] - Refactor code * removes redundant getEmbeddedManager call * removes test function from manager * rename route * adds boundary to auto fetching * minor edits * minor edits * removes autoFetchDuration from scheduleSync signature * adds called to custom track event * sets up click tracking using custom track event * rename for consistency * adds button identifier to the embedded click signature * adds button identifier to custom event payload * adds buttonIdentifier to trackEmbeddedClick call on IterableApiClient * addresses comments * aligns click event with corresponding iOS call * removes log statement * addes serialization of button action * updates message id throughout SDK * changes message id back to work with current backend * sets up trackEmbeddedMessageReceived function in IterableApiClient * removes custom event call * sets up embedded message received unit test * refactors assigning of userKey for embedded calls * adds connection to associated endpoint * removes jacoco.exec * updates .gitignore and refactor * Connects track embedded message click to endpoint * [MOB-6135] - Check SDK initialization before API call Similar implementation to getInAppMessages where SDK initialization is checked before making a call to API * Comment changes * addresses comments * updates addEmailOrUserIdToUserKeyJson method signatures across analytics calls * adds dependency * removes redundant dependency * sets up connection to impression tracking endpoint * adds embedded session test * addresses checkstyle comment * updates impression tracking payload * updates session id * removes non-null annotation * updates payload constants * updates session payload * addresses unit test error * unit test fixes * addresses check * adds missing dependency * remove dependency * updates message id to match backend update * Revert "updates message id to match backend update" This reverts commit d0be2a9. * updates message id across SDK * updates IterableApiClient * updates tests with message id:q * updates embedded payloads to include email or userid fields * [MOB - 6363] - Merge embedded session manager to Manager (#585) * creates embedded session manager startSession and endSession * removes print statements * [MOB-6216] implement impression tracking listeners (#576) * adds impression handlers to embedded session manager * [MOB-6217] implement impression tracking functions (#577) * sets up embedded impression data class for calculating duration and display counts * sets up impression tracking functions * adds impression data manipulation to session manager --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> * [MOB - 6115] EM feature flagging (#578) * [MOB-6115] - Feature flagging EM * scheduling next call for other types of failures * Adding Invalid Api Key in the gate too This will prevent app with invalid api key to not unnecessarily make EM requests * adds isEmbeddedEnabled flag for testing purposes * sets up auto fetch duration as a livedata * Revert "sets up auto fetch duration as a livedata" This reverts commit 5f5178c. * Revert "adds isEmbeddedEnabled flag for testing purposes" This reverts commit 6bb17a7. * Modifying the method call * [MOB - 6362] Update subscription status (#586) * New interface method * Fixing Test Setting EmbeddedMessaging disabled for test --------- Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”> --------- Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”> Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> --------- Co-authored-by: Evan Greer <evan.greer@iterable.com> Co-authored-by: “Akshay <“ayyanchira.akshay@gmail.com”> Co-authored-by: evan.greer@iterable.com <evan.greer@evan.greer> Co-authored-by: Evan Takeo Kanaiaupuni Greer <56953678+evantk91@users.noreply.github.com>
🔹 Jira Ticket(s) if any
✏️ Description
embedded-session-tracking
branch