Connections¶
The browser tags (Google tag, Google Tag Manager, Meta Pixel) only need the identifiers of your accounts. The features that talk to the platform APIs need a connection to a Google or Meta account:
Google: Merchant Center synchronization, offline conversions, Customer Match, Search Console, Business Profile reviews.
Meta: Conversions API (unless you enter an access token), catalog, Lead Ads, pages, Instagram, and WhatsApp (unless you enter a system user token).
A connection is made once by an administrator and can be shared by all the websites of a company.
Two ways to connect¶
Mode |
Description |
|---|---|
Own app credentials |
You create your own Google Cloud OAuth client or your own Meta app and enter its identifier and secret in Odoo. You control the app, its verification, and its quotas. |
Broker service |
Your database connects through a broker: a central Odoo database that owns one verified Google OAuth client and one Meta app and serves many databases. You do not create any app; you only enter the broker URL, your instance ID, and the instance secret that the broker’s administrator gave you. See Connection broker for Google and Meta. |
Broker mode is the easiest if your provider offers it. Own credentials are the choice if you want to depend on nobody, or if you are the provider.
Note
If a broker is configured in the Connection Broker setting (see below), new connections are created in broker mode by default.
Create a connection¶
Go to (or / ). This menu is only available to administrators. Click New and fill in:
Name: for example
Google - Main account.Provider: Google or Meta.
Company: with several companies.
Mode: Own app credentials or Broker service.
In Own app credentials mode, enter the Client ID / App ID and the
Client Secret / App Secret of your app, and register the redirect URI displayed in
the Redirect Uri field in the app (it ends with /website_tracking/oauth/callback). In
Broker service mode, enter the Broker URL, the Broker Instance ID,
and the Broker Instance Secret.
Click Connect. You are sent to Google or Meta to sign in with the account that manages your assets and to accept the permissions, then you come back to Odoo. The status changes to Connected, and the Connected Account, the Scopes, and the Token Expiry are displayed.
- menu
- Website ‣ Configuration ‣ Tracking & Consent ‣ Connections ‣ (a connection)
- shows
- A connection form in Connected status: the Connect/Reconnect, Test, and Disconnect buttons, the status bar, the provider, the mode, the connected account name, the scopes, and the token expiry.
- highlight
- The status bar and the buttons (red frame).
- data
- Connection "Google - Main account", mode "Broker service".
- notes
- English UI, light theme, 1440px width. Use a throw-away account.
Button |
Action |
|---|---|
Connect / Reconnect |
Starts the authorization. Use Reconnect when the permissions changed or the connection is in error. |
Test |
Gets a fresh access token and displays Connection works with the account name. |
Disconnect |
Revokes the authorization at Google or Meta (or at the broker) and erases the tokens. The connection stays in the list as Not connected. |
The status is Error when Odoo cannot get a token anymore (revoked access, expired token, wrong secret). The reason is displayed in Last Error; fix it and click Reconnect.
Important
Google refreshes its access automatically. A Meta user token lasts about 60 days: with your own app, reconnect when the status turns to Error; with a broker, the token is extended automatically when it is used during its last seven days, and you reconnect if it expired. Without a valid token, the Meta features that use the connection stop.
Select the connection of a website¶
Each website uses one connection per provider: select it in the Google Connection field of the Google settings (Google Account setting), or in the Meta Connection field of the Meta settings (Meta Connection setting). You can create the connection directly from these fields.
Create your own Google app¶
In the Google Cloud console, create a project (or select an existing one) and enable the APIs of the features you use: Search Console API, Business Profile APIs, Merchant API and Content API for Shopping, Google Ads API, and Data Manager API.
Configure the OAuth consent screen with the scopes below. Google verifies applications that ask for sensitive scopes before external users can accept them; until then the app stays in testing mode, and its authorizations expire after a few days.
Create an OAuth client ID of type Web application, and add the redirect URI of the connection in Authorized redirect URIs.
Copy the client ID and the client secret into the connection.
One Google connection serves every Google feature, so it asks for all the scopes at once: Merchant
Center (content), Data Manager API (datamanager), Google Ads API (adwords), Search Console
(webmasters), and Business Profile (business.manage).
Create your own Meta app¶
In Meta for Developers, create an app of type Business and add the Facebook Login for Business product.
In its settings, add the redirect URI of the connection in Valid OAuth Redirect URIs.
Request the permissions you need (see below). For a use limited to your own business assets, the standard access of an app in development mode is enough for the people who have a role in the app; other users need advanced access after Meta’s app review.
Copy the app ID and the app secret into the connection.
The Meta connection asks for these permissions: ads_management, business_management,
catalog_management, leads_retrieval, pages_show_list, pages_read_engagement,
pages_manage_metadata, pages_manage_posts, pages_messaging, instagram_basic,
instagram_content_publish, instagram_manage_messages, whatsapp_business_management, and
whatsapp_business_messaging.
The same app can be used for webhooks.
Connection Broker setting¶
If your provider operates a broker, go to , and, in the Tracking block, fill in the Connection Broker setting:
Broker URL: the address of the broker (for example
https://connect.example.com).Broker Instance ID: the identifier of your database at the broker.
Broker Instance Secret: the secret that the broker’s administrator showed you once.
Leave the fields empty to use your own app credentials. The new connections are then created in broker mode and need no further data: click Connect.
Tip
The broker only accepts return addresses that its administrator registered for your instance: if you use a new domain name for the website, ask the administrator of the broker to add it.