//// Included in: - user-manual: Extensions: Docinfo Processor example //// Purpose:: Appends the Google Analytics tracking code to the bottom of an HTML document. .GoogleAnalyticsDocinfoProcessor ```ruby class GoogleAnalyticsDocinfoProcessor < Asciidoctor::Extensions::DocinfoProcessor use_dsl at_location :footer def process document return unless (ga_account_id = document.attr 'google-analytics-account') %() end end ``` .Usage ```ruby Asciidoctor::Extensions.register do docinfo_processor GoogleAnalyticsDocinfoProcessor end Asciidoctor.convert_file 'sample.adoc', :safe => :safe, :attributes => 'UA-ABCXYZ123' ```