Skip to content

Version 3.30.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 18:52
· 6 commits to master since this release

Added

  • Ignored Phone Numbers. Settings gains a list of phone numbers whose tel: links are never tracked: no phone_click in the dataLayer and no cuft_record_event request, 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 in assets/cuft-links.js, so +1 (780) 555-0173, 780.555.0173 and tel:+17805550173;ext=2 are one number. Entries with fewer than 7 digits are refused with a notice. The list reaches the browser twice: in cuftConfig.ignorePhones, and as window.cuftIgnorePhones printed with the link tracking script itself, so the click handler never depends on another script having been printed.
  • Per-link exclusion. A tel: or mailto: link inside an element carrying data-cuft-ignore or the class cuft-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_numbers adds 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_days overrides 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_retention cron event deletes rows whose date_created is 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 fills date_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_hash is now hash_hmac( 'sha256', $ip, $key ) instead of hash( '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' ) is AUTH_KEY and AUTH_SALT from wp-config.php, so a copy of the database alone does not reverse it. A custom scheme such as wp_salt( 'cuft_ip_hash' ) would not do: core builds custom schemes from SECRET_KEY, which the sample wp-config.php does not define, and then from the secret_key option in the database. Defining CUFT_IP_HASH_KEY replaces 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 sets ip_hash to 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. cuftClickData holds only ajax_url and nonce; it used to carry the visitor's click_id, ip_hash and platform, 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 and form_submit (and so qualify_lead). assets/cuft-click-integration.js and the form_submit fallback in assets/cuft-dataLayer-utils.js now read the visitor's own cuft_click_id cookie and ignore any click_id in cuftClickData, 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, wpcf7invalid and wpcf7spam print 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_hash and click_platform in form_submit and the lead events built from it. They came only from cuftClickData. No GTM template or lead workflow reads them; the Elementor webhook attribution, which does carry click_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 reset qualified and score set by the CRM webhook to 0 and replaced the UTM columns with the visitor's cookie. The self-heal insert in add_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 refreshes ga_client_id.
  • Landing UTMs reach the click row. The row was written on the landing request with UTMs read from the cuft_utm_data cookie, 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_Logger stores 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_data keeps only each field's type, and email addresses inside messages and other strings become [email]. cuft_debug_logs is 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 the cuft_enabled check, 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_hours schedule were registered in CUFT_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_check with the argument recheck). 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_URI instead of add_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

  1. Download the choice-uft-v3.30.0.zip file from the assets below
  2. In WordPress admin, go to Plugins → Add New → Upload Plugin
  3. Choose the downloaded zip file and click Install Now
  4. 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