Skip to content
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

Wrong page tracked when user comes back after checkout #540

Merged
merged 3 commits into from
Feb 15, 2019
Merged

Conversation

alexbridge
Copy link
Contributor

Description

Wrong page tracked when user comes back after checkout

Type of change

Please add an "x" into the option that is relevant:

  • [ X ] Bug Fix 🐛 (non-breaking change which fixes an issue)
  • [ ] New Feature 🚀 (non-breaking change which adds functionality)
  • [ ] Breaking Change 💥 (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Polish 💅 (Just some cleanups)
  • [ ] Docs 📝 (Changes in the documentations)
  • [ ] Internal 🏠 Only relates to internal processes.

@alexbridge alexbridge added the bug Something isn't working label Feb 15, 2019
@alexbridge alexbridge self-assigned this Feb 15, 2019
@@ -11,8 +11,6 @@ import { checkoutDidEnter$ } from '../streams/checkout';
*/
export default function checkout(subscribe) {
subscribe(checkoutDidEnter$, ({ getState }) => {
setPWAVisibleState(false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change affects the pageview events, which are dispatched for users who where not logged in when they entered the checkout. For them the system will now track an additional pageview for the cart right after initiatedCheckout.
That happens because APP_EVENT_VIEW_DID_DISAPPEAR is triggered after the history.pop() which is called to remove the login page from the PWA history stack.

const routeDidEnterForVisiblePwa$ = routeDidEnter$
.withLatestFrom(appWillStart$.merge(pwaVisibility$))
.filter(([, { action: { type } }]) => type === APP_WILL_START || type === PWA_DID_APPEAR)
.map(([routeDidEnter]) => routeDidEnter);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startpage is now tracked twice when the app starts, since both actions are are dispatched in this situation.

bildschirmfoto 2019-02-15 um 13 52 23

@fkloes fkloes merged commit 400da33 into v6.2.0 Feb 15, 2019
@fkloes fkloes deleted the PWA-1703-6.2 branch February 15, 2019 16:42
@coveralls
Copy link

coveralls commented Feb 16, 2019

Pull Request Test Coverage Report for Build 2027

  • 14 of 15 (93.33%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 47.025%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/tracking/subscriptions/setup.js 0 1 0.0%
Totals Coverage Status
Change from base Build 2022: 0.03%
Covered Lines: 4999
Relevant Lines: 9978

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants