@ -0,0 +1,46 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
||||
|
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
All In One Google Analytics |
||||
|
============================= |
||||
|
* Integrating Odoo with Google Analytics allows businesses to track user interactions and events within the Odoo application and send that data to their Google Analytics account |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* No additional configurations needed |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
Lesser General Public License, Version 3 (LGPL v3). |
||||
|
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
Developer: (V16) Gokul P I , Contact: odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import controllers |
||||
|
from . import models |
@ -0,0 +1,64 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'All In One Google Analytics', |
||||
|
'version': '16.0.1.0.0', |
||||
|
'category': 'Productivity', |
||||
|
'summary': 'By connecting Google Analytics to Odoo and tracking relevant ' |
||||
|
'events, you can make data-driven decisions, improve user' |
||||
|
'experience, and enhance the overall performance of your ' |
||||
|
'application.', |
||||
|
'description': 'Integrating Odoo with Google Analytics allows businesses to' |
||||
|
'track user interactions and events within the Odoo ' |
||||
|
'application and send that data to their Google Analytics ' |
||||
|
'account.This integration empowers businesses to improve ' |
||||
|
'user experience and overall application performance.', |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'depends': ['website_sale', 'purchase', 'sale_management'], |
||||
|
'data': [ |
||||
|
'views/gtag_templates.xml', |
||||
|
'views/res_config_settings_views.xml', |
||||
|
], |
||||
|
'assets': { |
||||
|
'web.assets_frontend': [ |
||||
|
'google_analytics_odoo/static/src/js/add_to_cart.js', |
||||
|
'google_analytics_odoo/static/src/js/signup.js', |
||||
|
'google_analytics_odoo/static/src/js/wishlist.js', |
||||
|
'google_analytics_odoo/static/src/js/login.js', |
||||
|
'google_analytics_odoo/static/src/js/checkout.js', |
||||
|
'google_analytics_odoo/static/src/js/paynow.js', |
||||
|
], |
||||
|
'web.assets_backend': [ |
||||
|
'google_analytics_odoo/static/src/js/backend.js', |
||||
|
] |
||||
|
}, |
||||
|
'images': [ |
||||
|
'static/description/banner.png', |
||||
|
], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import account_move |
||||
|
from . import google_analytics_odoo |
||||
|
from . import payment_details |
||||
|
from . import product_details |
||||
|
from . import purchase_order |
||||
|
from . import sale_order |
@ -0,0 +1,42 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
|
||||
|
|
||||
|
class InvoiceDetails(http.Controller): |
||||
|
""" This class contains |
||||
|
functions for getting invoice details. |
||||
|
Methods: |
||||
|
get_invoice_details(): |
||||
|
Returns the invoice details when confirming the invoice""" |
||||
|
|
||||
|
@http.route('/invoice_analytics', type="json", auth="public") |
||||
|
def invoice_details(self, **kw): |
||||
|
""" Returns the invoice details""" |
||||
|
order = request.env['account.move'].browse( |
||||
|
int(kw.get('order_id'))).read() |
||||
|
return { |
||||
|
'invoice_data': {'name': order[0].get('name'), |
||||
|
'amount': order[0].get('amount_total'), |
||||
|
'customer': order[0].get('partner_id')[1]}, |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
from odoo.addons.web.controllers import home |
||||
|
|
||||
|
|
||||
|
class GoogleAnalytics(home.Home): |
||||
|
"""This class is inheriting the controller web and add a |
||||
|
Method |
||||
|
Methods: |
||||
|
google_analytics(): |
||||
|
Returns the Measurement id and api secret""" |
||||
|
|
||||
|
@http.route('/analytics', type="json", auth="public") |
||||
|
def google_analytics(self): |
||||
|
"""Returns the Measurement id and api secret""" |
||||
|
return { |
||||
|
'measurement_id': request.env[ |
||||
|
'ir.config_parameter'].sudo().get_param( |
||||
|
'google_analytics_odoo.measurement_id_analytics'), |
||||
|
'api_secret': request.env['ir.config_parameter'].sudo().get_param( |
||||
|
'google_analytics_odoo.api_secret'), |
||||
|
'enable_analytics': request.env[ |
||||
|
'ir.config_parameter'].sudo().get_param( |
||||
|
'google_analytics_odoo.enable_analytics'), |
||||
|
} |
||||
|
|
@ -0,0 +1,43 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
|
||||
|
|
||||
|
class PaymentDetails(http.Controller): |
||||
|
""" This class contains |
||||
|
functions for getting Payment details. |
||||
|
Methods: |
||||
|
get_payment_details(); |
||||
|
Returns the payment details when a customer pays |
||||
|
through the website""" |
||||
|
|
||||
|
@http.route('/get_payment_details', type="json", auth="public") |
||||
|
def get_payment_details(self, payments): |
||||
|
""" Returns the payment details""" |
||||
|
return { |
||||
|
'payment': request.env['payment.provider'].sudo().browse( |
||||
|
int(payments['payment_option_id'])).name, |
||||
|
'amount': payments['amount'], |
||||
|
'partner': request.env['res.partner'].sudo().browse( |
||||
|
int(payments['partner_id'])).name |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
|
||||
|
|
||||
|
class ProductDetails(http.Controller): |
||||
|
"""This class It contains |
||||
|
functions for getting the product details. |
||||
|
Methods: |
||||
|
get_product_details(): |
||||
|
Returns the product details for sending the events to |
||||
|
Analytics through js """ |
||||
|
@http.route('/product_analytics', type="json", auth="public") |
||||
|
def product_details(self, **kw): |
||||
|
"""Returns the product details""" |
||||
|
return request.env['product.product'].sudo().browse( |
||||
|
int(kw.get('product_id'))).read() |
@ -0,0 +1,36 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
|
||||
|
|
||||
|
class PurchaseDetails(http.Controller): |
||||
|
@http.route('/purchase_analytics', type="json", auth="public") |
||||
|
def purchase_details(self, **kw): |
||||
|
"""Returns the purchase order details""" |
||||
|
order = request.env['purchase.order'].browse( |
||||
|
int(kw.get('order_id'))).read() |
||||
|
return { |
||||
|
'purchase_data': {'name': order[0].get('name'), |
||||
|
'amount': order[0].get('amount_total'), |
||||
|
'customer': order[0].get('partner_id')[1]} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
|
||||
|
|
||||
|
class SalesDetails(http.Controller): |
||||
|
"""This class It contains |
||||
|
functions for getting the sale order details. |
||||
|
Methods: |
||||
|
get_order_details(): |
||||
|
Returns the Sale order details when confirming the |
||||
|
purchase order """ |
||||
|
|
||||
|
@http.route('/sale_analytics', type="json", auth="public") |
||||
|
def sales_details(self, **kw): |
||||
|
"""Returns the Sale order details""" |
||||
|
order = request.env['sale.order'].browse( |
||||
|
int(kw.get('order_id'))).read() |
||||
|
product_data = [] |
||||
|
for rec in request.env['sale.order'].browse( |
||||
|
int(kw.get('order_id'))).mapped('order_line'): |
||||
|
lines = request.env['sale.order.line'].browse(int(rec)) |
||||
|
product_data.append({ |
||||
|
'product_name': lines.name, |
||||
|
'price': lines.price_unit, |
||||
|
'quantity': lines.product_uom_qty, |
||||
|
'total_price': lines.price_total, |
||||
|
}) |
||||
|
return { |
||||
|
'sales_data': {'name': order[0].get('name'), |
||||
|
'amount': order[0].get('amount_total'), |
||||
|
'customer': order[0].get('partner_id')[1]}, |
||||
|
'product_data': product_data |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
## Module <google_analytics_odoo> |
||||
|
|
||||
|
#### 18.11.2023 |
||||
|
#### Version 16.0.1.0.0 |
||||
|
#### ADD |
||||
|
- Initial commit for All In One Google Analytics |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import res_config_settings |
@ -0,0 +1,60 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Gokul PI (<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
"""This class is inheriting the model 'product.product', It contains |
||||
|
fields and functions for the model. |
||||
|
Methods: |
||||
|
get_analytics_details(): |
||||
|
Returns the Analytics details """ |
||||
|
_inherit = 'res.config.settings' |
||||
|
|
||||
|
measurement_id_analytics = fields.Char( |
||||
|
config_parameter= |
||||
|
'google_analytics_odoo.measurement_id_analytics', |
||||
|
string='Measurement ID', |
||||
|
help='Measurement id of the google analytics') |
||||
|
api_secret = fields.Char( |
||||
|
config_parameter= |
||||
|
'google_analytics_odoo.api_secret', |
||||
|
string='API Secret', |
||||
|
help='API secret of the google analytics') |
||||
|
enable_analytics = fields.Boolean(config_parameter= |
||||
|
'google_analytics_odoo.enable_analytics', |
||||
|
string='Enable Analytics', |
||||
|
help='Enable to send events to' |
||||
|
'google analytics') |
||||
|
|
||||
|
def get_analytics_details(self): |
||||
|
"""Returns the Google Analytics details """ |
||||
|
return { |
||||
|
'measurement_id': self.env['ir.config_parameter'].sudo().get_param( |
||||
|
'google_analytics_odoo.measurement_id_analytics'), |
||||
|
'api_secret': self.env['ir.config_parameter'].sudo().get_param( |
||||
|
'google_analytics_odoo.api_secret'), |
||||
|
'enable_analytics': self.env[ |
||||
|
'ir.config_parameter'].sudo().get_param( |
||||
|
'google_analytics_odoo.enable_analytics'), |
||||
|
'user': self.env.user.name |
||||
|
} |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 284 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 184 KiB |
After Width: | Height: | Size: 197 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 180 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,711 @@ |
|||||
|
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;"> |
||||
|
<!-- TITLE BAR --> |
||||
|
<div class="d-flex align-items-center justify-content-between" |
||||
|
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> |
||||
|
<img src="./assets/misc/cybrosys-logo.png" width="42" height="42" |
||||
|
style="width: 42px; height: 42px;"/> |
||||
|
<div> |
||||
|
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
||||
|
class="mr-2"> |
||||
|
<i class="fa fa-check mr-1"></i>Community |
||||
|
</div> |
||||
|
<div style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
||||
|
class="mr-2"> |
||||
|
<i class="fa fa-check mr-1"></i>Enterprise |
||||
|
</div> |
||||
|
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
||||
|
class="mr-2"> |
||||
|
<i class="fa fa-check mr-1"></i>Odoo SH |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF TITLE BAR --> |
||||
|
<div class="col-sm-12 col-md-12 col-lg-12" |
||||
|
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;"> |
||||
|
<!-- APP HERO --> |
||||
|
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> |
||||
|
All In One Google Analytics</h1> |
||||
|
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> |
||||
|
Google Analytics Allows You To Track User Interactions And Events |
||||
|
Within Your Odoo Application And Send That Data To Your |
||||
|
Google Analytics Account For Analysis</p> |
||||
|
<!-- END OF APP HERO --> |
||||
|
<img src="./assets/screenshots/hero.gif" |
||||
|
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<!-- NAVIGATION SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/compass.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Explore This |
||||
|
Module</h2> |
||||
|
</div> |
||||
|
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> |
||||
|
<div class="col-sm-12 col-md-6 my-3"> |
||||
|
<a href="#overview"> |
||||
|
<div class="d-flex justify-content-between align-items-center" |
||||
|
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
||||
|
<div> |
||||
|
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> |
||||
|
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn More About this module</span> |
||||
|
</div> |
||||
|
<img src="./assets/misc/right-arrow.png" width="36" |
||||
|
height="36"/> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-6 my-3"> |
||||
|
<a href="#features"> |
||||
|
<div class="d-flex justify-content-between align-items-center" |
||||
|
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
||||
|
<div> |
||||
|
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> |
||||
|
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
||||
|
features of this |
||||
|
module</span> |
||||
|
</div> |
||||
|
<img src="./assets/misc/right-arrow.png" width="36" |
||||
|
height="36"/> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-6 my-3"> |
||||
|
<a href="#screenshots"> |
||||
|
<div class="d-flex justify-content-between align-items-center" |
||||
|
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
||||
|
<div> |
||||
|
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> |
||||
|
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
||||
|
screenshots for this |
||||
|
module</span> |
||||
|
</div> |
||||
|
<img src="./assets/misc/right-arrow.png" width="36" |
||||
|
height="36"/> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF NAVIGATION SECTION --> |
||||
|
|
||||
|
<!-- OVERVIEW SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
||||
|
id="overview"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/pie-chart.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Overview |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 py-4"> |
||||
|
The Google Analytics module in Odoo enables businesses to integrate |
||||
|
Google Analytics with their Odoo backend and website. It tracks various |
||||
|
events and actions, such as confirming sale orders, purchase orders, |
||||
|
and invoices in the backend. Additionally, it monitors actions like |
||||
|
adding items to the cart, wishlist, user logins, sign-ups, and product |
||||
|
payments on the website. By leveraging this module, businesses can gain |
||||
|
valuable insights into user behavior, optimize processes, and improve |
||||
|
the overall website experience. |
||||
|
<mark> |
||||
|
Please note that Some Website events like Add to Cart ,login ,sign |
||||
|
up is not working when you are using incognito mode in firefox browser. |
||||
|
</mark> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<!-- END OF OVERVIEW SECTION --> |
||||
|
|
||||
|
<!-- FEATURES SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
||||
|
id="features"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/features.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Features |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" style="margin-bottom: auto" |
||||
|
class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Event Tracking: The module can send events to Google Analytics when specific actions occur in the Odoo backend, such as confirming a sale order, purchase order, or invoice. This data helps you understand how your business processes are performing and make data-driven decisions.</span> |
||||
|
</div> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" style="margin-bottom: auto" |
||||
|
class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">E-commerce Tracking: For your website, the module can track important e-commerce actions, such as adding products to the cart or wishlist. This data enables you to analyze user behavior, identify popular products, and optimize your website's user experience.</span> |
||||
|
</div> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" style="margin-bottom: auto" |
||||
|
class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">User Engagement Tracking: The module tracks user logins and sign-ups on your website. This data provides insights into user engagement, user acquisition, and helps you understand your customer base better.</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" style="margin-bottom: auto" |
||||
|
class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Payment Tracking: The module can track product payments made on your website. This data allows you to analyze the effectiveness of your payment methods and gain insights into your revenue generation.</span> |
||||
|
</div> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" style="margin-bottom: auto" |
||||
|
class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Compatible with both Odoo 16.0 Community and Enterprise Editions.</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF FEATURES SECTION --> |
||||
|
|
||||
|
<!-- SCREENSHOTS SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
||||
|
id="screenshots"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/pictures.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Screenshots |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12"> |
||||
|
|
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Google Analytics View</h3> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
First goto <a href="https://analytics.google.com/">https://analytics.google.com/</a> |
||||
|
--> ADMIN --> Data |
||||
|
Streams </p> |
||||
|
<img src="./assets/screenshots/analytics1.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
Then select Add stream -->Web</p> |
||||
|
<img src="./assets/screenshots/analytics2.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
|
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
Then add the valid Website URL |
||||
|
(odoo instance) and Stream name and Create stream </p> |
||||
|
<img src="./assets/screenshots/analytics3.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
|
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
After that you can see your stream in data stream and copy the |
||||
|
'MEASUREMENT ID' from there</p> |
||||
|
<img src="./assets/screenshots/analytics4.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
|
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
After that you can create API secret in 'Measurement Protocol |
||||
|
API secrets' option</p> |
||||
|
<img src="./assets/screenshots/analytics5.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
|
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
Create the API secret and copy the 'Secret value' from |
||||
|
there</p> |
||||
|
<img src="./assets/screenshots/analytics6.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Configuration Settings |
||||
|
</h3> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
Goto the Settings and enable the 'Enable Analytics' then you |
||||
|
can set the 'Measurement ID' and 'API Secret'</p> |
||||
|
|
||||
|
<img src="./assets/screenshots/conf.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
|
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Realtime View in Google Analytics</h3> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
After performing certain actions in the Odoo backend, like |
||||
|
confirming a sale order, purchase order, or invoice, and also |
||||
|
when users add products to the cart or wishlist on the website, |
||||
|
or when they log in or sign up, you can view these events in |
||||
|
real-time using Google Analytics. </p> |
||||
|
<img src="./assets/screenshots/realtime.png" |
||||
|
class="img-thumbnail"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF SCREENSHOTS SECTION --> |
||||
|
|
||||
|
<!-- RELATED PRODUCTS --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/categories.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Related |
||||
|
Products |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12"> |
||||
|
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
||||
|
<!-- The slideshow --> |
||||
|
<div class="carousel-inner" style="padding: 30px;"> |
||||
|
<div class="carousel-item" style="min-height: 198.656px;"> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
||||
|
style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/woo_commerce/" |
||||
|
target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-radius: 0px;" |
||||
|
src="./assets/modules/1.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
||||
|
style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/odoo_icecat_connector/" |
||||
|
target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-radius: 0px;" |
||||
|
src="./assets/modules/2.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
||||
|
style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/shopify_odoo_connector/" |
||||
|
target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-radius: 0px;" |
||||
|
src="./assets/modules/3.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="carousel-item active" |
||||
|
style="min-height: 198.656px;"> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
||||
|
style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/direct_print_odoo/" |
||||
|
target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-radius: 0px;" |
||||
|
src="./assets/modules/4.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
||||
|
style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/auto_database_backup/" |
||||
|
target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-radius: 0px;" |
||||
|
src="./assets/modules/5.gif"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
||||
|
style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/whatsapp_mail_messaging/" |
||||
|
target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-radius: 0px;" |
||||
|
src="./assets/modules/6.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Left and right controls --> |
||||
|
<a class="carousel-control-prev" href="#demo1" data-slide="prev" |
||||
|
style="width:35px; color:#000"> <span |
||||
|
class="carousel-control-prev-icon"><i |
||||
|
class="fa fa-chevron-left" |
||||
|
style="font-size:24px"></i></span> |
||||
|
</a> <a class="carousel-control-next" href="#demo1" |
||||
|
data-slide="next" style="width:35px; color:#000"> |
||||
|
<span class="carousel-control-next-icon"><i |
||||
|
class="fa fa-chevron-right" |
||||
|
style="font-size:24px"></i></span> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF RELATED PRODUCTS --> |
||||
|
|
||||
|
<!-- OUR SERVICES --> |
||||
|
|
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/star.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Our Services |
||||
|
</h2> |
||||
|
</div> |
||||
|
|
||||
|
<div class="container my-5"> |
||||
|
<div class="row"> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/cogs.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Customization</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/wrench.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Implementation</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/lifebuoy.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Support</h6> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/user.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Hire |
||||
|
Odoo |
||||
|
Developer</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/puzzle.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Integration</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/update.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Migration</h6> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/consultation.png" |
||||
|
class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Consultancy</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/training.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Implementation</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="./assets/icons/license.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Licensing Consultancy</h6> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<!-- END OF OUR SERVICES --> |
||||
|
|
||||
|
<!-- OUR INDUSTRIES --> |
||||
|
|
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/corporate.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Our |
||||
|
Industries |
||||
|
</h2> |
||||
|
</div> |
||||
|
|
||||
|
<div class="container my-5"> |
||||
|
<div class="row"> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/trading-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Trading |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Easily procure |
||||
|
and |
||||
|
sell your products</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/pos-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
POS |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Easy |
||||
|
configuration |
||||
|
and convivial experience</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/education-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Education |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
A platform for |
||||
|
educational management</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/manufacturing-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Manufacturing |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Plan, track and |
||||
|
schedule your operations</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/ecom-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
E-commerce & Website |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Mobile |
||||
|
friendly, |
||||
|
awe-inspiring product pages</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/service-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Service Management |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Keep track of |
||||
|
services and invoice</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/restaurant-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Restaurant |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Run your bar or |
||||
|
restaurant methodically</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/hotel-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Hotel Management |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
An |
||||
|
all-inclusive |
||||
|
hotel management application</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<!-- END OF OUR INDUSTRIES --> |
||||
|
|
||||
|
<!-- SUPPORT --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="./assets/misc/customer-support.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Support |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="container mt-5"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
||||
|
<div class="mr-4" |
||||
|
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
||||
|
<img src="./assets/misc/support.png" height="48" width="48" |
||||
|
style="width: 42px; height: 42px;"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4>Need Help?</h4> |
||||
|
<p style="line-height: 100%;">Got questions or need help? |
||||
|
Get in touch.</p> |
||||
|
<a href="mailto:odoo@cybrosys.com"> |
||||
|
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
||||
|
odoo@cybrosys.com</p> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
||||
|
<div class="mr-4" |
||||
|
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
||||
|
<img src="./assets/misc/whatsapp.png" height="52" |
||||
|
width="52" |
||||
|
style="width: 52px; height: 52px;"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4>WhatsApp</h4> |
||||
|
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p> |
||||
|
<a href="https://api.whatsapp.com/send?phone=918606827707"> |
||||
|
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
||||
|
+91 86068 |
||||
|
27707</p> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> |
||||
|
<img src="./assets/misc/logo.png" width="144" height="31" |
||||
|
style="width:144px; height: 31px; margin-top: 40px;"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF SUPPORT --> |
@ -0,0 +1,52 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import { WebsiteSale } from 'website_sale.website_sale'; |
||||
|
import ajax from 'web.ajax'; |
||||
|
|
||||
|
WebsiteSale.include({ |
||||
|
/** |
||||
|
* @Super the _onClickAdd function to send the event to the Analytics |
||||
|
*/ |
||||
|
_onClickAdd: function(ev) { |
||||
|
this._super(...arguments); |
||||
|
var self = this; |
||||
|
if (ev.currentTarget.previousElementSibling) { |
||||
|
this.product_id = ev.currentTarget.previousElementSibling.value |
||||
|
} else { |
||||
|
this.product_id = this.last_product_id |
||||
|
} |
||||
|
ajax.jsonRpc("/product_analytics", 'call', {'product_id':this.product_id}).then(function(data) { |
||||
|
ajax.jsonRpc("/analytics", 'call', {}).then(function(datas) { |
||||
|
if (datas.enable_analytics) |
||||
|
{ |
||||
|
self.measurement_id = datas.measurement_id; |
||||
|
self.api_secret = datas.api_secret; |
||||
|
if (self.measurement_id != false && self.api_secret != false) { |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendCartEvent(clientID, "AddToCart", data[0]) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
// Sending the event to Google Analytics when the user adds a new
|
||||
|
// product to the shopping cart.
|
||||
|
function sendCartEvent(clientID, eventName, eventData) { |
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'Add_to_cart', |
||||
|
params: { |
||||
|
"currency": eventData['currency_id'][1], |
||||
|
"value": eventData['lst_price'], |
||||
|
"item_id": eventData['id'], |
||||
|
"item_name": eventData['display_name'], |
||||
|
"price": eventData['lst_price'], |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}); |
@ -0,0 +1,125 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import { FormController } from "@web/views/form/form_controller"; |
||||
|
import { patch } from "@web/core/utils/patch"; |
||||
|
const ajax = require('web.ajax'); |
||||
|
|
||||
|
//Patch the FormController to Send the Events to Google Analytics
|
||||
|
//From the Backed
|
||||
|
patch(FormController.prototype, "FormController.google", { |
||||
|
//Super the setup Function
|
||||
|
setup() { |
||||
|
this._super.apply(this, arguments); |
||||
|
}, |
||||
|
//Override the afterExecuteActionButton function to send the evens
|
||||
|
async afterExecuteActionButton(clickParams) { |
||||
|
var self = this; |
||||
|
await ajax.jsonRpc("/analytics", 'call', {}).then(function(data) { |
||||
|
self.measurement_id = data.measurement_id |
||||
|
self.api_secret = data.api_secret |
||||
|
self.enable_analytics=data.enable_analytics |
||||
|
}); |
||||
|
self.measurement_id = this.measurement_id; |
||||
|
self.api_secret = this.api_secret; |
||||
|
self.enable_analytics = this.enable_analytics |
||||
|
if (self.enable_analytics) |
||||
|
{ |
||||
|
if (self.measurement_id != false && self.api_secret != false) { |
||||
|
if (clickParams.name === "action_confirm" && this.props.resModel === "sale.order") { |
||||
|
var order_id = this.model.root.data.id |
||||
|
var self = this |
||||
|
ajax.jsonRpc("/sale_analytics", 'call', {'order_id':order_id}).then(function(data) { |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendSaleEvent(clientID, "Sales", data['sales_data']) |
||||
|
}); |
||||
|
// Sending the event to Google Analytics when confirming
|
||||
|
// Sale order.
|
||||
|
function sendSaleEvent(clientID, eventName, eventData) { |
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'Sales_Order', |
||||
|
params: { |
||||
|
"Number": String(eventData.name), |
||||
|
"Customer": String(eventData.customer), |
||||
|
"Amount": String(eventData.amount), |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
if (clickParams.name === "button_confirm" && this.props.resModel === "purchase.order") { |
||||
|
var order_id = this.model.root.data.id |
||||
|
var self = this |
||||
|
ajax.jsonRpc("/purchase_analytics", 'call', {'order_id':order_id}).then(function(data) { |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendPurchaseEvent(clientID, "Purchase", data['purchase_data']) |
||||
|
}); |
||||
|
function sendPurchaseEvent(clientID, eventName, eventData) { |
||||
|
// Sending the event to Google Analytics when confirming
|
||||
|
// Purchase order.
|
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'purchase_order', |
||||
|
params: { |
||||
|
"Number": String(eventData.name), |
||||
|
"Customer": String(eventData.customer), |
||||
|
"Amount": String(eventData.amount), |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
if (clickParams.name === "action_post" && this.props.resModel === "account.move") { |
||||
|
var order_id = this.model.root.data.id |
||||
|
ajax.jsonRpc("/invoice_analytics", 'call', {'order_id':order_id}).then(function(data) { |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendInvoiceEvent(clientID, "addoAFF", data['invoice_data']) |
||||
|
}); |
||||
|
// Sending the event to Google Analytics when confirming
|
||||
|
// Invoice.
|
||||
|
function sendInvoiceEvent(clientID, eventName, eventData) { |
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'Invoices', |
||||
|
params: { |
||||
|
"Number": String(eventData.name), |
||||
|
"Customer": String(eventData.customer), |
||||
|
"Amount": String(eventData.amount), |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
if (clickParams.special !== "cancel") { |
||||
|
return this.model.root |
||||
|
.save({ |
||||
|
stayInEdition: true, |
||||
|
useSaveErrorDialog: !this.env.inDialog |
||||
|
}) |
||||
|
.then((saved) => { |
||||
|
if (saved && this.props.onSave) { |
||||
|
this.props.onSave(this.model.root); |
||||
|
} |
||||
|
return saved; |
||||
|
}); |
||||
|
} else if (this.props.onDiscard) { |
||||
|
this.props.onDiscard(this.model.root); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
@ -0,0 +1,45 @@ |
|||||
|
odoo.define('google_analytics_odoo.checkout', function(require) { |
||||
|
var publicWidget = require('web.public.widget'); |
||||
|
const ajax = require('web.ajax'); |
||||
|
|
||||
|
publicWidget.registry.websiteSaleTracking = publicWidget.Widget.extend({ |
||||
|
selector: '.oe_website_sale', |
||||
|
events: { |
||||
|
'click a[href="/shop/checkout?express=1"]': '_onCheckoutStarts', |
||||
|
}, |
||||
|
//When an user Checkout the cart then send the event to the Analytics
|
||||
|
_onCheckoutStarts: function(ev) { |
||||
|
ajax.jsonRpc("/analytics", 'call', {}).then(function(data) { |
||||
|
if (data.enable_analytics){ |
||||
|
self.measurement_id = data.measurement_id; |
||||
|
self.api_secret = data.api_secret; |
||||
|
self.user = data.user |
||||
|
if (self.measurement_id != false && self.api_secret != false) { |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendOfflineEvent(clientID, "Checkout", data) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
//Send the event to Google Analytics
|
||||
|
function sendOfflineEvent(clientID, eventName, eventData) { |
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'Cart_checkout', |
||||
|
params: { |
||||
|
'Checkout': 'checkout started by' + self.user |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
//Override the default _onCheckoutStart function
|
||||
|
_onCheckoutStart: function() { |
||||
|
this._vpv('/stats/ecom/customer_checkout'); |
||||
|
}, |
||||
|
}); |
||||
|
}); |
@ -0,0 +1,44 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import publicWidget from 'web.public.widget'; |
||||
|
import ajax from 'web.ajax'; |
||||
|
|
||||
|
publicWidget.registry.login = publicWidget.Widget.extend({ |
||||
|
selector: '.oe_login_form', |
||||
|
events: { |
||||
|
'click button[type="submit"]': '_onLogIn', |
||||
|
}, |
||||
|
/** |
||||
|
* @override the _onLogIn function to override the default workflow of login |
||||
|
*/ |
||||
|
_onLogIn: async function(ev) { |
||||
|
var self = this; |
||||
|
await ajax.jsonRpc('/analytics', 'call', {}).then((result) => { |
||||
|
self.measurement_id = result.measurement_id |
||||
|
self.api_secret = result.api_secret |
||||
|
self.enable_analytics = result.enable_analytics |
||||
|
}); |
||||
|
if (self.enable_analytics){ |
||||
|
if (self.measurement_id != false && self.api_secret != false) { |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendLoginEvent(clientID, "LOGIN") |
||||
|
}); |
||||
|
var user = this.$("#login").val() |
||||
|
// Send the events to Analytics When a user is logged in
|
||||
|
function sendLoginEvent(clientID, eventName) { |
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'User_login', |
||||
|
params: { |
||||
|
"User": user |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
@ -0,0 +1,58 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import core, { _t } from 'web.core'; |
||||
|
import checkoutForm from 'payment.checkout_form'; |
||||
|
import ajax from 'web.ajax'; |
||||
|
|
||||
|
|
||||
|
checkoutForm.include({ |
||||
|
/** |
||||
|
* @override _prepareTransactionRouteParams to send events to Analytics |
||||
|
*/ |
||||
|
_prepareTransactionRouteParams: function(code, paymentOptionId, flow) { |
||||
|
const transactionRouteParams = this._super(...arguments); |
||||
|
var payment = $('.o_donation_payment_form').length ? { |
||||
|
...transactionRouteParams, |
||||
|
'partner_details': { |
||||
|
'name': this.$('input[name="name"]').val(), |
||||
|
'email': this.$('input[name="email"]').val(), |
||||
|
'country_id': this.$('select[name="country_id"]').val(), |
||||
|
}, |
||||
|
'donation_comment': this.$('#donation_comment').val(), |
||||
|
'donation_recipient_email': this.$('input[name="donation_recipient_email"]').val(), |
||||
|
} : transactionRouteParams; |
||||
|
|
||||
|
|
||||
|
ajax.jsonRpc("/get_payment_details", 'call', {'payment':payment}).then(function(data) { |
||||
|
ajax.jsonRpc("/analytics", 'call', {}).then(function(datas) { |
||||
|
if (datas.enable_analytics){ |
||||
|
self.measurement_id = datas.measurement_id; |
||||
|
self.api_secret = datas.api_secret; |
||||
|
if (self.measurement_id != false && self.api_secret != false) { |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendCartEvent(clientID, "Payments", data) |
||||
|
}); |
||||
|
} |
||||
|
//Send the event to Google Analytics when the payments is
|
||||
|
// processed in the website
|
||||
|
function sendCartEvent(clientID, eventName, eventData) { |
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'Payments', |
||||
|
params: { |
||||
|
"customer": data.partner, |
||||
|
"payment_information": data.payment, |
||||
|
"amount": data.amount |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
return payment |
||||
|
}, |
||||
|
}); |
@ -0,0 +1,49 @@ |
|||||
|
odoo.define('google_analytics_odoo.signup', function(require) { |
||||
|
'use strict'; |
||||
|
|
||||
|
var publicWidget = require('web.public.widget'); |
||||
|
const ajax = require('web.ajax'); |
||||
|
|
||||
|
publicWidget.registry.SignUpForm = publicWidget.Widget.extend({ |
||||
|
selector: '.oe_signup_form', |
||||
|
events: { |
||||
|
'submit': '_onSubmit', |
||||
|
}, |
||||
|
/** |
||||
|
* @override the _onSubmit function to override the default workflow of sign up |
||||
|
*/ |
||||
|
_onSubmit: async function(ev) { |
||||
|
var self = this; |
||||
|
await ajax.jsonRpc('/analytics', 'call', {}).then((result) => { |
||||
|
self.measurement_id = result.measurement_id |
||||
|
self.api_secret = result.api_secret |
||||
|
self.enable_analytics = result.enable_analytics |
||||
|
}); |
||||
|
if (self.enable_analytics){ |
||||
|
if (self.measurement_id != false && self.api_secret != false) { |
||||
|
var user_name = this.$("#name").val() |
||||
|
var mail = this.$("#login").val() |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendSignupEvent(clientID, "SIGNUP") |
||||
|
}); |
||||
|
// Send the events to Analytics When a user is signed up
|
||||
|
function sendSignupEvent(clientID, eventName) { |
||||
|
fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'Signup_user', |
||||
|
params: { |
||||
|
"Name": user_name, |
||||
|
"Mail": mail, |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}); |
||||
|
}); |
@ -0,0 +1,49 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import publicWidget from 'web.public.widget'; |
||||
|
import 'website_sale_wishlist.wishlist'; |
||||
|
import ajax from 'web.ajax'; |
||||
|
|
||||
|
publicWidget.registry.ProductWishlist.include({ |
||||
|
/** |
||||
|
* Removes wishlist indication when adding a product to the wishlist. |
||||
|
* |
||||
|
* @override function to send the event to the Analytics |
||||
|
*/ |
||||
|
_onClickAddWish: function(ev) { |
||||
|
this._super.apply(this, arguments); |
||||
|
if (ev.currentTarget.attributes[10]){ |
||||
|
var product_id = ev.currentTarget.attributes[10].value |
||||
|
ajax.jsonRpc("/product_analytics", 'call', {'product_id':this.product_id}).then(function(data) { |
||||
|
ajax.jsonRpc("/analytics", 'call', {}).then(function(datas) { |
||||
|
if (datas.enable_analytics){ |
||||
|
self.measurement_id = datas.measurement_id; |
||||
|
self.api_secret = datas.api_secret; |
||||
|
gtag('get', self.measurement_id, 'client_id', (clientID) => { |
||||
|
sendOfflineEvent(clientID, "AddToWishlist", data[0]) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
// Sending the event to Google Analytics when the user adds a new
|
||||
|
// product to the shopping cart.
|
||||
|
function sendOfflineEvent(clientID, eventName, eventData) { |
||||
|
var send_data = fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${self.measurement_id}&api_secret=${self.api_secret}`, { |
||||
|
method: "POST", |
||||
|
body: JSON.stringify({ |
||||
|
client_id: clientID, |
||||
|
events: [{ |
||||
|
name: 'Add_to_wishlist', |
||||
|
params: { |
||||
|
"currency": eventData['currency_id'][1], |
||||
|
"value": eventData['lst_price'], |
||||
|
"item_id": eventData['id'], |
||||
|
"item_name": eventData['display_name'], |
||||
|
"price": eventData['lst_price'], |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
}); |
@ -0,0 +1,22 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<!-- For adding the gtag.js of Google Analytics to odoo --> |
||||
|
<template id="web_layout_analytics" name="Google Analytic" |
||||
|
inherit_id="web.layout"> |
||||
|
<xpath expr="//meta[@charset='utf-8']" position="before"> |
||||
|
<t t-set="measurement_id" |
||||
|
t-value="env['ir.config_parameter'].sudo().get_param('google_analytics_odoo.measurement_id_analytics')"/> |
||||
|
<t t-if="measurement_id"> |
||||
|
<!-- Google Tag Manager --> |
||||
|
<script t-att-src="'https://www.googletagmanager.com/gtag/js?id='+measurement_id"/> |
||||
|
<script> |
||||
|
window.dataLayer = window.dataLayer || []; |
||||
|
function gtag(){dataLayer.push(arguments);} |
||||
|
gtag('js', new Date()); |
||||
|
gtag('config', '<t t-esc="measurement_id"/>'); |
||||
|
</script> |
||||
|
</t> |
||||
|
<!-- End Google Tag Manager --> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
</odoo> |
@ -0,0 +1,52 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- Inheriting the config setting and add the fields for connecting Google Analytics --> |
||||
|
<record id="res_config_settings_view_form" model="ir.ui.view"> |
||||
|
<field name="name"> |
||||
|
res.config.settings.view.form.inherit.google.analytics.odoo |
||||
|
</field> |
||||
|
<field name="model">res.config.settings</field> |
||||
|
<field name="priority" eval="20"/> |
||||
|
<field name="inherit_id" |
||||
|
ref="base_setup.res_config_settings_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//div[@id='invite_users']" position="after"> |
||||
|
<h2>Google Analytics</h2> |
||||
|
<div class="row mt16 o_settings_container"> |
||||
|
<div class="col-xs-12 col-md-8 o_setting_box" |
||||
|
id="print_node_settings"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="enable_analytics"/> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label class="col-lg-3" |
||||
|
string="Enable Analytics" |
||||
|
for="enable_analytics"/> |
||||
|
</div> |
||||
|
<br/> |
||||
|
<div class="o_setting_right_pane" attrs="{ 'invisible': [('enable_analytics', '!=', True)] }" > |
||||
|
<div class="content-group"> |
||||
|
<div class="row mt8"> |
||||
|
<label class="col-lg-3" |
||||
|
string="Measurement ID" |
||||
|
for="measurement_id_analytics"/> |
||||
|
<field name="measurement_id_analytics" /> |
||||
|
</div> |
||||
|
<div class="row mt8"> |
||||
|
<label class="col-lg-3" string="API Secret" |
||||
|
for="api_secret"/> |
||||
|
<field name="api_secret"/> |
||||
|
</div> |
||||
|
<div class="text-muted"> |
||||
|
Please ensure that the measurement ID and |
||||
|
API |
||||
|
secret are valid and provided accurately. |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |