diff --git a/plugins/google-analytics.rb b/plugins/google-analytics.rb index ca06a5e2..b2cb3367 100644 --- a/plugins/google-analytics.rb +++ b/plugins/google-analytics.rb @@ -2,7 +2,7 @@ # This file is part of WhatWeb and may be subject to # redistribution and commercial restrictions. Please see the WhatWeb # web site for more information on licensing and terms of use. -# https://morningstarsecurity.com/research/whatweb +# https://www.morningstarsecurity.com/research/whatweb ## Plugin.define do name "Google-Analytics" @@ -24,7 +24,12 @@ matches [ # New Google Universal Analytics # String : ga('create', 'UA-12345678-1', 'example.com'); # String : ga('create', 'UA-1234567-12', 'example.com'); - { :version=>"Universal", :account=>/ga\([\s]*'create',[\s]*'(\w{2}-\d{1,}-\d{1,})',/} + { :version=>"Universal", :account=>/ga\([\s]*'create',[\s]*'(\w{2}-\d{1,}-\d{1,})',/}, + + # Added by ippolito 2021-10-19 + { :regexp=>/[^a-zA-Z\d_\-\.](gtag\.js|analytics\.js)/, :version=>"Universal"}, + { :regexp=>/[^a-zA-Z\d_\-\.]ga\.js/, :version=>"Classic"}, + { :account=>/