Changeset 3220274
- Timestamp:
- 01/10/2025 02:29:38 PM (14 months ago)
- Location:
- fathom-analytics-conversions
- Files:
-
- 6 edited
- 1 copied
-
tags/1.1.3 (copied) (copied from fathom-analytics-conversions/trunk)
-
tags/1.1.3/README.txt (modified) (2 diffs)
-
tags/1.1.3/admin/class-fathom-analytics-conversions-gravityforms.php (modified) (4 diffs)
-
tags/1.1.3/fathom-analytics-conversions.php (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-fathom-analytics-conversions-gravityforms.php (modified) (4 diffs)
-
trunk/fathom-analytics-conversions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fathom-analytics-conversions/tags/1.1.3/README.txt
r3215892 r3220274 5 5 Requires at least: 5.9 6 6 Tested up to: 6.7.1 7 Stable tag: 1.1. 2.17 Stable tag: 1.1.3 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 143 143 == Changelog == 144 144 145 = 1.1.3 = 146 * Fixed Gravity forms no conversions. FIXES:https://wordpress.org/support/topic/gravity-forms-no-conversions/ 147 145 148 = 1.1.2.1 = 146 149 * Removed plugin dependencies -
fathom-analytics-conversions/tags/1.1.3/admin/class-fathom-analytics-conversions-gravityforms.php
r3210911 r3220274 4 4 * 5 5 * @link https://www.fathomconversions.com 6 * @since 1. 06 * @since 1.1.3 7 7 * 8 8 * @package Fathom_Analytics_Conversions … … 59 59 add_filter( 'gform_form_tag', [ $this, 'fac_gform_form_tag' ], 10, 2 ); 60 60 61 add_filter( 'gform_confirmation', [ 62 $this, 63 'fac_gform_confirmation', 64 ], 100, 2 ); 65 61 66 // Add custom form element - form title. 62 67 add_filter( 'gform_form_after_open', [ … … 94 99 95 100 // Add custom form element - form title. 101 public function fac_gform_confirmation( $confirmation, $form ) { 102 //echo '<pre>';print_r($confirmation);echo '</pre>'; 103 //echo '<div id="gform_name_' . $form['id'] . '" data-form-name="' . esc_html( $form['title'] ) . '"></div>'; 104 if ( is_array( $confirmation ) && ! empty( $confirmation['redirect'] ) ) { 105 $confirmation['redirect'] = add_query_arg( [ 'fac_gf' => $form['title'] . ' [' . $form['id'] . ']' ], $confirmation['redirect'] ); 106 } elseif ( is_string( $confirmation ) ) { 107 $confirmation .= '<div id="gform_name_' . $form['id'] . '" data-form-name="' . esc_html( $form['title'] ) . '"></div>'; 108 } 109 110 return $confirmation; 111 } 112 113 // Add custom form element - form title. 96 114 public function fac_gform_form_after_open( $html, $form ) { 97 115 $html .= '<div id="gform_name_' . $form['id'] . '" data-form-name="' . esc_html( $form['title'] ) . '"></div>'; … … 122 140 $fac_content = '<script id="fac-gravity-forms" data-cfasync="false" data-pagespeed-no-defer type="text/javascript">'; 123 141 $fac_content .= 'jQuery(document).on("gform_confirmation_loaded", function(e, formId, confirmationMessage) { 124 var f = document.getElementById("gform_name_"+formId), 125 form_name = f.dataset.formName; 126 fathom.trackEvent(form_name + " ["+formId+"]"); 142 var f = document.getElementById("gform_name_"+formId); 143 if( f ) { 144 var form_name = f.dataset.formName; 145 fathom.trackEvent(form_name + " ["+formId+"]"); 146 } 127 147 });'; 148 $fac_content .= "\nfunction facGfGetUrlParameter(name) { 149 name = name.replace(/[\[\]]/g, '\\$&'); 150 const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'); 151 const results = regex.exec(window.location.href); 152 if (!results) return null; 153 if (!results[2]) return ''; 154 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 155 } 156 window.addEventListener('load', (event) => { 157 const facGfValue = facGfGetUrlParameter('fac_gf'); 158 if (facGfValue) { 159 fathom.trackEvent(facGfValue); 160 } 161 });"; 128 162 $fac_content .= '</script>'; 129 163 -
fathom-analytics-conversions/tags/1.1.3/fathom-analytics-conversions.php
r3215892 r3220274 17 17 * Plugin URI: https://www.fathomconversions.com 18 18 * Description: Easily add event conversions in WordPress plugins to Fathom Analytics 19 * Version: 1.1. 2.119 * Version: 1.1.3 20 20 * Author: SixFive Pty Ltd 21 21 * Author URI: https://www.sixfive.io … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'FATHOM_ANALYTICS_CONVERSIONS_VERSION', '1.1. 2.1' );38 define( 'FATHOM_ANALYTICS_CONVERSIONS_VERSION', '1.1.3' ); 39 39 define( 'FAC4WP_PATH', plugin_dir_path( __FILE__ ) ); 40 40 -
fathom-analytics-conversions/trunk/README.txt
r3215892 r3220274 5 5 Requires at least: 5.9 6 6 Tested up to: 6.7.1 7 Stable tag: 1.1. 2.17 Stable tag: 1.1.3 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 143 143 == Changelog == 144 144 145 = 1.1.3 = 146 * Fixed Gravity forms no conversions. FIXES:https://wordpress.org/support/topic/gravity-forms-no-conversions/ 147 145 148 = 1.1.2.1 = 146 149 * Removed plugin dependencies -
fathom-analytics-conversions/trunk/admin/class-fathom-analytics-conversions-gravityforms.php
r3210911 r3220274 4 4 * 5 5 * @link https://www.fathomconversions.com 6 * @since 1. 06 * @since 1.1.3 7 7 * 8 8 * @package Fathom_Analytics_Conversions … … 59 59 add_filter( 'gform_form_tag', [ $this, 'fac_gform_form_tag' ], 10, 2 ); 60 60 61 add_filter( 'gform_confirmation', [ 62 $this, 63 'fac_gform_confirmation', 64 ], 100, 2 ); 65 61 66 // Add custom form element - form title. 62 67 add_filter( 'gform_form_after_open', [ … … 94 99 95 100 // Add custom form element - form title. 101 public function fac_gform_confirmation( $confirmation, $form ) { 102 //echo '<pre>';print_r($confirmation);echo '</pre>'; 103 //echo '<div id="gform_name_' . $form['id'] . '" data-form-name="' . esc_html( $form['title'] ) . '"></div>'; 104 if ( is_array( $confirmation ) && ! empty( $confirmation['redirect'] ) ) { 105 $confirmation['redirect'] = add_query_arg( [ 'fac_gf' => $form['title'] . ' [' . $form['id'] . ']' ], $confirmation['redirect'] ); 106 } elseif ( is_string( $confirmation ) ) { 107 $confirmation .= '<div id="gform_name_' . $form['id'] . '" data-form-name="' . esc_html( $form['title'] ) . '"></div>'; 108 } 109 110 return $confirmation; 111 } 112 113 // Add custom form element - form title. 96 114 public function fac_gform_form_after_open( $html, $form ) { 97 115 $html .= '<div id="gform_name_' . $form['id'] . '" data-form-name="' . esc_html( $form['title'] ) . '"></div>'; … … 122 140 $fac_content = '<script id="fac-gravity-forms" data-cfasync="false" data-pagespeed-no-defer type="text/javascript">'; 123 141 $fac_content .= 'jQuery(document).on("gform_confirmation_loaded", function(e, formId, confirmationMessage) { 124 var f = document.getElementById("gform_name_"+formId), 125 form_name = f.dataset.formName; 126 fathom.trackEvent(form_name + " ["+formId+"]"); 142 var f = document.getElementById("gform_name_"+formId); 143 if( f ) { 144 var form_name = f.dataset.formName; 145 fathom.trackEvent(form_name + " ["+formId+"]"); 146 } 127 147 });'; 148 $fac_content .= "\nfunction facGfGetUrlParameter(name) { 149 name = name.replace(/[\[\]]/g, '\\$&'); 150 const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'); 151 const results = regex.exec(window.location.href); 152 if (!results) return null; 153 if (!results[2]) return ''; 154 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 155 } 156 window.addEventListener('load', (event) => { 157 const facGfValue = facGfGetUrlParameter('fac_gf'); 158 if (facGfValue) { 159 fathom.trackEvent(facGfValue); 160 } 161 });"; 128 162 $fac_content .= '</script>'; 129 163 -
fathom-analytics-conversions/trunk/fathom-analytics-conversions.php
r3215892 r3220274 17 17 * Plugin URI: https://www.fathomconversions.com 18 18 * Description: Easily add event conversions in WordPress plugins to Fathom Analytics 19 * Version: 1.1. 2.119 * Version: 1.1.3 20 20 * Author: SixFive Pty Ltd 21 21 * Author URI: https://www.sixfive.io … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'FATHOM_ANALYTICS_CONVERSIONS_VERSION', '1.1. 2.1' );38 define( 'FATHOM_ANALYTICS_CONVERSIONS_VERSION', '1.1.3' ); 39 39 define( 'FAC4WP_PATH', plugin_dir_path( __FILE__ ) ); 40 40
Note: See TracChangeset
for help on using the changeset viewer.