Files
odoo_source/addons/website/views/res_config_settings_views.xml
T
Jeremy Kersten cccd6eb01d [IMP] website[_event,_sale]: add plausible as Analytics solution
This commit add the way to specify the Plausible shared key auth token and
the plausible domain on your website to have the Plausible Dashboard integrated
in your Website > Dashboard > Analytics menu.

Some custom event are already pre-configured as:

Push an event 'Shop' on confirmation on ecommerce (with amount bucket +/- 50)
Push an event 'Lead Generation' on:
    'Thank you' page of contactus
    Confirmation of subscription for an event

From this way, the end user can just add a goal 'Lead Generation'
or 'Shop' on Plausible to have the Goal values visible.

closes odoo/odoo#91058

Related: odoo/documentation#2007
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-18 20:33:34 +02:00

366 lines
24 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.website</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="20"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<!-- Remove customer accounts setting from general settings tab -->
<xpath expr="//div[@id='login_documents']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Website" string="Website" data-key="website" groups="website.group_website_designer">
<div class="row o_settings_container mb-0 mt-0 ml-0 mw-100"
style="background-color: #FEF0D0; margin-bottom: 0px !important; margin-top: 0px !important;">
<div class="col-xs-12 col-md-6 ml-0 o_setting_box">
<div class="o_setting_right_pane border-left-0 ml-0 pl-0">
<div class="content-group">
<div class="row mt8">
<label class="col-lg-3 pl-0" string="Settings of Website" for="website_id"/>
<field name="website_id" options="{'no_open': True, 'no_create': True}" title="Settings on this page will apply to this website"/>
<button name="action_website_create_new" type="object" string="+ New Website" class="btn-link ml-2" style="line-height: 0.5;"/>
</div>
</div>
</div>
</div>
</div>
<h2>Website Info</h2>
<div class="col-xs-12 col-md-6 row o_settings_container" id="website_info_settings">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane border-left-0">
<div class="content-group">
<div class="row mt8">
<label class="col-lg-3" string="Domain" for="website_domain"/>
<field name="website_domain" placeholder="https://www.odoo.com" title="Display this website when users visit this domain"/>
</div>
<div class="row mt8" groups="base.group_no_one">
<label class="col-lg-3" string="Country Groups" for="website_country_group_ids"/>
<field name="website_country_group_ids" widget="many2many_tags" title="Once the selection of available websites by domain is done, you can filter by country group. You can have 2 websites with same domain AND a condition on country group to select which website to use."/>
</div>
<div class="row mt8">
<label class="col-lg-3" string="Languages" for="language_ids"/>
<field name="language_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" attrs="{'required': [('website_id', '!=', False)]}" title="Languages available on your website"/>
</div>
<div class="row mt8" attrs="{'invisible': [('website_language_count', '&lt;', 2)]}">
<field name="website_language_count" invisible="1"/>
<label class="col-lg-3" string="Default" for="website_default_lang_id"/>
<field name="website_default_lang_id" options="{'no_open': True, 'no_create': True}" attrs="{'required': [('website_id', '!=', False)]}"/>
</div>
<div class="mt8">
<button type="action" name="%(base.action_view_base_language_install)d" string="Install languages" class="btn-link" icon="fa-arrow-right"/>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane border-left-0">
<div class="content-group">
<div class="row mt8">
<label class="col-lg-3" string="Website Name" for="website_name"/>
<field name="website_name" attrs="{'required': [('website_id', '!=', False)]}"/>
</div>
<div class="row mt8" groups="base.group_multi_company">
<label class="col-lg-3" string="Company" for="website_company_id"/>
<field name="website_company_id" attrs="{'required': [('website_id', '!=', False)]}" title="The company this website belongs to"/>
</div>
<div class="row mt8">
<label class="col-lg-3" string="Favicon" for="favicon"/>
<field name="favicon" widget="image" class="float-left oe_avatar"/>
</div>
</div>
</div>
</div>
</div>
<h2>Email &amp; Marketing</h2>
<div class="row mt16 o_settings_container" id="website_email_marketing">
<div class="col-xs-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_website_livechat"/>
</div>
<div class="o_setting_right_pane" id="livechat_right_pane">
<span class="o_form_label">Livechat</span>
<div class="text-muted">
Alows your visitors to chat with you
</div>
</div>
</div>
<div class="col-xs-12 col-lg-6 o_setting_box" id="website_marketing_automation">
<div class="o_setting_left_pane">
<field name="module_marketing_automation" widget="upgrade_boolean"/>
</div>
<div class="o_setting_right_pane">
<span class="o_form_label">Email Marketing</span>
<div class="text-muted">
Allows to do mass mailing campaigns to contacts
</div>
</div>
</div>
</div>
<h2>Privacy</h2>
<div class="row mt16 o_settings_container" id="website_settings" attrs="{'invisible': [('website_id', '=', False)]}">
<div class="col-12 col-lg-6 o_setting_box" id="website_cookies_bar_setting">
<div class="o_setting_left_pane">
<field name="website_cookies_bar" widget="website_cookiesbar_field"/>
</div>
<div class="o_setting_right_pane">
<label for="website_cookies_bar"/>
<div class="text-muted">
Display a customizable cookies bar on your website
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="shared_user_account_setting" groups="website.group_multi_website">
<div class="o_setting_left_pane">
<field name="shared_user_account"/>
</div>
<div class="o_setting_right_pane">
<label for="shared_user_account"/>
<div class="text-muted">
Accounts are usable across all your multiple websites
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
id="website_login_documents"
title=" To send invitations in B2B mode, open a contact or select several ones in list view and click on 'Portal Access Management' option in the dropdown menu *Action*.">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="auth_signup_uninvited"/>
<div class="text-muted">
Let your customers log in to see their documents
</div>
<div class="mt8">
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" options="{'horizontal': true}" required="True"/>
</div>
<div class="content-group" attrs="{'invisible': [('auth_signup_uninvited','=','b2b')]}">
<div class="mt8">
<button type="object" name="action_open_template_user" string="Default Access Rights" icon="fa-arrow-right" class="btn-link"/>
</div>
</div>
</div>
</div>
</div>
<h2>SEO</h2>
<div class="row mt16 o_settings_container" id="website_settings" attrs="{'invisible': [('website_id', '=', False)]}">
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="google_analytics_setting">
<div class="o_setting_left_pane">
<field name="has_google_analytics"/>
</div>
<div class="o_setting_right_pane">
<label for="has_google_analytics"/>
<div class="text-muted">
Track visits using Google Analytics
</div>
<div class="content-group" attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Measurement ID" for="google_analytics_key"/>
<field name="google_analytics_key" placeholder="G-XXXXXXXXXX"
attrs="{'required': [('has_google_analytics', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<a href="https://www.odoo.com/documentation/master/applications/websites/website/optimize/google_analytics.html"
class="oe_link" target="_blank">
<i class="fa fa-arrow-right"/>
How to get my Measurement ID
</a>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="cdn_setting" title="A CDN helps you serve your website’s content with high availability and high performance to any visitor wherever they are located." groups="base.group_no_one">
<div class="o_setting_left_pane">
<field name="cdn_activated"/>
</div>
<div class="o_setting_right_pane">
<label for="cdn_activated"/>
<div class="text-muted">
Use a CDN to optimize the availability of your website's content
</div>
<div class="content-group" attrs="{'invisible': [('cdn_activated', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" for="cdn_url"/>
<field name="cdn_url"
attrs="{'required': [('cdn_activated', '=', True)]}"
placeholder="//mycompany.mycdn.com/"
t-translation="off"/>
</div>
<div class="row" >
<label class="col-lg-3 o_light_label" for="cdn_filters"/>
<field name="cdn_filters" class="oe_inline"
attrs="{'required': [('cdn_activated', '=', True)]}"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="robots_setting">
<div class="o_setting_right_pane">
<span class="o_form_label">Robots.txt</span>
<div class="text-muted">
Robots.txt: This file tells to search engine crawlers which pages or files they can or can't request from your site.<br/>
</div>
<div class="mt4">
<button type="object" name="action_open_robots" string="Edit robots.txt" class="btn-link" icon="fa-android"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="robots_setting">
<div class="o_setting_right_pane">
<span class="o_form_label">Sitemap</span>
<div class="text-muted mt8">
Sitemap.xml: Help search engine crawlers to find out what pages are present and which have recently changed, and to crawl your site accordingly. This file is automatically generated by Odoo.
</div>
<div class="mt4">
<button type="object" name="action_ping_sitemap" string="Submit sitemap to Google" class='btn-link' icon="fa-google"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="social_default_image_setting">
<div class="o_setting_left_pane">
<field name="has_default_share_image"/>
</div>
<div class="o_setting_right_pane">
<label string="Default Social Share Image" for="has_default_share_image"/>
<div class="text-muted">
If set, replaces the website logo as the default social share image.
</div>
<field name="social_default_image" widget="image" class="w-25 mt-2" attrs="{'invisible': [('has_default_share_image', '=', False)]}"/>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="google_console_setting">
<div class="o_setting_left_pane">
<field name="has_google_search_console"/>
</div>
<div class="o_setting_right_pane">
<label for="has_google_search_console"/>
<div class="text-muted">
Monitor Google Search results data
</div>
<div class="content-group" attrs="{'invisible': [('has_google_search_console', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Code" for="google_search_console"/>
<field name="google_search_console" placeholder="google1234567890123456.html"
attrs="{'required': [('has_google_search_console', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_search_console', '=', False)]}">
<small class='text-muted'>
<i class="fa fa-info"/>: type some of the first chars after 'google' is enough, we'll guess the rest.
</small>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="google_analytics_dashboard_setting" attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<div class="o_setting_left_pane">
<field name="has_google_analytics_dashboard"/>
</div>
<div class="o_setting_right_pane">
<label for="has_google_analytics_dashboard"/>
<div class="text-muted">
Follow your website traffic in Odoo.
</div>
<div class="content-group" attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Client ID" for="google_management_client_id"/>
<field name="google_management_client_id" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
<div class="row">
<label class="col-lg-3 o_light_label" string="Client Secret" for="google_management_client_secret"/>
<field name="google_management_client_secret" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
<a href="https://www.odoo.com/documentation/master/applications/websites/website/optimize/google_analytics_dashboard.html"
class="oe_link" target="_blank">
<i class="fa fa-arrow-right"/>
How to get my Client ID
</a>
</div>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="plausbile_setting">
<div class="o_setting_left_pane">
<field name="has_plausible_shared_key"/>
</div>
<div class="o_setting_right_pane">
<label for="has_plausible_shared_key"/>
<div class="text-muted">
Use Plausible.io, Simple and privacy-friendly Google Analytics alternative
</div>
<div class="content-group" attrs="{'invisible': [('has_plausible_shared_key', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Shared Link Auth" for="plausible_shared_key"/>
<field name="plausible_shared_key"
attrs="{'required': [('has_plausible_shared_key', '=', True)]}"/>
</div>
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Site" for="plausible_site"/>
<field name="plausible_site"
attrs="{'required': [('has_plausible_shared_key', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_plausible_shared_key', '=', False)]}">
<a href="https://www.odoo.com/documentation/master/applications/websites/website/optimize/plausible.html"
class="oe_link" target="_blank">
<i class="fa fa-arrow-right"/>
How to create my Plausible Shared Link
</a>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="action_website_configuration" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'website', 'bin_size': False}</field>
</record>
<menuitem id="menu_website_global_configuration" parent="menu_website_configuration"
sequence="100" name="Configuration" groups="base.group_system"/>
<menuitem name="Settings"
id="menu_website_website_settings"
action="action_website_configuration"
parent="menu_website_global_configuration"
groups="base.group_system"
sequence="10"/>
<menuitem id="menu_website_add_features" parent="website.menu_website_global_configuration"
sequence="20" groups="base.group_system" action="action_website_add_features"/>
<menuitem name="Websites"
id="menu_website_websites_list"
action="action_website_list"
parent="menu_website_global_configuration"
groups="base.group_no_one"
sequence="10"
/>
<menuitem name="Pages"
id="menu_website_pages_list"
action="action_website_pages_list"
parent="menu_website_global_configuration"
sequence="30"
/>
<menuitem name="Menus"
id="menu_website_menu_list"
action="action_website_menu"
parent="menu_website_global_configuration"
sequence="45"
groups="base.group_no_one"/>
</odoo>