{% extends "analytics/settings/_layout" %} {% import "_includes/forms" as forms %} {% set selectedNavItem = 'general' %} {% set content %}

{{ 'Google Analytics Account'|t('analytics') }}

{% if not oauthAccount or info.forceConnect %} {% if isOauthProviderConfigured %}

{{ 'Gettings errors trying to connect? Check your {link}.'|t('analytics', { link: 'OAuth settings' })|raw }}

{% if errors is defined and errors|length > 0 %} {% endif %}

{{"Connect"|t('analytics') }}

{% else %}

{{ 'To get started, go to the OAuth settings and configure your Google application’s client ID & secret.'|t('analytics') }}

{{"OAuth Settings"|t('analytics') }}

{% endif %} {% else %}

{{ 'You are authenticated to Google Analytics with the following account'|t('analytics') }} :

Google OAuth provider
  • {{ oauthAccount.name }}
  • {% if oauthAccount.email is defined and not oauthAccount.email is empty %}
  • {{ oauthAccount.email }}
  • {% elseif oauthAccount.uid is defined %}
  • {{ oauthAccount.uid }}
  • {% elseif oauthAccount.id is defined %}
  • {{ oauthAccount.id }}
  • {% endif %}

{{ csrfInput() }}

{{ 'Real-Time'|t('analytics') }}

{{ forms.checkboxField({ label: "Enable real-time reporting"|t('analytics'), name: 'settings[enableRealtime]', checked: (settings.enableRealtime ? settings.enableRealtime : false), toggle: 'enableRealtime' }) }}
{% endif %} {% endset %}