-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into ds2621
- Loading branch information
Showing
26 changed files
with
418 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
class @GoogleAnalytics | ||
|
||
@load: -> | ||
# Google Analytics depends on a global _gaq array. window is the global scope. | ||
window._gaq = [] | ||
window._gaq.push ["_setAccount", GoogleAnalytics.analyticsId()] | ||
|
||
# Create a script element and insert it in the DOM | ||
ga = document.createElement("script") | ||
ga.type = "text/javascript" | ||
ga.async = true | ||
ga.src = ((if "https:" is document.location.protocol then "https://ssl" else "http://www")) + \ | ||
".google-analytics.com/ga.js" | ||
firstScript = document.getElementsByTagName("script")[0] | ||
firstScript.parentNode.insertBefore ga, firstScript | ||
|
||
# If Turbolinks is supported, set up a callback to track pageviews on page:change. | ||
# If it isn't supported, just track the pageview now. | ||
if typeof Turbolinks isnt 'undefined' and Turbolinks.supported | ||
document.addEventListener "page:change", (-> | ||
GoogleAnalytics.trackPageview() | ||
), true | ||
else | ||
GoogleAnalytics.trackPageview() | ||
|
||
@trackPageview: (url) -> | ||
unless GoogleAnalytics.isLocalRequest() | ||
if url | ||
window._gaq.push ["_trackPageview", url] | ||
else | ||
window._gaq.push ["_trackPageview"] | ||
window._gaq.push ["_trackPageLoadTime"] | ||
|
||
@isLocalRequest: -> | ||
GoogleAnalytics.documentDomainIncludes "local" | ||
|
||
@documentDomainIncludes: (str) -> | ||
document.domain.indexOf(str) isnt -1 | ||
|
||
@analyticsId: -> | ||
# your google analytics ID(s) here... | ||
'UA-101586720-1' | ||
|
||
GoogleAnalytics.load() |
6 changes: 6 additions & 0 deletions
6
app/assets/javascripts/templates/visualizations/controls/tip.hbs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="full-width"> | ||
<div class="vis-ctrl-tip" data-log-id="ctrl-tip"> | ||
<p><strong>Bar graph not looking helpful?</strong><br> | ||
Try grouping by <a id='control-tip-link'>{{field}}.</a></p> | ||
</div> | ||
</div> |
This file contains 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
This file contains 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
Oops, something went wrong.