dfsearchconsole — Google Search Console for PrestaShop
Installation, Google OAuth setup, cron synchronization and how to work SEO opportunities in the dfsearchconsole module.
Overview
dfsearchconsole syncs Google Search Console data directly into the PrestaShop 8 and 9 back office: top queries per URL, CTR per page, average position, and most importantly four categories of automatically calculated SEO opportunities with contextual optimization suggestions.
The module adds 5 tabs under Improve → Search Console: Dashboard, Pages, Queries, Opportunities and Settings. Communication with Google happens via read-only OAuth2 (webmasters.readonly scope), with no Composer dependency — native cURL only.
Installation
- Download the module ZIP file from your DataFirefly customer account.
- In the PrestaShop back office: Modules → Module Manager → Upload a module.
- Select the ZIP file and let the installation complete.
- The module creates 4 SQL tables (
ps_dfgsc_sync,ps_dfgsc_page,ps_dfgsc_query,ps_dfgsc_opportunity) and registers its 5 tabs under the Improve menu.
Requirements: PrestaShop 8.0 to 8.2 or 9.0, PHP 7.4 minimum (8.1+ recommended), cURL extension enabled, and a verified property in Google Search Console.
Google Cloud OAuth setup
The module communicates with the Search Console API using your own OAuth2 credentials. Creating them is free and takes about ten minutes.
1. Create the project and enable the API
- Go to console.cloud.google.com and create a project (or reuse one).
- In APIs & Services → Library, search for Google Search Console API and enable it.
2. Configure the consent screen
- Open APIs & Services → OAuth consent screen.
- User type: External (or Internal if you use Google Workspace).
- Fill in the application name, support email and your domain.
- Add the scope
https://www.googleapis.com/auth/webmasters.readonly. - While the app is not published, add your Google address as a test user.
3. Create the OAuth client ID
- In APIs & Services → Credentials, click Create credentials → OAuth client ID.
- Application type: Web application.
- In Authorized redirect URIs, paste the URL displayed on the module Settings screen (of the form
https://your-domain.com/module/dfsearchconsole/oauth). - Note the Client ID and Client Secret.
4. Connect the module
- In PrestaShop, open Improve → Search Console → Settings.
- Paste the Client ID and Client Secret, then save.
- Click Connect to Google and grant access.
- Back in the back office, select the Search Console property to sync in the dropdown.
The Test connection button verifies that the token works and shows how many properties are accessible from the connected account.
Synchronization
Manual sync
The Sync now button on the Settings screen immediately triggers a full synchronization. Allow a few seconds for a small store up to 2-3 minutes for a site with thousands of indexed pages.
Automatic sync (cron)
The Settings screen displays a cron URL protected by a random 32-character token. Add it to your crontab for a daily sync:
0 4 * * * curl -s "https://your-domain.com/module/dfsearchconsole/cron?token=YOUR_TOKEN" > /dev/null
Google Search Console applies a delay of roughly 2 days on data. The module therefore always syncs the window ending at today − 2 days. One synchronization per day is enough.
Lookback window
By default the module fetches 90 days of data plus the previous 90 days to compute deltas. This window is configurable from 28 to 480 days in Settings. The larger the window, the longer the sync.
Dashboard
The dashboard gives an overview: 4 KPI cards (clicks, impressions, CTR, average position) with changes vs the previous period, top 10 pages, top 15 queries and a preview of priority opportunities.
For average position, a decrease is an improvement (the lower the position, the better the page ranks). The dashboard therefore shows a green arrow when the position goes down.
Pages and Queries
Pages tab
Paginated, sortable list of all URLs reported by Search Console, with clicks, impressions, CTR, position and click delta. A filter lets you narrow by page type (product, category, CMS, other) or by text. Clicking a URL opens its detail view: page KPIs with previous-period values, queries targeting that URL, associated opportunities, and a direct link to edit the corresponding PrestaShop entity.
Queries tab
Two display modes:
- Grouped view — one row per query, aggregated across all URLs. Ideal for identifying your main terms.
- Detailed view — one row per query × URL pair. Essential for analyzing cannibalization.
Positions are color-coded: green (1-3), blue (4-10), yellow (11-20, boostable), grey (21+).
SEO opportunities
After each synchronization, the module automatically recalculates four categories of opportunities:
- Top 11–20 boostable (striking distance) — queries ranked between 11 and 20 (configurable thresholds) with a minimum number of impressions. The module computes the potential click gain by simulating a move to position 5.
- Below-average CTR (top 10) — top 10 pages whose actual CTR is below 50% of the expected CTR per the built-in reference curve (aggregated from Advanced Web Ranking, Sistrix and Backlinko studies).
- Cannibalization — the same query surfacing 2 or more URLs. The module lists the competing URLs.
- Click decline — pages that lost more than 25% of clicks vs the previous period.
Each opportunity shows a priority score, the associated metrics, and optimization suggestions tailored to the page type (product sheet, category or CMS page). The Open / Done / Dismissed workflow lets you track your progress. The Recompute button rebuilds all opportunities from the data already in the database, without calling the Google API again.
Threshold settings
In Settings, three thresholds drive detection:
- Minimum impressions (default 50) — below this, the query × URL pair is ignored by the detectors.
- Striking distance min / max position (default 11 / 20) — the position window considered boostable.
For a small store with little traffic, lower the impression threshold to 20-30. For a large site, raise it to 100+ so only significant work surfaces.
Troubleshooting
“Token expired” or 401 error
The refresh token is used automatically every hour. If Google has revoked access (password change, long inactivity, manual revocation), reconnect the module via the Connect to Google button on the Settings screen.
No site in the dropdown
The connected Google account must have access to at least one Search Console property (owner or user). Check on search.google.com/search-console with the same account.
“redirect_uri_mismatch” error during connection
The redirect URI declared in Google Cloud Console must exactly match the one displayed on the module Settings screen (https protocol included, no extra trailing slash).
Very long sync or timeout
The API paginates in batches of 25,000 rows. For large sites: increase memory_limit to 512M, increase max_execution_time, and prefer the cron (which has no browser time limit).
URLs not resolved to PrestaShop entities
The resolver works on the link_rewrite (friendly URL slug). URLs generated by third-party routing modules may remain unlinked: they appear with the “other” type but are still fully analyzed.
Uninstall
Uninstalling removes the 4 SQL tables, the admin tabs and all configuration keys (including OAuth tokens). Remember to revoke the app’s access in your Google account security settings if you no longer use the module.