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

Correctly populate the "specific page" field on the contact form #153

Merged
merged 3 commits into from Jul 9, 2015

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jul 9, 2015

The 'Specific page' field on the /contact/govuk form auto-populates with the previous page (ie the one the user followed the link from to get there). Originally, this would usually have been the page the user
had been on when they spotted the issue they want to raise however, since we introduced the interstitial /contact page almost all traffic comes via this page - this means almost all named feedback that comes through to 2nd line relating to content issues lists the path as /contact, not the page the user is feeding back on.

  • Capture the page the user started on using the /contact referrer, and saving it to a cookie
  • Pre-populate the specific page value with the value from the cookie if it’s been set, otherwise use document.referrer

https://trello.com/c/G72rMseU/29-user-journey-to-contact-page-is-captured-medium

There's a whitespace change so I recommend using ?w=1 when reviewing.

cc @benilovj

fofr added 3 commits Jul 9, 2015
The 'Specific page' field on the /contact/govuk form auto-populates
with the previous page (ie the one the user followed the link from to
get there). Originally, this would usually have been the page the user
had been on when they spotted the issue they want to raise however,
since we introduced the interstitial /contact page almost all traffic
comes via this page
- this means almost all named feedback that comes through to 2nd line
relating to content issues lists the path as /contact, not the page the
user is feeding back on.

* Capture the original page the user started on, using the referrer to
the /contact page, and saving it to a cookie
* Pre-populate the specific page value with the value from the cookie
if it’s been set
boffbowsh added a commit that referenced this pull request Jul 9, 2015
Correctly populate the "specific page" field on the contact form
@boffbowsh boffbowsh merged commit fe69689 into master Jul 9, 2015
1 check passed
1 check passed
default "Build #81 succeeded on Jenkins"
Details
@boffbowsh boffbowsh deleted the save-referrer branch Jul 9, 2015
@benilovj
Copy link
Contributor

@benilovj benilovj commented Jul 9, 2015

The code looks good.

One design question: with this implementation, the specific page name is pre-populated but not selected in the feedback form. Unless the user actively selects the "a specific page" option, the URL won't make it through to the ticket. Should the "a specific page" be selected by default, or alternatively should the path be added to the form as a hidden parameter and then passed through into Zendesk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.