gform_ua_ids

Filter: gform_ua_ids.

Description

apply_filters( 'gform_ua_ids', (array) $google_analytics_codes, (object) $form, (object) $entry ); 

Filter all outgoing UA IDs to send events to

Parameters (3)

0. $google_analytics_codes (array)
The google analytics codes.
1. $form (object)
Gravity Form form object
2. $entry (object)
Gravity Form Entry Object

Usage

To run the hook, copy the example below.
  1. $google_analytics_codes = apply_filters( 'gform_ua_ids', $google_analytics_codes, $form, $entry ); 
  2.  
  3. if ( !empty( $google_analytics_codes ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the gform_ua_ids callback 
  2. function filter_gform_ua_ids( $google_analytics_codes, $form, $entry ) { 
  3. // make filter magic happen here... 
  4. return $google_analytics_codes
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'gform_ua_ids', 'filter_gform_ua_ids', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'gform_ua_ids', 'filter_gform_ua_ids', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/class-gravity-forms-event-tracking-feed.php  
  1. $google_analytics_codes = apply_filters( 'gform_ua_ids', $google_analytics_codes, $form, $entry );