Filters the destination URL a contact is redirected to when they click a tracked link in an email. Use this to modify or validate redirect destinations.
apply_filters( 'groundhogg/tracking/target_url', $target_url );
You will receive the target URL string.
Example
add_filter( 'groundhogg/tracking/target_url', 'my_extension_append_utm_params' );
/**
* Append UTM parameters to all tracked link destinations.
*
* @param string $target_url
*
* @return string
*/
function my_extension_append_utm_params( $target_url ) {
return add_query_arg( [
'utm_source' => 'groundhogg',
'utm_medium' => 'email',
], $target_url );
}
Was this helpful?
Let us know if this document answered your question. Thatβs the only way we can improve.
