{% macro analytics(account) -%} {% endmacro %} {% macro uanalytics(id, options='auto', domain=None) %} {# The uanalytics macro currently contains a hack to support legacy code. The old signature was ``uanalytics(id, domain)`` when domain was a required parameter that was passed on to the ga() function. To preserve old behavior, if options is not a dictionary, it is passed on unchanged. The ``domain`` parameter is added to not break calls with named parameters, it will override any other value for options. More modern code can simply pass any desired option to the analytics function as desired. #} {%- if domain != None %} {%- set options = domain %} {%- endif %} {% endmacro %}