def add_analytics(self, doc):
        google = doc.jscontext['google']
        analytics = self.config.get('analytics')
        if analytics and 'id' in analytics:
            google['analytics'] = analytics
            if 'ga' not in analytics:
                analytics['ga'] = 'ga'
            txt = GOOGLE_ANALYTICS.substitute(analytics)
            doc.head.append(txt)
dataset/ETHPy150Open quantmind/lux/lux/extensions/oauth/google/__init__.py/Google.add_analytics/original