Repository navigation
Version 3.30.0
Added
- Ignored Phone Numbers. Settings gains a list of phone numbers whose
tel:links are never tracked: nophone_clickin the dataLayer and nocuft_record_eventrequest, so nothing is recorded on the click. Numbers match on a key of the last 10 digits before any extension (;ext=,,, or a letter), applied the same way in PHP (CUFT_Privacy::normalize_phone()) and inassets/cuft-links.js, so+1 (780) 555-0173,780.555.0173andtel:+17805550173;ext=2are one number. Entries with fewer than 7 digits are refused with a notice. The list reaches the browser twice: incuftConfig.ignorePhones, and aswindow.cuftIgnorePhonesprinted with the link tracking script itself, so the click handler never depends on another script having been printed. - Per-link exclusion. A
tel:ormailto:link inside an element carryingdata-cuft-ignoreor the classcuft-ignore(the link itself included) is not tracked. The class form exists because page builders such as Elementor expose CSS classes to editors more readily than custom attributes. - Filters.
cuft_ignore_phone_numbersadds numbers to the ignore list.cuft_record_event($record, $event_type, $click_id) can stop an event reported by the browser from being recorded. The server never receives the clicked number, so number-based exclusion happens only in the browser.cuft_click_retention_daysoverrides the retention setting. - Click Data Retention. Settings gains a retention period for the click tracking table (default 365 days, minimum 30, maximum 3650, 0 keeps rows forever). The daily
cuft_click_retentioncron event deletes rows whosedate_createdis older, 1,000 rows per statement, at most 50 statements or 20 seconds per run, and schedules a follow-up run five minutes later when work remains. The cutoff is computed by MySQL, the same clock that fillsdate_created. The event is scheduled on the first request after the upgrade (no reactivation needed) and removed on deactivation and uninstall.CUFT_Click_Tracker::cleanup_old_records()also deletes in batches now.
Changed
- Keyed IP hashes.
ip_hashis nowhash_hmac( 'sha256', $ip, $key )instead ofhash( 'sha256', $ip ), with$key = hash_hmac( 'sha256', 'cuft_ip_hash', wp_salt( 'auth' ) ). The unkeyed form could be reversed by hashing all 2^32 IPv4 addresses.wp_salt( 'auth' )isAUTH_KEYandAUTH_SALTfrom wp-config.php, so a copy of the database alone does not reverse it. A custom scheme such aswp_salt( 'cuft_ip_hash' )would not do: core builds custom schemes fromSECRET_KEY, which the sample wp-config.php does not define, and then from thesecret_keyoption in the database. DefiningCUFT_IP_HASH_KEYreplaces the key, for example to keep hashes comparable across sites. Rotating the wp-config.php salts changes the key. The Click Tracking IP search and the 3.21.0 migration use the keyed hash. - Old hashes are cleared. The 3.30.0 migration records the upgrade time in
cuft_ip_hash_legacy_before. The retention job setsip_hashto NULL on rows created before it, in the same bounded batches, then deletes the option. This runs even when retention is set to keep rows forever. - Pages carry no visitor data.
cuftClickDataholds onlyajax_urlandnonce; it used to carry the visitor'sclick_id,ip_hashandplatform, read from the cookie and the click row on every page view. A full-page cache stores the HTML of whichever request filled it, so a page rendered for an ad visitor attached their click ID to every later visitor's hidden form fields andform_submit(and soqualify_lead).assets/cuft-click-integration.jsand theform_submitfallback inassets/cuft-dataLayer-utils.jsnow read the visitor's owncuft_click_idcookie and ignore anyclick_idincuftClickData, which a page cached before the upgrade may still carry. The page view no longer reads the click row. - Contact Form 7 console warnings for
wpcf7mailfailed,wpcf7invalidandwpcf7spamprint only when Console Logging is on. Mail failures are still logged server-side (OPS-2652). - Support link. The Plugins screen row links to the WordPress.org support forum instead of the GitHub issue tracker, in both builds.
Removed
ip_hashandclick_platforminform_submitand the lead events built from it. They came only fromcuftClickData. No GTM template or lead workflow reads them; the Elementor webhook attribution, which does carryclick_platform, is built server-side and is unchanged.
Fixed
- A click row is written once.
CUFT_Click_Tracker::track_click()no longer updates an existing row. Before, every request carrying the click ID rewrote the row from the request: a reload of the landing URL, the back button, or anyone who knew the ID resetqualifiedandscoreset by the CRM webhook to 0 and replaced the UTM columns with the visitor's cookie. The self-heal insert inadd_event()could do the same to a row created by a concurrent request. It returns 0 for an existing row, which callers already treated as success. The other writers are unchanged:update_click_status()(the CRM webhook, and Elementor phone validation when that is on) and the event recorder, which records events and refreshesga_client_id. - Landing UTMs reach the click row. The row was written on the landing request with UTMs read from the
cuft_utm_datacookie, which the browser writes only after that page loads, so the first row of every ad visit had empty campaign columns (and empty Campaign, CSV and Google Ads exports). UTMs now come from the landing URL alone. The cookie is not consulted: on a landing with a click ID it holds an earlier visit's campaign, and the browser replaces it with this click's parameters on the same page view, so a Google Ads click (gclid, no UTMs) would otherwise be labelled with last week's newsletter. Platform, campaign and UTM values are cut to their column widths, because$wpdb->insert()rejects a whole row when one value is too long. - The log keeps no personal data.
CUFT_Loggerstores error entries even with debug logging off, and Contact Form 7 mail failures logged the submitter's email and phone at error level; with debug logging on, Elementor submissions logged every field value. Contexts are now scrubbed before storage: any key naming an email, phone, mobile or tel field (user_email,your-phone,phone_number,telephone,userEmail) becomes a yes/no flag,field_datakeeps only each field's type, and email addresses inside messages and other strings become[email].cuft_debug_logsis stored with autoload off. The 3.30.0 migration scrubs the entries already stored and re-adds the option with autoload off (CUFT_Logger::scrub_stored_logs()), since an option that is never written again keeps its old autoload flag. - Retention runs when tracking is off.
CUFT_Privacy::init()ran after thecuft_enabledcheck, so on a site whose filter returns false (often a consent check reading a cookie, false on every wp-cron.php request) the daily job had no handler and WP-Cron used up the event. Background jobs now register before the check. - The server-side GTM health check runs. Its callback and the
six_hoursschedule were registered inCUFT_Admin, which is built only on admin requests, and WP-Cron requests are not; activation also scheduled the event before the schedule existed.CUFT_Admin::register_health_check()now runs on every request, keeps the event scheduled while sGTM is on and removes it when sGTM is off; deactivation clears it and any pending recheck. Since the check now really runs, its thresholds changed: the site falls back to Google after two failed checks in a row instead of one, and a failure, or a pass while recovering, schedules a one-off recheck 15 minutes later (cuft_scheduled_health_checkwith the argumentrecheck). One timeout from a busy host no longer takes a site off its tagging server, a dead server is dropped within about 15 minutes, and three passes bring it back within the hour instead of 18 hours. - PHP 8.5. The landing page is recorded from
REQUEST_URIinstead ofadd_query_arg( null, null ), which raised a deprecation notice on every ad landing. The click cookie is not sent once output has started, instead of raising a warning.
Installation
Automatic Update
If you already have the plugin installed, it should automatically detect this update. Go to Plugins in your WordPress admin and click Update Now.
Manual Installation
- Download the
choice-uft-v3.30.0.zipfile from the assets below - In WordPress admin, go to Plugins → Add New → Upload Plugin
- Choose the downloaded zip file and click Install Now
- Activate the plugin after installation
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
Support
For issues or questions, please visit: https://github.com/ChoiceOMG/choice-uft/issues