Here is my Universal Analytics code for custom definatons and e-commerce tracking.ecommerce tracking is working fine all the data are fetching in google analytics dashboard but custom dimensions and metrics data is not showing there.
ga('create', 'UA-XXXXXX',XXXXX);
ga('send', 'pageview');
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
'id': '<?php echo $ordr_id; ?>',
'affiliation': 'XXXXXX',
'revenue': '<?php echo $amount; ?>',
'shipping': '<?php echo $shipping_amount; ?>',
'tax': '0.00',
'currency': 'USD'
});
ga('ecommerce:addItem', {
'id': '<?php echo $ordr_id; ?>',
'name': '<?php echo $product_name; ?>',
'sku': '<?php echo $sku; ?>',
'category': '<?php echo $category_name; ?>',
'price': '<?php echo $final_price; ?>',
'quantity': '<?php echo $quantity; ?>'
});
ga('send', 'pageview', {
'dimension1': '<?php echo $product_name; ?>',
'metric2': '<?php echo $final_price; ?>',
'metric3': '<?php echo $final_price; ?>'
});
ga('ecommerce:send');
any help related to this is greatly appreciated. thnx!!