Module: GoogleAnalytics::AnalyticsHelper
- Defined in:
- app/helpers/google_analytics/analytics_helper.rb
Instance Method Summary collapse
Instance Method Details
#google_analytics ⇒ Object
2 3 4 |
# File 'app/helpers/google_analytics/analytics_helper.rb', line 2 def google_analytics render "google_analytics/tracking_code" if render_google_analytics? end |
#render_google_analytics? ⇒ Boolean
6 7 8 |
# File 'app/helpers/google_analytics/analytics_helper.rb', line 6 def render_google_analytics? Rails.env.production? && site.google_analytics_code? && !request.env['wheelhouse.preview'] end |