Skip to content

Conversation

@gfrancesco
Copy link

There are cases where putting analytics code in <head> is required, for example to verify a site with webmaster tools.

This PR adds a conf option to put code in <head> instead of <body>:

config.middleware.use("Rack::GoogleAnalytics", :web_property_id => "UA-XXXXXXXX-1", :async => true, :position => :head)

Code will be inserted in <body> if no :position option in provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant