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 GA params to /ask survey link #1744

Merged
merged 5 commits into from
Apr 24, 2020
Merged

Add GA params to /ask survey link #1744

merged 5 commits into from
Apr 24, 2020

Conversation

chao-xian
Copy link
Contributor

@chao-xian chao-xian commented Apr 23, 2020

We need to be able to compare the number of people who go on to see the survey vs the people who complete so that we can work out the rate.

Trello https://trello.com/c/La96nEZw


Visual regression results:
https://government-frontend-pr-1744.surge.sh/gallery.html

@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 15:15 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 15:34 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 793dbe5 to 2d012e5 Compare April 23, 2020 15:41
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 15:41 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 2d012e5 to f5e41d7 Compare April 23, 2020 15:56
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 15:56 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from f5e41d7 to 88355e9 Compare April 23, 2020 16:02
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 16:02 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 88355e9 to 8f84285 Compare April 23, 2020 16:27
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 16:27 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 17:22 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 410e166 to 8f84285 Compare April 23, 2020 17:29
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 23, 2020 17:30 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 8f84285 to 958f097 Compare April 24, 2020 10:44
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 10:44 Inactive
This clearly can be de-duplicated between SetGaClientIdOnForm,
which will come in future commit.
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 958f097 to b0daccb Compare April 24, 2020 11:45
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 11:45 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 13:34 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 69ab950 to d8c15f9 Compare April 24, 2020 13:37
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 13:37 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from d8c15f9 to 1b31ea1 Compare April 24, 2020 13:53
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 13:54 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 1b31ea1 to 37d322e Compare April 24, 2020 14:14
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 14:14 Inactive
@chao-xian chao-xian marked this pull request as ready for review April 24, 2020 14:19
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 37d322e to 6aed666 Compare April 24, 2020 14:25
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 14:25 Inactive
@chao-xian chao-xian force-pushed the add-ga-param-for-ask branch from 6aed666 to 316dad6 Compare April 24, 2020 14:26
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 14:26 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-ga-par-bl2co0 April 24, 2020 14:30 Inactive
@chao-xian chao-xian merged commit f9f5f07 into master Apr 24, 2020
@chao-xian chao-xian deleted the add-ga-param-for-ask branch April 24, 2020 15:23
kevindew added a commit to alphagov/frontend that referenced this pull request May 8, 2020
The gov.uk/ask service cannot use the existing cross-domain tracking
abilities set-up in publisher as we do not have google analytics running
on the destination Smart Survey, instead we need to pass this via a
query string variable.

To achieve this we look for any links to our particular Smart Survey
when the page loads for users who have allowed Google Analytics and then
add a query string of the client Id from Analytics.

This change ports over the work from alphagov/government-frontend#1744
which was done to enable this to run on an Answer page format, moving it
here allows this to be done on a transaction format instead.

I've put in the famous last words in a comment of "this should only be
short term" hopefully this doesn't come back to haunt me.
kevindew added a commit to alphagov/frontend that referenced this pull request May 11, 2020
The gov.uk/ask service cannot use the existing cross-domain tracking
abilities set-up in publisher as we do not have google analytics running
on the destination Smart Survey, instead we need to pass this via a
query string variable.

To achieve this we look for any links to our particular Smart Survey
when the page loads for users who have allowed Google Analytics and then
add a query string of the client Id from Analytics.

This change ports over the work from alphagov/government-frontend#1744
which was done to enable this to run on an Answer page format, moving it
here allows this to be done on a transaction format instead.

I've put in the famous last words in a comment of "this should only be
short term" hopefully this doesn't come back to haunt me.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants