ORCID / orcid-angular

Angular UI for ORCID
MIT License
20 stars 17 forks source link

Google analytics events to migrate #210

Open leomendoza123 opened 4 years ago

leomendoza123 commented 4 years ago

The following is a list of the currently existing Orcid Source GA events, that need to be migrated to Orcid Angular.

Sign-In

https://github.com/ORCID/ORCID-Source/blob/master/orcid-web/src/main/webapp/static/javascript/script.js#L509

//gaString: is the <clientGroupName>-<clientName>
orcidGA.gaPush(['send', 'event', 'RegGrowth', 'Sign-In', 'OAuth ' + gaString])
orcidGA.gaPush(['send', 'event', 'RegGrowth', 'Sign-In', 'Website'])

Authorize

https://github.com/ORCID/ORCID-Source/blob/master/orcid-web/src/main/webapp/static/javascript/ng1Orcid/app/modules/oauthAuthorization/oauthAuthorization.component.ts#L367

// gaString: is the <clientGroupName>-<clientName>
// auth_scope_prefix: is a either Authorize_ or AuthorizeP_ for `persistentTokenEnabled` forms
// scope: is the requested scope
orcidGA.gaPush(['send', 'event', 'RegGrowth', auth_scope_prefix + scope, 'OAuth ' + this.gaString]);

Authorize_Deny

https://github.com/ORCID/ORCID-Source/blob/4f3714b70724c1d2d41035a856cdca2a359c1656/orcid-web/src/main/webapp/static/javascript/ng1Orcid/app/modules/oauthAuthorization/oauthAuthorization.component.ts#L244 // gaString: is the -

orcidGA.gaPush(['send', 'event', 'Disengagement', 'Authorize_Deny', 'OAuth ' + this.gaString]);

New-Registration

https://github.com/ORCID/ORCID-Source/blob/master/orcid-web/src/main/webapp/static/javascript/ng1Orcid/app/modules/oauthAuthorization/oauthAuthorization.component.ts#L618

// gaString: is the <clientGroupName>-<clientName>
orcidGA.gaPush(['send', 'event', 'RegGrowth', 'New-Registration', 'OAuth ' + this.gaString]);
orcidGA.gaPush(['send', 'event', 'RegGrowth', 'New-Registration', 'Website']);

New-Registration-Submit

https://github.com/ORCID/ORCID-Source/blob/master/orcid-web/src/main/webapp/static/javascript/ng1Orcid/app/modules/oauthAuthorization/oauthAuthorization.component.ts#L656

// gaString: is the <clientGroupName>-<clientName>
orcidGA.gaPush(['send', 'event', 'RegGrowth', 'New-Registration-Submit' , 'OAuth ' + this.gaString]);
orcidGA.gaPush(['send', 'event', 'RegGrowth', 'New-Registration-Submit', 'Website']);
leomendoza123 commented 4 years ago

Register: GA events

leomendoza123 commented 4 years ago

Signin: Support GA events

leomendoza123 commented 4 years ago

OAuth authorization (5) or more likely an (8)

leomendoza123 commented 4 years ago

On the old register the events related to registration are the following:

1- New-Registration-Submit triggered after the user clicks submit, even if the form is completely empty, invalid or the account is duplicated.

2- trigger the 'New-Registration` event when a new account is created

Migrate the second one is straight forward, but migrate the first is not the same since the user can only see the submit button after going thought 2 validate steps and check for duplicated accounts.

leomendoza123 commented 4 years ago

As suggested on the card https://trello.com/c/YsTvisp2/263-add-a-cookie-auth-event-to-ga the New-Registration-Submit will be removed on this migration.

@lizkrznarich @amontenegro @TomDemeranville

leomendoza123 commented 4 years ago

OAuth authorization (8)