code: def add_ga_javascript(app, pagename, templatename, context, doctree):
      if not app.config.googleanalytics_enabled:
          return
  
      metatags = context.get("metatags", "")
      metatags += (
          """<script type="text/javascript">
  
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', '%s']);
        _gaq.push(['_trackPageview']);
  
        (function() {
          var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
          ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
      </script>"""
          % app.config.googleanalytics_id
      )
      context["metatags"] = metatags
  
imports: from sphinx.errors import ExtensionError
label_desc: Use image node_id 1 for calling a global function with example usage: add_ga_javascript(app, pagename, templatename, context, doctree) without return types