Closed MackHalliday closed 1 month ago
Adding the QA Reviewed label, but the QA work on this ticket seems incomplete (based on the Utils ticket saying that the QA info will be on this ticket. We can discuss in Refinement or during the QA convo when the developer picks up the ticket.
Hey team! Please add your planning poker estimate with Zenhub @cris-oddball @EvanParish @k-macmillan @kalbfled @MackHalliday @mchlwellman
Yesterday
Today
Yesterday
Today
Friday
Today
Yesterday
Today
Yesterday
ga4/open-email-tracking
to return a pixel image Today
Blocked Yesterday
Basically, GitHub Workflow tests do not run in a Docker Container. So when the tests hit the ga4/open-email-tracking
endpoint, the image is under a different path than in a local env or the DEV env.
QA PASSED
INFO 2024-07-18 18:16:50,781 /app/app/googleanalytics/ga4.py:33: b'campaign=hello_qa&campaign_id=37f1d6d2-1354-49bd-9600-2517e3fac79d&name=email_open&source=vanotify&medium=email&content=qatest/d44e841a-3d08-4f3d-9798-6e891cc4f585/5a395e3d-0d63-4c64-ba06-d919217058a1'
10.247.182.126 - - [18/Jul/2024:18:16:50 +0000] "GET /ga4/open-email-tracking?campaign=hello_qa&campaign_id=37f1d6d2-1354-49bd-9600-2517e3fac79d&name=email_open&source=vanotify&medium=email&content=qatest/d44e841a-3d08-4f3d-9798-6e891cc4f585/5a395e3d-0d63-4c64-ba06-d919217058a1 HTTP/1.1" 200 86 "-" "python-requests/2.32.3"
[x] Happy Path - email notification is sent and the email is opened, image blocking is ON, expect that the route is not hit
Pixel is generated as expected but no logs seen for the GET route as expected.
Email is opened but images are blocked, no logs seen for the GET route as expected.
[2024-07-18 18:28:33,894: DEBUG/ForkPoolWorker-4] Generated Google Analytics 4 pixel URL: https://sandbox-api.va.gov/vanotify/ga4/open-email-tracking?campaign=12.07test&campaign_id=65a7f39d-76df-4c57-9592-339e467d7b25&name=email_open&source=vanotify&medium=email&content=VA%20Notify/d6aa2c68-a2d9-4437-ab19-3ae8eb202553/7ed4fea4-dcdc-45b2-95e6-d4af2a3cb412
10.247.182.63 - - [18/Jul/2024:18:31:30 +0000] "GET /ga4/open-email-tracking?campaign=12.07test&campaign_id=65a7f39d-76df-4c57-9592-339e467d7b25&name=email_open&source=vanotify&medium=email&content=VA%20Notify/d6aa2c68-a2d9-4437-ab19-3ae8eb202553/7ed4fea4-dcdc-45b2-95e6-d4af2a3cb412 HTTP/1.1" 200 86 "-" "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)"
Image is embedded in email (cached with Google here)
-[ ] Happy Path - email notification is sent and the email is opened, image blocking is OFF, expect that the route is hit, a pixel is embedded
The more that passes with testing, the more we are seeing that a broken image icon briefly appears and then disappears when the image is downloaded. Evan is checking APM and I will be testing with Dev tools in a browser. Seen more in Outlook and Gmail on Android than Gmail in Chrome.
Latency of route is very low:
Holding open until Monday to remind me to deploy this to Prod.
Deploying to Prod. Need to create a new ticket prior to closing.
User Story - Business Need
We need to construct a dynamic URL that contains information on notification emails being sent. This URL should be passed as an optional parameter into the HTMLEmailTemplate class within the send_email_to_provider method. The HTMLEmailTemplate class is located in the notification-utils repository. In an earlier user story, a dynamic URL variable was embedded in the notification email, and, when the variable is populated and the email is openned, a GET request will be made to our
notification-api
repo. This user story focuses exclusively on building and passing the dynamic GET URL to the HTMLEmailTemplate class.FIX BUG created in #153. We need to update the new GET
ga4/open-email-tracking
to return an pixel to avoid the broken image icon in appearing in emails.User Story(ies)
As a VA Notify Developer I want to build a dynamic URL that contains information on emails being sent So that the dynamic URL can eventually be use to execute a GET request through pixel tracking when the email is opened.
Additional Info and Resources
Engineering Checklist
notification-utils
made in UTILS-855app.googleanalytics
foldergapixels.build_ga_pixel_url
) in theget_html_email_options
. Add the value for the dynamic URL to the html email options.ga4/open-email-tracking
Acceptance Criteria
notification-api
repo (The POST request to GA4 may not be fully implemented at this time)QA Considerations
notification-api
repo (Thenotification-api
GET endpoint to trigger POST to GA4 may not be fully implemented at this time)