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

Add google analytics log to form submission #35602

Merged
merged 14 commits into from
Feb 13, 2025
Merged

Conversation

MartinRiese
Copy link
Contributor

@MartinRiese MartinRiese commented Jan 9, 2025

Product Description

Add google analytics event for when successfully submitting a form.

These are mostly necessary because there is not way to get duration between events after the fact. So we need to track them client side and send them to google analytics precomputed.

Technical Summary

https://dimagi.atlassian.net/browse/USH-5193

Feature Flag

No

Safety Assurance

Safety story

Automated test coverage

QA Plan

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@dimagimon dimagimon added the Risk: Medium Change affects files that have been flagged as medium risk. label Jan 9, 2025
@MartinRiese MartinRiese marked this pull request as ready for review February 4, 2025 19:20
@@ -543,6 +545,11 @@ hqDefine("cloudcare/js/form_entry/web_form_session", [
function (resp) {
form.isSubmitting(false);
if (resp.status === 'success') {
const gtxEventData = {
title: form.title(),
breadcrumbs: form.breadcrumbs() ? form.breadcrumbs().join(">") : "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you grab breadcrumbs here instead of selections? I'm guessing cause you don't have access to selections here?

@MartinRiese MartinRiese merged commit 4a4f6cb into master Feb 13, 2025
13 checks passed
@MartinRiese MartinRiese deleted the riese/ga_form_submit branch February 13, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Risk: Medium Change affects files that have been flagged as medium risk.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants