Adding custom variable to product information
-
Hi there,
First of all I want to thank you very much for this great plugin and the contribution you are offering in this forum. We are using the plugin for quite some time now and are really satsified with it.
I am currently trying to add a datalayer variable to all product information data (giving out a constant – except from the order confirmation page, but this exception will be added later on), but it simply won’t come out. Could you perhaps have a look?
Two different filters were used, but neither worked:
function custom_metric_addition( $dataLayer ) { $dataLayer["metric1"] = 0; return $dataLayer; } add_filter( GTM4WP_WPFILTER_COMPILE_DATALAYER, "custom_metric_addition" ); add_filter( GTM4WP_WPFILTER_EEC_PRODUCT_ARRAY, "custom_metric_addition" );
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding custom variable to product information’ is closed to new replies.