gform_aweber_ad_tracking

Description

This filter can be used to modify the ad_tracking parameter value before it is sent to AWeber.

Usage

The filter which would run for all AWeber feeds can be used like so:

add_filter( 'gform_aweber_ad_tracking', 'your_function_name', 10, 4 );

You can limit the scope of the filter to a single form by appending the form id on the end of the hook name like so:

add_filter( 'gform_aweber_ad_tracking_5', 'your_function_name', 10, 4 );

Parameters

  • $ad_tracking string

    The default value of the ad_tracking parameter is the form title.

  • $form Form Object

    The Form which is currently being processed.

  • $entry Entry Object

    The Entry which is currently being processed.

  • $feed Feed Object

    The Feed which is currently being processed.

Example

The following example shows how you can change the parameter value.

add_filter( 'gform_aweber_ad_tracking', function ( $ad_tracking, $form, $entry, $feed ) {

return 'your new value';
}, 10, 4 );

Placement

Your code snippet should be placed in the functions.php file of your active theme.

Source Code

apply_filters( "gform_aweber_ad_tracking_{$form['id']}", apply_filters( 'gform_aweber_ad_tracking', $form['title'], $entry, $form, $feed ), $entry, $form, $feed )

This filter is located in GFAWeber::export_feed() in class-gf-aweber.php.