Sha256: 0b499e68ed3f421536e7e27d591a1a219b6c019451de491b151301bfa41688a2

Contents?: true

Size: 1.02 KB

Versions: 12

Compression:

Stored size: 1.02 KB

Contents

<script type="application/json">
{
    "vars": {
        "account": <%%= AmpHtml.google_analytics_account %>
    },
    "triggers": {
        "trackPageview": {
            "on": "visible",
            "request": "pageview",
        }<%% if triggers %>,<%% triggers.each do |name, trigger| %>
        <%%= name %>: {
            "on": <%%= trigger.on %>,
            "request": <%%= trigger.request %><%% if trigger.vars %>,
            "vars": {<%% trigger.vars.each do |variable| %><%% if variable.event_category %>
                "eventCategory": <%%= variable.event_category %>,<%% end %><%% if variable.event_action %>
                "eventAction": <%%= variable.event_action %><%% end %><%% if variable.title %>
                "title": <%%= variable.title %>,<%% end %><%% if variable.document_location %>
                "documentLocation": <%%= variable.document_location %><%% end %>
            }<%% end %>
        }<%% unless trigger == triggers.last %>,<%% end %><%% end %><%% end %>
    }
}
</script>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
amp-html-0.7.18 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.17 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.16 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.15 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.14 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.13 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.12 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.11 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.10 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.9 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.8 lib/generators/templates/components/views/_google_analytics.html.erb
amp-html-0.7.7 lib/generators/templates/components/views/_google_analytics.html.erb