segmentio / segmentio/analytics.js-integrations

[appboy] Pull Request #31: Queue up logCustomEvent until in-app messaging is ready

Open
#115 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
125
Forks
136
Avg merge
2h 45m
Merged PRs (30d)
1

Description

Migrated from #31 by @ucarion

This PR ensures that calls to logCustomEvent won't happen until the appropriate in-app messaging is ready.

With this PR, we'll keep track of whether we are currently downloading in-app messaging. If we ever are, we queue up calls to logCustomEvent; once in-app messaging is ready, we'll flush that queue.

This change required changing our tests to hook into the internal _onMessagingReady method. This is non-ideal, but I can think of no easier way to have tests synchronize with Appboy's internal events system.

Note: The above explanation applies to logPurchase as well.

Closes #25.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the migrated PR #31 and the Appboy integration tests first, especially the test synchronization around the internal _onMessagingReady method. Confirm that logCustomEvent and logPurchase calls are queued while in-app messaging downloads and flushed once it is ready; the tests should cover both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
analytics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.