Sha256: 5e45863ff6df5365ec34acb8c8a95b0c334e1f4b9222b49208316aeb14b2ed04

Contents?: true

Size: 1.1 KB

Versions: 16

Compression:

Stored size: 1.1 KB

Contents

module DmCms
  module AnalyticsHelper

    # 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
    #------------------------------------------------------------------------------
    def google_analytics_tag
      if Rails.env.production?
        unless (tracking_id = current_account.preferred_google_analytics_tracker_id).blank?
          render partial: 'customized/analytics/google_analytics', locals: { tracking_id: tracking_id, domain_name: current_account.domain }
        end
      end    
    end
    
    #------------------------------------------------------------------------------
    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
  
    
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_cms-4.2.3.10 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.9 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.8 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.7 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.6 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.5 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.4 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.3 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.2 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3.1 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.3 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.2.3 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.2.2 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.2.1 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.2 app/helpers/dm_cms/analytics_helper.rb
dm_cms-4.2.1.5 app/helpers/dm_cms/analytics_helper.rb