Changeset 3460077
- Timestamp:
- 02/12/2026 03:14:37 PM (4 weeks ago)
- Location:
- basecloud-utm-tracker
- Files:
-
- 6 edited
- 1 copied
-
tags/3.0.3 (copied) (copied from basecloud-utm-tracker/trunk)
-
tags/3.0.3/CHANGELOG.md (modified) (1 diff)
-
tags/3.0.3/basecloud-utm-tracker.php (modified) (4 diffs)
-
tags/3.0.3/readme.txt (modified) (2 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/basecloud-utm-tracker.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
basecloud-utm-tracker/tags/3.0.3/CHANGELOG.md
r3460030 r3460077 1 1 # Changelog 2 3 ## 3.0.3 - 2026-02-12 4 5 **🎯 Merge Tag Intelligence Update** 6 7 ### Improved 8 9 • **Smart Field Matching** - Enhanced merge tag parser with intelligent field detection: 10 - Normalizes field labels by removing special characters (handles "Name & Surname", "E-Mail", etc.) 11 - Added common field aliases (phone = telephone/mobile/contact number) 12 - Better partial matching for complex field names 13 - Prevents literal merge tags appearing in webhook data 14 • **Field Aliases** - Automatic mapping for common variations: 15 - Phone: telephone, mobile, cell, contact number 16 - Name: first name, full name, your name 17 - Surname: last name, family name 18 - Email: e-mail, email address 19 - Message: comments, enquiry, inquiry, details 20 - Plus more for company, address, city, country, date, time 21 • **Empty Field Handling** - Unmatched merge tags now replaced with empty string instead of showing literal {FieldName} 22 • **Special Character Support** - Properly handles ampersands, hyphens, and other special characters in field labels 23 24 ### Technical Details 25 26 • Modified `parse_merge_tag()` function with 3-tier matching system: 27 1. Exact normalized match (most accurate) 28 2. Partial match within field label (flexible) 29 3. Alias-based matching (common variations) 30 • Removes punctuation for comparison while preserving original labels 31 • Prevents webhook display_data from showing malformed merge tags 32 33 --- 2 34 3 35 ## 3.0.2 - 2026-02-12 -
basecloud-utm-tracker/tags/3.0.3/basecloud-utm-tracker.php
r3460030 r3460077 4 4 * Plugin URI: https://www.basecloudglobal.com/plugins/utm-tracker 5 5 * Description: The "Big 4" Form Automator. Advanced UTM tracking with automated injection for Gravity Forms, Elementor, WPForms, and Contact Form 7. 6 * Version: 3.0. 26 * Version: 3.0.3 7 7 * Author: BaseCloud Team 8 8 * Author URI: https://www.basecloudglobal.com/ … … 303 303 foreach ($matches as $match) { 304 304 $search_label = strtolower(trim($match[1])); 305 $field_found = false; 305 306 306 307 // Check for exact entry properties first … … 340 341 } 341 342 342 // Search for field by label (case-insensitive, partial match) 343 // Common field aliases for better matching 344 $aliases = [ 345 'phone' => ['phone', 'telephone', 'mobile', 'cell', 'contact number', 'contact', 'phone number'], 346 'name' => ['name', 'first name', 'full name', 'your name'], 347 'surname' => ['surname', 'last name', 'family name'], 348 'email' => ['email', 'e-mail', 'email address'], 349 'message' => ['message', 'comments', 'comment', 'enquiry', 'inquiry', 'details'], 350 'company' => ['company', 'business', 'organization', 'organisation'], 351 'address' => ['address', 'street', 'location'], 352 'city' => ['city', 'town'], 353 'country' => ['country', 'nation'], 354 'date' => ['date', 'booking date', 'appointment date'], 355 'time' => ['time', 'appointment time', 'booking time'] 356 ]; 357 358 // Search for field by label with improved matching 343 359 foreach ($form['fields'] as $field) { 344 360 $field_label = strtolower($field->label); 361 // Normalize: remove special chars for comparison 362 $normalized_field = preg_replace('/[^a-z0-9\s]/', '', $field_label); 363 $normalized_search = preg_replace('/[^a-z0-9\s]/', '', $search_label); 345 364 346 // Check for exact or partial match 347 if ($field_label === $search_label || 348 strpos($field_label, $search_label) !== false || 349 strpos($search_label, $field_label) !== false) { 365 // 1. Exact match (normalized) 366 if ($normalized_field === $normalized_search) { 350 367 $field_value = rgar($entry, $field->id); 351 368 $value = str_replace($match[0], $field_value ?? '', $value); 369 $field_found = true; 352 370 break; 353 371 } 372 373 // 2. Check if search term is in field label 374 if (strpos($normalized_field, $normalized_search) !== false) { 375 $field_value = rgar($entry, $field->id); 376 $value = str_replace($match[0], $field_value ?? '', $value); 377 $field_found = true; 378 break; 379 } 380 381 // 3. Check aliases 382 foreach ($aliases as $alias_group) { 383 if (in_array($normalized_search, $alias_group)) { 384 foreach ($alias_group as $alias) { 385 if (strpos($normalized_field, $alias) !== false) { 386 $field_value = rgar($entry, $field->id); 387 $value = str_replace($match[0], $field_value ?? '', $value); 388 $field_found = true; 389 break 3; 390 } 391 } 392 } 393 } 394 } 395 396 // If field not found, replace with empty string to avoid showing {FieldName} 397 if (!$field_found) { 398 $value = str_replace($match[0], '', $value); 354 399 } 355 400 } … … 1302 1347 <h1>UTM Tracker</h1> 1303 1348 </div> 1304 <span class="bc-version">v3.0. 2</span>1349 <span class="bc-version">v3.0.3</span> 1305 1350 </div> 1306 1351 -
basecloud-utm-tracker/tags/3.0.3/readme.txt
r3460030 r3460077 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 3.0. 26 Stable tag: 3.0.3 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 198 198 199 199 == Changelog == 200 201 = 3.0.3 = 202 * 🎯 **Smart Field Matching** - Enhanced merge tag parser with intelligent field detection and normalization 203 * **Field Aliases** - Automatic mapping for common field variations (phone = telephone/mobile/contact number) 204 * **Special Character Support** - Properly handles ampersands, hyphens in field labels like "Name & Surname" 205 * **Better Empty Handling** - Unmatched merge tags replaced with empty string instead of showing literal {FieldName} 206 * **3-Tier Matching** - Exact match → Partial match → Alias-based matching for maximum compatibility 207 * FIXED: Merge tags like {Phone} now properly match fields named "Contact Number", "Telephone", "Mobile" 208 * FIXED: Complex field labels with special characters (& - .) now match simple merge tags 200 209 201 210 = 3.0.2 = -
basecloud-utm-tracker/trunk/CHANGELOG.md
r3460030 r3460077 1 1 # Changelog 2 3 ## 3.0.3 - 2026-02-12 4 5 **🎯 Merge Tag Intelligence Update** 6 7 ### Improved 8 9 • **Smart Field Matching** - Enhanced merge tag parser with intelligent field detection: 10 - Normalizes field labels by removing special characters (handles "Name & Surname", "E-Mail", etc.) 11 - Added common field aliases (phone = telephone/mobile/contact number) 12 - Better partial matching for complex field names 13 - Prevents literal merge tags appearing in webhook data 14 • **Field Aliases** - Automatic mapping for common variations: 15 - Phone: telephone, mobile, cell, contact number 16 - Name: first name, full name, your name 17 - Surname: last name, family name 18 - Email: e-mail, email address 19 - Message: comments, enquiry, inquiry, details 20 - Plus more for company, address, city, country, date, time 21 • **Empty Field Handling** - Unmatched merge tags now replaced with empty string instead of showing literal {FieldName} 22 • **Special Character Support** - Properly handles ampersands, hyphens, and other special characters in field labels 23 24 ### Technical Details 25 26 • Modified `parse_merge_tag()` function with 3-tier matching system: 27 1. Exact normalized match (most accurate) 28 2. Partial match within field label (flexible) 29 3. Alias-based matching (common variations) 30 • Removes punctuation for comparison while preserving original labels 31 • Prevents webhook display_data from showing malformed merge tags 32 33 --- 2 34 3 35 ## 3.0.2 - 2026-02-12 -
basecloud-utm-tracker/trunk/basecloud-utm-tracker.php
r3460030 r3460077 4 4 * Plugin URI: https://www.basecloudglobal.com/plugins/utm-tracker 5 5 * Description: The "Big 4" Form Automator. Advanced UTM tracking with automated injection for Gravity Forms, Elementor, WPForms, and Contact Form 7. 6 * Version: 3.0. 26 * Version: 3.0.3 7 7 * Author: BaseCloud Team 8 8 * Author URI: https://www.basecloudglobal.com/ … … 303 303 foreach ($matches as $match) { 304 304 $search_label = strtolower(trim($match[1])); 305 $field_found = false; 305 306 306 307 // Check for exact entry properties first … … 340 341 } 341 342 342 // Search for field by label (case-insensitive, partial match) 343 // Common field aliases for better matching 344 $aliases = [ 345 'phone' => ['phone', 'telephone', 'mobile', 'cell', 'contact number', 'contact', 'phone number'], 346 'name' => ['name', 'first name', 'full name', 'your name'], 347 'surname' => ['surname', 'last name', 'family name'], 348 'email' => ['email', 'e-mail', 'email address'], 349 'message' => ['message', 'comments', 'comment', 'enquiry', 'inquiry', 'details'], 350 'company' => ['company', 'business', 'organization', 'organisation'], 351 'address' => ['address', 'street', 'location'], 352 'city' => ['city', 'town'], 353 'country' => ['country', 'nation'], 354 'date' => ['date', 'booking date', 'appointment date'], 355 'time' => ['time', 'appointment time', 'booking time'] 356 ]; 357 358 // Search for field by label with improved matching 343 359 foreach ($form['fields'] as $field) { 344 360 $field_label = strtolower($field->label); 361 // Normalize: remove special chars for comparison 362 $normalized_field = preg_replace('/[^a-z0-9\s]/', '', $field_label); 363 $normalized_search = preg_replace('/[^a-z0-9\s]/', '', $search_label); 345 364 346 // Check for exact or partial match 347 if ($field_label === $search_label || 348 strpos($field_label, $search_label) !== false || 349 strpos($search_label, $field_label) !== false) { 365 // 1. Exact match (normalized) 366 if ($normalized_field === $normalized_search) { 350 367 $field_value = rgar($entry, $field->id); 351 368 $value = str_replace($match[0], $field_value ?? '', $value); 369 $field_found = true; 352 370 break; 353 371 } 372 373 // 2. Check if search term is in field label 374 if (strpos($normalized_field, $normalized_search) !== false) { 375 $field_value = rgar($entry, $field->id); 376 $value = str_replace($match[0], $field_value ?? '', $value); 377 $field_found = true; 378 break; 379 } 380 381 // 3. Check aliases 382 foreach ($aliases as $alias_group) { 383 if (in_array($normalized_search, $alias_group)) { 384 foreach ($alias_group as $alias) { 385 if (strpos($normalized_field, $alias) !== false) { 386 $field_value = rgar($entry, $field->id); 387 $value = str_replace($match[0], $field_value ?? '', $value); 388 $field_found = true; 389 break 3; 390 } 391 } 392 } 393 } 394 } 395 396 // If field not found, replace with empty string to avoid showing {FieldName} 397 if (!$field_found) { 398 $value = str_replace($match[0], '', $value); 354 399 } 355 400 } … … 1302 1347 <h1>UTM Tracker</h1> 1303 1348 </div> 1304 <span class="bc-version">v3.0. 2</span>1349 <span class="bc-version">v3.0.3</span> 1305 1350 </div> 1306 1351 -
basecloud-utm-tracker/trunk/readme.txt
r3460030 r3460077 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 3.0. 26 Stable tag: 3.0.3 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 198 198 199 199 == Changelog == 200 201 = 3.0.3 = 202 * 🎯 **Smart Field Matching** - Enhanced merge tag parser with intelligent field detection and normalization 203 * **Field Aliases** - Automatic mapping for common field variations (phone = telephone/mobile/contact number) 204 * **Special Character Support** - Properly handles ampersands, hyphens in field labels like "Name & Surname" 205 * **Better Empty Handling** - Unmatched merge tags replaced with empty string instead of showing literal {FieldName} 206 * **3-Tier Matching** - Exact match → Partial match → Alias-based matching for maximum compatibility 207 * FIXED: Merge tags like {Phone} now properly match fields named "Contact Number", "Telephone", "Mobile" 208 * FIXED: Complex field labels with special characters (& - .) now match simple merge tags 200 209 201 210 = 3.0.2 =
Note: See TracChangeset
for help on using the changeset viewer.