{% extends "_layouts/cp" %} {% set crumbs = [ { label: "Settings"|t('analytics'), url: url('settings') }, { label: "Plugins"|t('analytics'), url: url('settings/plugins') }, { label: "Analytics"|t('analytics'), url: url('analytics/settings') } ] %} {% set title = "OAuth Settings"|t('analytics')%} {% import "_includes/forms" as forms %} {% set content %}
{{ csrfInput() }}

{{ 'Create the OAuth application'|t('analytics') }}

{{ 'Go to the {link} and create a new project or use an existing one.'|t('analytics', {link: ''~'Google API Console'|t('analytics')~''})|raw }}

{{ "In API Manager → Library, search for “analytics” and enable the “Analytics API”."|t('analytics') }}

{{ "In API Manager → Credentials, click the “Create credential” button and create a new “OAuth client ID” of type “Web Application”."|t('analytics', {link: ''~'Google API Console'|t('analytics')~''})|raw }}

{{ "Configure the client with the following javascript origin and redirect urls."|t('analytics') }}

{{ 'Configure the OAuth client'|t('analytics') }}

{{ 'Once the OAuth client is created, Google will provide you with a client ID and secret.'|t('analytics') }}

{{ ("Copy the client ID & secret from the "~'Google Api Console'|t('analytics')~" under the API Manager → Credentials tab, paste them below and save.")|raw }}

{{ forms.textField({ label: "Client ID", name: 'settings[oauthClientId]', value: settings.oauthClientId }) }} {{ forms.textField({ label: "Client Secret", name: 'settings[oauthClientSecret]', value: settings.oauthClientSecret }) }}
{% endset %}