For Developers
Filters
Section titled “Filters”wpify_woo_sklik_retargeting_render_code
Section titled “wpify_woo_sklik_retargeting_render_code”Controls whether the retargeting code should be rendered.
add_filter( 'wpify_woo_sklik_retargeting_render_code', function( $render ) { // Don't display for logged-in users if ( is_user_logged_in() ) { return false; } return $render;} );| Parameter | Type | Description |
|---|---|---|
$render | bool | true to display (default) |
Returns: bool
wpify_woo_sklik_retargeting_parameters
Section titled “wpify_woo_sklik_retargeting_parameters”Modifies parameters sent to the retargeting code.
add_filter( 'wpify_woo_sklik_retargeting_parameters', function( $parameters ) { // Add custom parameter $parameters['customParam'] = '"value"'; return $parameters;} );| Parameter | Type | Description |
|---|---|---|
$parameters | array | Array of parameters for retargetingConf |
Returns: array
Default structure:
[ 'rtgId' => 'your-rtg-id', 'itemId' => '"123, 124, 125"', // only on product page 'pageType' => '"offerdetail"', // or "category" 'category' => '"Electronics"', // only on category page 'consent' => 'document.cookie.includes("cmplz_marketing=allow") ? 1 : 0']Example: Adding Product Price
Section titled “Example: Adding Product Price”add_filter( 'wpify_woo_sklik_retargeting_parameters', function( $parameters ) { if ( is_product() ) { $product = wc_get_product( get_the_ID() ); $parameters['price'] = '"' . $product->get_price() . '"'; } return $parameters;} );Output Code Structure
Section titled “Output Code Structure”<!-- Sklik retargeting --><script type="text/javascript" src="https://c.seznam.cz/js/rc.js"></script><script> var retargetingConf = { rtgId: your-rtg-id, itemId: "123, 124, 125", pageType: "offerdetail", consent: document.cookie.includes("cmplz_marketing=allow") ? 1 : 0 }; if (window.rc && window.rc.retargetingHit) { window.rc.retargetingHit(retargetingConf); }</script>| Hook | Type | Description |
|---|---|---|
wp_footer | Action | Rendering of retargeting code (priority 20) |