department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 203 forks source link

Analytics Implementation for 22/1995 #6092

Closed jonwehausen closed 4 years ago

jonwehausen commented 4 years ago

Analytics Implementation or QA Request

Description

Tracking needs: (https://app.zenhub.com/files/133843125/61b7c180-8f9b-4652-ba4a-53efd9dd5190/download)

Acceptance Criteria

Definition of Done

jonwehausen commented 4 years ago

Datalayer Requirements - Updated 3/2 9:00am EST

1) When the veteran reaches ineligibly page and clicks a radio button for yes or no

Screenshot of message image

Perform the following dataLayer push on ALL clicks of yes or no:

dataLayer.push({
  'event': 'edu-form-change', 
  'edu-form-field': 'ineligibility-still-apply-radio-button',
  'edu-form-value': 'yes' //or 'no' 
});

2) When the veteran clicks on any of the following navigation components:

Screenshot of interaction image

Execute the following dataLayer push

dataLayer.push({
   'event': 'edu-navigation', 
   'edu-action': 'explore-other-benefits' //or 'finish-later', 
});

DEV IGNORE - Setup GA Sequence Segments - @nedierecel

image

3) When the veteran SUBMITs the form, add the following dataLayer variable to the existing 'edu-1995--submission-successful' event push based on the veterans response to the new question

Screenshot of question image

Add this dataLayer variable

'edu-exhaustedAllBenefits': 'yes' //or 'no'

4) When the veteran clicks on any of the links within the STEM scholarship block

Screenshot of section image

Execute this dataLayer push

dataLayer.push({
   'event': 'edu-navigation', 
   'edu-action': 'check-remaining-benefits' //or 'stem-scholarship', 'see-approved-stem-programs'
});
nedierecel commented 4 years ago

@jonwehausen Thanks for including me in the review. Please see feedback by each requirement.

  1. Mid-form dataLayer push
  1. This looks good--thanks for making it a global solution
  2. I recommend using the edu-navigation event that exists in GTM now. You could use the look up table built within this tag to form the "Event Action".
jonwehausen commented 4 years ago

Hi @nedierecel,

Thanks so much for your recommendations! I have updated the above comment to be version 1.1 with the latest requirements.

Thanks!

amyknox commented 4 years ago

@jonwehausen It looks like you have two #3's in comment v1.1 above.

3) When the veteran SUBMITs the form, add the following dataLayer variable to the existing 'edu-1995--submission-successful' event push based on the veterans response to the new question and 3) When the veteran clicks on any of the links within the STEM scholarship block

The screenshot that accompanies the first #3 doesn't look like it goes with the description (screenshot: exhaustion of benefits question; datalayer push: form submission success )

jonwehausen commented 4 years ago

Hi @amyknox,

Oops! Thanks for your observations. I have corrected the numbering above.

Regarding now #3 above, apologize if the screenshot was confusing... To clarify, we want to add the dataLayer variable 'edu-exhaustedAllBenefits' to the existing 'edu-1995--submission-successful' event at time of form submission.

@nedierecel Keep us posted on the status of your final review given the most recent updates.

Thanks Jon Wehausen

nedierecel commented 4 years ago

@jonwehausen Confirming receipt--I have some recommendations on the continue and back buttons, so I'll thread in a discussion on Slack.

jonwehausen commented 4 years ago

@nedierecel Have updated the requirements above based on our conversations from last week:

nedierecel commented 4 years ago

@jonwehausen @amyknox This is approved.

Jon, once data is available on Staging, you and I can look at the various report options (segments, custom funnels, and behavior flow). Thanks.

hughes-dustin commented 4 years ago

@jonwehausen @nedierecel The "Finish this application later" link is platform specific. We don't have any control over it in 1995 so I don't think we can push any event to the datalayer there.

I did notice however that the action is being tracked asevent: "edu-1995-sip-form-saved" in the datalayer.

jonwehausen commented 4 years ago

@hughes-dustin Thanks for the note here -- Okay, that is fine. We can do without and utilize the existing event where needed.

hughes-dustin commented 4 years ago

branch: bah-6092 PR: https://github.com/department-of-veterans-affairs/vets-website/pull/11824

sonntag-adam commented 4 years ago

Screen Shot 2020-03-06 at 11.01.01 AM.png

Screen Shot 2020-03-06 at 11.02.12 AM.png

sonntag-adam commented 4 years ago

@jonwehausen, @amyknox, @nedierecel

nedierecel commented 4 years ago

Thanks @sonntag-adam - Has this also been pushed to staging? We updated a few settings in Google Tag Manager that we need to validate.

jonwehausen commented 4 years ago

Hi @sonntag-adam ,

Thanks again for your work here! We really appreciate it.

Through our testing, we noticed a small update to correct -- We noticed a 'Yes' radio button selection of "Have you used all of your Post-9/11 GI Bill or Fry Scholarship benefits or do you have less than 6 months of benefits left?" is populating with 'No' at form submission for the edu-exhaustedAllBenefits dataLayer variable.

Please see screenshot. image

Remaining Validation

✔️ STEM Scholarship Radio Button

✔️ 'Explore Other Benefits'

CC: @amyknox @nedierecel

hughes-dustin commented 4 years ago

@jonwehausen

Can we get a little more information? I've attempted to recreate the scenario but am getting the expected results.

image.png

hughes-dustin commented 4 years ago

For exhaustionOfBenefitsAfterPursuingTeachingCert tracking:

Branch: bah-6092-2 PR: https://github.com/department-of-veterans-affairs/vets-website/pull/11868

jonwehausen commented 4 years ago

Hi @hughes-dustin ,

Thanks, the edu-exhaustedAllBenefits seems to be working fine, ran a couple more tests to confirm.

image

sonntag-adam commented 4 years ago

@jonwehausen here is an update with your prior selection of

edu-stemApplicant: "Yes" edu-undergradStem: "No" edu-pursueTeaching: "Yes"

And selection yes and no for the question "Have you used all of your Post-9/11 GI Bill or Fry Scholarship benefits or do you have less than 6 months of benefits left?(*Required)"

Is this what we want for functionality?

Screen Shot 2020-03-11 at 10.45.05 AM.png

Screen Shot 2020-03-11 at 10.46.40 AM.png

jonwehausen commented 4 years ago

Hi @sonntag-adam ,

Thanks for confirming. Yes -- this is correct.

@hughes-dustin is confirming this functionality also for when the Pursuing Teaching question is NOT surfaced. Like in the screenshot below.

image

sonntag-adam commented 4 years ago

@jonwehausen here is the scenario above for both yes and no Screen Shot 2020-03-12 at 7.13.20 AM.png

Screen Shot 2020-03-12 at 7.16.28 AM.png

nedierecel commented 4 years ago

@jonwehausen Confirming I am reviewing now so changes can be published.

jonwehausen commented 4 years ago

@nedierecel @sonntag-adam @hughes-dustin @amyknox

Confirming this has in fact been published. Closing.