<gtm4wp_wpfilter_compile_remarkting>

The Google Tag Manager for WordPress gtm4wp wpfilter compile remarkting hook.

Description

apply_filters( '<gtm4wp_wpfilter_compile_remarkting>', (unknown) $gtm4wp_datalayer_data ); 

Parameters (1)

0. $gtm4wp_datalayer_data (unknown)
The gtm4wp datalayer data.

Usage

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

Defined (1)

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

/public/frontend.php  
  1. $gtm4wp_remarketing_tags = (array) apply_filters( GTM4WP_WPFILTER_COMPILE_REMARKTING, $gtm4wp_datalayer_data );