{% extends "analytics/_layouts/settings" %} {% import "_includes/forms" as forms %} {% macro configWarning(setting, file) -%} {{ "This is being overridden by the {setting} config setting."|t({ setting: ''~setting~'' })|raw }} {%- endmacro %} {% from _self import configWarning %} {% set content %} {% if not account %}

{{'Google Analytics Account'|t}}

{{'You need to connect Craft to a Google account in order to get started.'|t}}

{{"Getting errors trying to connect ?"|t}} {{"Check Google API key & secret in OAuth settings"|t}}.

{{"Connect to Google Analytics"|t}}

{% else %}
{{ getCsrfInput() }}

{{'Google Analytics Account'|t}}

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

{{'Disconnect'|t}}


{{'Plugin Settings'|t}}

{{ forms.selectField({ first: true, label: "Web Property"|t, instructions: "Select an Analytics web profile to associate with your Craft website"|t, options: propertiesOpts, name: 'settings[webPropertyId]', value: settings.webPropertyId }) }} {{ forms.checkboxField({ label: "Enable real-time"|t, warning: (craft.config.get('enableRealtime', 'analytics') ? configWarning('enableRealtime')), name: 'settings[enableRealtime]', checked: (settings.enableRealtime ? settings.enableRealtime : false), toggle: 'enableRealtime' }) }}
{% endif %} {% endset %}