![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
middleman-google-analytics
Advanced tools
middleman-google-analytics is a Middleman
extension that generates
Google Analytics tracking code, and
keeps your config in config.rb
, where it belongs.
Gemfile
:gem 'middleman-google-analytics', '~> 3.0'
config.rb
:# config.rb
activate :google_analytics do |ga|
ga.tracking_id = 'UA-XXXXXXX-X' # Replace with your property ID.
end
google_analytics_tag
and include
the results in the page:Haml:
= google_analytics_tag
ERB:
<%= google_analytics_tag %>
JavaScript with ERB (js.erb):
<%= google_analytics_tag %>
activate :google_analytics do |ga|
# Property ID (default = nil)
ga.tracking_id = 'UA-XXXXXXX-X'
# Removing the last octet of the IP address (default = false)
ga.anonymize_ip = false
# Tracking across a domain and its subdomains (default = nil)
ga.domain_name = 'example.com'
# Tracking across multiple domains and subdomains (default = false)
ga.allow_linker = false
# Enhanced Link Attribution (default = false)
ga.enhanced_link_attribution = false
# Log detail messages to the console (default = false)
ga.debug = false
# Trace debugging will output more verbose information to the console (default = false)
ga.debug_trace = false
# Disable extension (default = false)
ga.disable = true
# Testing your implementation without sending hits (default = true) in development
ga.test = true
# Compress the JavaScript code (default = false)
ga.minify = false
# Output style - :html includes <script> tag (default = :html)
ga.output = :js
end
Once you've bundled you should be able to run middleman as normal, and have it display the GA tracking code.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright (c) 2014-2016 Daniel Bayerlein. See LICENSE for details.
Copyright (c) 2013 Jon Frisby.
FAQs
Unknown package
We found that middleman-google-analytics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.