Module: DmCms::AnalyticsHelper

Included in:
RenderHelper
Defined in:
app/helpers/dm_cms/analytics_helper.rb

Instance Method Summary collapse

Instance Method Details

#google_analytics_tagObject

Will insert the google analytics code. First it checks that the GA code was specified in the account. If a theme wants different/more complex analytics code, then they can override the ‘customized/analytics/google_analytics’ partial




8
9
10
11
12
13
14
# File 'app/helpers/dm_cms/analytics_helper.rb', line 8

def google_analytics_tag
  if Rails.env.production?
    unless (tracking_id = .preferred_google_analytics_tracker_id).blank?
      render partial: 'customized/analytics/google_analytics', locals: { tracking_id: tracking_id, domain_name: .domain }
    end
  end    
end

#mint_tagObject




17
18
19
20
21
22
23
# File 'app/helpers/dm_cms/analytics_helper.rb', line 17

def mint_tag
  # if Rails.env.production? && !request.ssl?
  #   "" # [todo] "<script src='/mint/?js' type='text/javascript'></script>".html_safe
  # elsif Rails.env.production? && request.ssl?
  #   "" # [todo] "<script src='/mint/?js' type='text/javascript'></script>".html_safe
  # end
end