Sha256: 901d064152616fc850493c7912b57a207da8ab7e62dbe78462b1c85c92e0d055

Contents?: true

Size: 990 Bytes

Versions: 17

Compression:

Stored size: 990 Bytes

Contents

module ApplicationHelper
    module Amp::Components::AnalyticsTagHelper

        def amp_analytics vendor = AmpHtml.analytics_default_vendor, options = {}, &block
            options = options.symbolize_keys
            options[:type] = vendor if vendor
            if block_given?
                content_tag 'amp-analytics', capture(&block), options
            else
                content_tag 'amp-analytics', nil, options
            end
        end
        def amp_google_analytics options = {}
            options = options.symbolize_keys

            options[:type] = 'googleanalytics'
            triggers = options[:triggers]
            content_tag('amp-analytics', options) do
                render 'application/amp/components/google_analytics', triggers: triggers
            end
        end

        def amp_pixel src
            options = {}
            options[:src] = src
            content_tag 'amp-pixel', options
        end

    end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
amp-html-1.2.1 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-1.2.0 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-1.1.0 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-1.0.1 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-1.0.0 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.18 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.17 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.16 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.15 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.14 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.13 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.12 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.11 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.10 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.9 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.8 lib/generators/templates/components/helpers/analytics_tag_helper.rb
amp-html-0.7.7 lib/generators/templates/components/helpers/analytics_tag_helper.rb