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

change: [M3-8439] - Tag form events in Linode Create v2 #10840

Merged

Conversation

mjac0bs
Copy link
Contributor

@mjac0bs mjac0bs commented Aug 26, 2024

Description 📝

This PR tags the UI elements from Linode Create v2 that were not shared with the v1 flow (which was tagged in #10722).

Changes 🔄

See #10722 for an overview how form events are handled.

Target release date 🗓️

9/3

Preview 📷

Screenshots of Main Create Flow Events
Component Analytics Event
GettingStarted gettingStartedEvent
Current: DCPricing Two step: twoStepRegionSelect twoStepRegionSelectEvent
RegionSelect selectRegion
ChoosingPlan planEvent
PGSelect changePG clearPG createDrawerPG
VPCSelect learnMoreVPC createDrawerVPC VPC is selected: changeVPC VPC is cleared: clearVPC
FirewallSelect learnMoreFirewall createDrawerFirewall Firewall is selected: changeFirewall Firewall is cleared: clearFirewall
ActionButtons2 viewCodeSnippets createLinode
click 'Create Linode' without filling in required fields formErrorEvent
Screenshots of PG Branch Flow Events
Component Analytics Event
Create PG createPG
Screenshots of Firewall Branch Flow Events
Component Analytics Event
Assign services Learn More learnMoreAssignServicesFirewall
Create Firewall createFirewall
Screenshots of VPC Branch Flow Events
Component Analytics Event
Create VPC Learn More learnMoreCreateVPC
Subnets Learn More learnMoreSubnetVPC
Create VPC createVPC

How to test 🧪

Prerequisites

(How to setup test environment)

  • You must have the Adobe Analytics environment set in your .env.
  • Check out this PR, yarn dev, and in the browser console, type _satellite.setDebug(true).

Verification steps

(How to verify changes)

  • Below are the two color-coded keys for what events should be tagged in the flow. Please see the Preview section for the events and confirm they are firing as expected.
Main Flow Branching Flows (Drawers)
MainFlowInstructions FireOnce Screenshot 2024-08-02 at 10 15 25 AM

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@mjac0bs mjac0bs self-assigned this Aug 26, 2024
@mjac0bs mjac0bs marked this pull request as ready for review August 26, 2024 23:00
@mjac0bs mjac0bs requested a review from a team as a code owner August 26, 2024 23:00
@mjac0bs mjac0bs requested review from hana-akamai and abailly-akamai and removed request for a team August 26, 2024 23:00
Copy link
Contributor Author

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

This PR adds form events that were in LCv1 but missing in LCv2. It does not go back and clean up LCv1 form events because those files will presumably be removed soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed unused form events from this file because this component not just part of the Linode Create flow v1 (i.e. it will not be deleted soon).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added test coverage for the 'How Data Center Pricing Works' docs link because it was missing from the TwoStepRegion select before.

@@ -134,6 +143,38 @@ export const LinodeCreatev2 = () => {
}
};

const handleAnalyticsFormError = useCallback(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ported over from LinodeCreateContainer and adapted slightly for how errors in LCv2 are handled. UX wants to track specific errors for now.

Copy link
Member

Choose a reason for hiding this comment

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

Optional: Could we extract out some of this logic into a hook or function to keep this file a bit cleaner?

I just don't want this file to spiral out of control and resemble Linode Create v1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, fair point, we don't want to creep back to LCv1. I moved this to a hook in bd72f50, though wasn't sure how best to unit test.

Copy link

github-actions bot commented Aug 26, 2024

Coverage Report:
Base Coverage: 82.62%
Current Coverage: 82.73%

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Looks good! seeing most events firing with proper tags for each create mode. ✅

A couple things are not firing on my end

  • region selection
  • plan selection

Am i missing something?

@@ -134,6 +143,38 @@ export const LinodeCreatev2 = () => {
}
};

const handleAnalyticsFormError = useCallback(
Copy link
Member

Choose a reason for hiding this comment

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

Optional: Could we extract out some of this logic into a hook or function to keep this file a bit cleaner?

I just don't want this file to spiral out of control and resemble Linode Create v1

@mjac0bs
Copy link
Contributor Author

mjac0bs commented Aug 27, 2024

A couple things are not firing on my end

  • region selection
  • plan selection

Am i missing something?

@abailly-akamai Thanks for verifying!

For Region selection, you should be seeing the logged formStart event, even if the second message says something like "criteria not met". The first message is sufficient for confirming the event in CM; the second message has to do with whether this url has been configured for the formStart in the analytics backend. (I think they turned formStart events off on localhost to save some event calls when we went to prod with LCv1 last week.)
Screenshot 2024-08-27 at 7 13 34 AM

For Plan selection, you should not be seeing any form events, but you should be seeing a formInput event upon clicking the "Choosing a Plan" docs link. (There are actually two analytics events here; a custom event and a form event. Form event is in orange below.)
Screenshot 2024-08-27 at 8 32 09 AM

Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Looks good on my end!

Nice job keeping things as clean as possible 🧼

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Thx for the clarifications! PR is good to go from my end, thx for tackling this!

@hana-akamai
Copy link
Contributor

I'm not seeing Firewall change/clear events 🤔

@mjac0bs
Copy link
Contributor Author

mjac0bs commented Aug 27, 2024

I'm not seeing Firewall change/clear events 🤔

@hana-linode But you were seeing other events and just not the change/clear? That's odd. I just verified that I can see all the events in the Firewall panel, and this looks consistent across create flow tabs.

image

@mjac0bs mjac0bs added Approved Multiple approvals and ready to merge! and removed Ready for Review labels Aug 27, 2024
@mjac0bs mjac0bs added the Analytics Relating to Analytics migration project or Adobe Analytics label Aug 27, 2024
@hana-akamai
Copy link
Contributor

@mjac0bs Yes, I'm seeing all other events

Screen.Recording.2024-08-27.at.12.30.36.PM.mov

Copy link
Contributor

@hana-akamai hana-akamai left a comment

Choose a reason for hiding this comment

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

Turns out my Linode Create v2 flag was off 😅 . Seeing all the events now!

@mjac0bs mjac0bs merged commit 0162e80 into linode:develop Aug 27, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analytics Relating to Analytics migration project or Adobe Analytics Approved Multiple approvals and ready to merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants