Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add custom dimensions to Google Universal Analytics in woopt WooCommerce Pixel Manager
<?
add_filter('wooptpm_ga_ua_parameters', function ($analytics_parameters, $analytics_id){
$analytics_parameters['custom_map'] = [
'dimension1' => 'ecomm_prodid',
'dimension2' => 'ecomm_pagetype',
'dimension3' => 'ecomm_totalvalue',
];
return $analytics_parameters;
}, 10,2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment