engine: record how many times a user has opened a log in stats [ch2194]#1456
Merged
Conversation
nicks
reviewed
Apr 8, 2019
| url := h.webURL | ||
| url.Path = fmt.Sprintf("/r/%s/", r.Name) | ||
| _ = browser.OpenURL(url.String()) | ||
| dispatch(OpenLogAction{ |
Contributor
There was a problem hiding this comment.
there's no good reason to put this in EngineState, create actions for it, etc. It's a lot of indirection that buys you nothing. just inject analytics into the HUD and call Incr() directly.
nicks
reviewed
Apr 8, 2019
| for index := 0; index < st.OpenLogCount; index++ { | ||
| ar.a.Incr("ui.interactions.log_open", map[string]string{}) | ||
| } | ||
| st.OpenLogCount = 0 |
Contributor
There was a problem hiding this comment.
also, for future reference, this assignment is a no-op. subscribers don't have write access to the EngineState. st isn't a pointer. This mutates a copy of the engine state, which is probably not what you intended.
jazzdan
force-pushed
the
jazzdan/log_log_view
branch
from
April 9, 2019 14:50
39d48c1 to
35abbd0
Compare
nicks
approved these changes
Apr 9, 2019
| } | ||
| url := h.webURL | ||
| url.Path = fmt.Sprintf("/r/%s/", r.Name) | ||
| h.a.Incr("ui.interactions.open_log", map[string]string{"is_tiltfile": strconv.FormatBool(r.Name == view.TiltfileResourceName)}) |
Contributor
There was a problem hiding this comment.
can you also add this for the other OpenBrowser>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's unclear to me how best to record this data. Any advice?