Class: Roll::Amp::Script::AnalyticsScriptTag

Inherits:
IncludeScriptTag show all
Defined in:
lib/roll/amp/script/analytics_script_tag.rb

Overview

The script tag that enables analytics on AMP pages.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from IncludeScriptTag

#to_html

Constructor Details

#initializeAnalyticsScriptTag

Initializes analytics script tag instance.



7
8
9
# File 'lib/roll/amp/script/analytics_script_tag.rb', line 7

def initialize
  super(AnalyticsScriptTag.src, 'amp-analytics')
end

Class Method Details

.srcString

Returns Link to the script.

Returns:

  • (String)

    Link to the script.



12
13
14
# File 'lib/roll/amp/script/analytics_script_tag.rb', line 12

def self.src
  'https://cdn.ampproject.org/v0/amp-analytics-0.1.js'.freeze
end