Closed wdwatkins closed 7 years ago
@wdwatkins where do these functions get associated with the svg elements? Must have missed that
Uhh I'm guessing something in the svg calls these JS functions? @jiwalker-usgs ?
What do you need "fix for edge states"? Are those edge cases or actual states on the edges of the map?
Actual states on the edge of the map, the delay count for the ga
call doesn't get cut off when the mouse leaves the map. So the last state you touch always hits ga regardless of time you hovered on it. As @jiwalker-usgs mentioned in his review
@jiwalker-usgs @jread-usgs How much of a priority is a fix for ☝️ ? Seems like it requires some modifications beyond just where we put the ga()
call.
The main thing I'm concerned with is flooding google with too many events, I think biasing towards coastal states with our analytics will just be something we have to deal with.
@jread-usgs can you comment on @wdwatkins question and @jiwalker-usgs 's response? Want to get this wrapped up...
I don't think we should collect data on it if we can't remove the coastal bias. It would be really hard to use the data.
I would vote we either solve the issue, or not track that event.
It seems like solving it would require creating some kind of polygon for the area outside of the map. Then the counter would be reset when the mouse moves off the map, and we could do a check to not send analytics for that shape. But if that isn't worth doing, I'd say scrap it.
Or if there is a way the hover can simply know that the mouse is over no shape.
@wdwatkins there is a background rectangle for the whole thing, so if you are on top of that, you are on nothing else (because it is behind everything else). That may be a solution if you put mouseover event on that to end the count.
issue with edge states should be fixed, now with thumbnail also for #103
@jiwalker-usgs all good to merge?
I would say :shipit:
Currently recording category changes, year changes with each category, and state hovers > 2 sec