MyListing Click Reports
The {CODICTS} MyListing Click Reports plugin adds comprehensive button click tracking and reporting to your MyListing site. Every time a visitor clicks a quick action or cover action button on a listing — such as “Call Now,” “Get Directions,” “Visit Website,” or “Send Email” — the plugin records detailed click data into a dedicated database table.
The plugin integrates into the existing MyListing statistics dashboard, giving listing owners and administrators interactive bar charts, time-filtered click summaries, and CSV export capabilities. It also enhances the built-in visit tracking with extended 6-month and 12-month time periods.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
On activation, the plugin automatically:
— Creates the click tracking database table.
— Copies enhanced template files to your child theme.
— Imports any existing legacy click data from MyListing’s built-in tracking.
A new “Click Reports” menu item appears in the WordPress admin sidebar for data management and CSV exports.
Important: Both the MyListing theme and a MyListing child theme must be active. If either is missing, an admin error notice appears and all functionality is disabled.
Key Features
| Feature | Description |
|---|---|
| Button Click Tracking | Automatically records every quick action and cover action button click with rich visitor metadata (timestamp, browser, device, OS, referrer, country). |
| Click Throttling | Prevents click spam with cookie-based throttling (default: 3 seconds between identical clicks). |
| Interactive Bar Charts | Chartist.js bar charts showing click data grouped by button type, with toggleable time periods and interactive legend. |
| Click Summary Blocks | Tabbed summary showing click counts per button for 24h / 7d / 30d / 6mo / 12mo. |
| Per-Listing Stats | View click statistics for individual listings from the user dashboard. |
| Sitewide Stats | Administrators can view click statistics across all listings. |
| CSV Export | Download click reports as CSV files, filterable by time period, user, or listing. |
| Legacy Data Import | Import existing click data from MyListing’s built-in tracking into the new detailed table. |
| Enhanced Visit Tracking | Adds 6-month and 12-month time periods to the existing visit and unique view widgets. |
| Automatic Cleanup | Scheduled task removes old click data based on MyListing’s data retention setting. |
How It Works
Tracking happens automatically — no configuration required:
1. A visitor views a listing page and clicks a quick action or cover action button (e.g., “Call Now,” “Get Directions,” “Visit Website”).
2. The plugin intercepts the click via AJAX, validates the listing, and checks the click throttle (to prevent spam).
3. If the click passes throttling, the plugin records detailed data: timestamp, button identifier, visitor fingerprint, browser, device, OS, referrer, and country.
4. The data appears on the MyListing user dashboard as interactive charts and click summaries.
What gets tracked: All quick action buttons (e.g., “Get Directions,” “Call Now,” “Send Email,” “Visit Website,” “Leave Review,” “Bookmark,” “Share”) and cover action buttons on listing pages are tracked automatically for all listing types.
User Dashboard — Stats Overview
The plugin enhances the MyListing user dashboard (WooCommerce My Account → Dashboard) with new widgets.
Button Click Chart
An interactive bar chart showing click data over time, broken down by button type. Features include:
| Feature | Description |
|---|---|
| Time period toggles | Switch between Last 24 hours, Last 7 days, Last 30 days, Last 6 months, and Last 12 months. |
| Multi-series bars | Each button type (e.g., “Call Now,” “Get Directions”) is rendered as a separate colored series. |
| Interactive legend | Click legend items to show or hide individual button series on the chart. |
| Tooltips | Hover over any bar to see the button name and exact click count. |
Button Click Summary
A tabbed text summary showing click counts per button for each time period. Each tab lists buttons with their total click count in the format: Button Name (X click(s)). The “Last 7 days” tab is selected by default.
Enhanced Views & Unique Views
The existing MyListing views and unique views widgets are enhanced with two additional time periods:
| Time Period | Source |
|---|---|
| Last 24 hours | Original MyListing |
| Last 7 days | Original MyListing |
| Last 30 days | Original MyListing |
| Last 6 months | Added by this plugin |
| Last 12 months | Added by this plugin |
Single Listing Stats
When you select a specific listing from the stats dropdown on the dashboard, the view switches to single-listing mode. This shows the same chart and summary widgets scoped to only that listing’s click data, alongside all standard MyListing stat widgets (views, unique views, devices, etc.).
Sitewide Stats (Admin Only)
Super admins can access sitewide statistics by adding ?state_type=sitewide to the dashboard URL. This aggregates click data across all listings and all users, showing totals in the same chart and summary widgets.
Admin Settings Page
The plugin adds a top-level admin menu item called “Click Reports” (with the CoDicts icon). The settings page provides three functions:
Import Old Click Data
| Control | Description |
|---|---|
| Import old click data? | Check and submit to import legacy click data from MyListing’s built-in __track_stats tracking into the detailed database table. |
| Start date | The timestamp to assign to imported records. Required because legacy data has no per-click timestamps — all imported records use this date. |
Note: As of version 1.5.7, legacy data is automatically imported on first activation. This manual option is a fallback if needed.
Delete Imported Data
| Control | Description |
|---|---|
| Delete imported data? | Check and submit to delete all imported records from the click reports table. Only records flagged as imported are removed — organic click records are not affected. |
Download CSV Reports
| Control | Description |
|---|---|
| Download CSV | Check to enable CSV download. |
| Time period | Last 24 hours / Last 7 days / Last 30 days / Last 6 months / Last 12 months. |
| Scope | Sitewide / User / Listing. |
| User | All users or a specific user (shown when scope is “User”). |
| Listing | All listings or a specific listing (shown when scope is “Listing”). |
The CSV file contains four columns: Date, Listing Name, Button, and Clicks. The file uses semicolons (;) as delimiters.
Note: Some spreadsheet applications may require manual delimiter configuration when opening the CSV file. In Excel, use “Data → From Text” and select semicolon as the delimiter.
Click Throttling
To prevent click spam, the plugin uses cookie-based throttling. By default, the same visitor can only register one click per button per listing every 3 seconds. Duplicate clicks within that window are silently ignored.
Developers can adjust the throttle duration using the mylisting/stats/click-throttle filter. Return a different number of seconds to change the interval.
Data Retention & Cleanup
Click data retention follows MyListing’s stats.db_time setting — the same setting that controls visit data retention. A scheduled task runs twice daily to delete click records older than the configured number of days.
If this MyListing setting is not configured, click data is kept indefinitely.
When a listing is deleted from WordPress, all associated click records are automatically deleted (via a database foreign key constraint).
Template File Management
The plugin copies seven template files into your child theme to enhance the dashboard and tracking:
| Template | Purpose |
|---|---|
| track-button.php | Enhanced AJAX button click handler that records detailed data into the dedicated table. |
| visits.php | Enhanced visit tracking extension that adds 6-month and 12-month time periods. |
| dashboard.php | Enhanced user dashboard that includes the click chart and summary widgets. |
| single-listing.php | Enhanced single-listing stats page with per-listing click data. |
| tracks-by-type.php | Button click summary widget with five time period tabs. |
| views.php | Enhanced views widget with 6-month and 12-month periods. |
| unique-views.php | Enhanced unique views widget with 6-month and 12-month periods. |
| Event | What Happens |
|---|---|
| Plugin activation | Templates are copied to the child theme. |
| Plugin update | Templates are force-reinstalled (overwrites existing files). |
| Plugin deactivation | Templates are deleted from the child theme. Dashboard reverts to MyListing’s defaults. |
| Theme switch | Template tracking is reset and re-evaluated on the next page load. |
Data preserved: Deactivating the plugin removes template files but does not delete the database table or click records. All historical data is preserved for reactivation.
Template overwrite warning: If you manually customize any of the listed template files in your child theme, your changes will be overwritten when the plugin is updated or reactivated.
Example: Viewing Click Reports
1. Install and activate the plugin (with MyListing + child theme active).
2. The plugin immediately begins tracking button clicks on all listing pages — no setup needed.
3. As a listing owner, navigate to My Account → Dashboard. You’ll see the Button chart and Button clicks widgets showing your click data.
4. Use the time period toggles (24h / 7d / 30d / 6mo / 12mo) to view different date ranges.
5. Click legend items to show or hide specific button types on the chart.
6. Select a specific listing from the stats dropdown to view per-listing click data.
7. As an admin, navigate to Click Reports in the admin sidebar. Download CSV reports for any time period, scoped to sitewide data, a specific user, or a specific listing.
Frequently Asked Questions
Does this require a child theme?
Yes. A MyListing child theme is required because the plugin copies enhanced template files to the child theme directory.
Where do I see the click reports?
Click reports appear on the MyListing user dashboard (WooCommerce My Account → Dashboard). You’ll see a “Button chart” and “Button clicks” widget. You can also view per-listing stats by selecting a listing from the dropdown.
How do I access sitewide click statistics?
As a super admin, navigate to the dashboard and add ?state_type=sitewide to the URL to see aggregate click data across all listings and users.
What buttons are tracked?
All quick action buttons (e.g., “Get Directions,” “Call Now,” “Send Email,” “Visit Website,” “Leave Review,” “Bookmark,” “Share”) and cover action buttons on listing pages are tracked automatically. There is no per-button or per-listing-type toggle — all buttons are tracked for all listing types.
Are clicks from both logged-in users and guests tracked?
Yes. The click handler is registered for both logged-in users and guests.
How do I download click data as CSV?
Navigate to Click Reports in the admin sidebar. Check “Download CSV,” select your time period and scope (sitewide, per-user, or per-listing), and click Submit. The CSV uses semicolon delimiters.
Can I import click data from before the plugin was installed?
Yes. The plugin imports legacy click counts from MyListing’s built-in tracking automatically on first activation. You can also trigger it manually from the settings page. Note that imported data has no original timestamps — all records use the date you specify during import.
How do I delete imported data?
On the Click Reports settings page, check “Delete imported data?” and submit. Only records flagged as imported are removed — organic click records are not affected.
What happens when I deactivate the plugin?
Template files are removed from the child theme, and the dashboard reverts to MyListing’s defaults. The database table and all click records are preserved. Reactivating restores the templates and dashboard widgets.
Will my custom dashboard template modifications be preserved?
No. Plugin activation and version updates force-overwrite the template files. If you customize these templates, be aware that updates will overwrite your changes.
How long is click data kept?
Click data retention follows MyListing’s stats.db_time setting. A scheduled task runs twice daily to delete older records. If that setting is not configured, data is kept indefinitely.
Can I change the click throttle duration?
Yes. Use the mylisting/stats/click-throttle filter in your theme’s functions.php to return a different number of seconds. The default is 3 seconds.
What happens to click data when a listing is deleted?
All click records for that listing are automatically deleted via a database foreign key constraint.
Troubleshooting
Click Chart Not Showing on Dashboard
| Cause | Solution |
|---|---|
| Templates not installed | The enhanced dashboard template may not be in the child theme. Deactivate and reactivate the plugin to force template installation. |
| No click data yet | The chart only appears when there is click data to display. Ensure visitors have clicked buttons on your listings. The summary widget shows “No click stats recorded yet” when empty. |
| Child theme not active | Templates can only be installed into a child theme. Ensure a MyListing child theme is active at Appearance → Themes. |
| Another plugin overriding templates | If another plugin copies its own version of the dashboard template to the child theme, it may take precedence. Check for conflicting template files. |
Clicks Not Being Recorded
| Cause | Solution |
|---|---|
| Click throttle | Rapid repeated clicks on the same button are ignored by the 3-second throttle. Wait a few seconds between test clicks. |
| Track button template not installed | The enhanced track-button.php template must be in the child theme. Deactivate and reactivate the plugin. |
| JavaScript error | Check the browser console (F12 → Console) for errors. The tracking requires jQuery and MyListing’s scripts to be loaded. |
| Listing not published | Only clicks on published listings are recorded. |
CSV Export Issues
| Cause | Solution |
|---|---|
| File appears garbled in Excel | The CSV uses semicolon (;) delimiters. In Excel, use “Data → From Text/CSV” and select semicolon as the delimiter. |
| No data in export | Verify the selected time period and scope contain click data. Check the dashboard widgets to confirm data exists. |
Imported Data Shows Wrong Dates
| Cause | Solution |
|---|---|
| Legacy data has no timestamps | MyListing’s built-in tracking only stores total click counts, not per-click timestamps. All imported records use the date specified during import. This is expected behavior — the import is approximate. |
Chart Time Period Toggles Not Visible on Mobile
| Cause | Solution |
|---|---|
| CSS media query | The time period toggle links are hidden on screens narrower than 1200px. This is by design. The click data is still accessible via the tabbed Button Clicks summary widget below the chart. |
“MyListing Theme Not Detected” or “Child Theme Not Detected” Error
Both the MyListing theme and a MyListing child theme must be active. Go to Appearance → Themes to verify.
For further support, visit codicts.com or contact us at support@codicts.com.