Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Additional GA Event and Modal View Tracking #373

Merged
merged 1 commit into from
Mar 23, 2015

Conversation

adamlofting
Copy link
Contributor

Fixes #362 by adding further analytics tracking events to key points in the UX.

* @param {String} modalName e.g. 'add-or-edit-club'
*/
modalview: function (modalName) {
path = '/modal/' + modalName;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we decide to make the modals visible at their own URLs so that e.g. the "add your club" modal is visible at "/mozilla-web-clubs/add/", is this solution compatible with that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to clarify, would that mean there are two ways to the display the form? (ie as a modal, and as a standalone page)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, it'd just be the case that /mozilla-web-clubs/add would show you the "darkened" page in the background w/ the modal focused in front of it, and anything that currently opens the modal via JS would instead just be a clickable link to /mozilla-web-clubs/add. The fancypants router would then trigger the transition to the modal.

If that is really weird and nobody else does it then we don't have to... I just like every "thing" on a page to have a URL I guess. It's also a bit annoying to implement in the current architecture so it wouldn't be implemented in v1.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, aside from that, it would theoretically allow us to support people actually using those modals on browsers with JS disabled. Additional work beyond just making the modals have their own URLs would need to be done, though. Again though, not sure whether the modals are considered "progressive" or "required" functionality--I'd think at least the "learn more" would be required, but I suppose we could always have that link be a mailto: link w/ the progressive enhancement being the modal...

Anyways, that's off-topic for now I guess!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's interesting, and I've not seen it done before.

If we make that switch, I think we would have pageview tracking via the router, and we could remove the extra tracking in the modal module.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, cool--I just wanted to make sure it wouldn't screw up metrics that we track over time, e.g. because what used to be the '/modal/addclub"route" in ga suddenly changes to/mozilla-web-clubs/add`.

Thanks!

@toolness
Copy link
Contributor

This looks rad! Thanks @adamlofting.

toolness added a commit that referenced this pull request Mar 23, 2015
Additional GA Event and Modal View Tracking
@toolness toolness merged commit 33a5721 into mozilla:develop Mar 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants