Don Sartain
Don Sartain

Reputation: 617

Google Analytics not displaying Category

After much pain and weeping and gnashing of teeth, I finally managed to get my website to talk to GTM and GTM to send data to Analytics.

I can see revenue and conversion rates and transaction results in Analytics, but not the product category.

I have my GTM tag set to use the Transaction track type along with the data layer.

My test code is:

dataLayer.push({
                'transactionId': 'OnClickTransactionDataLayerPushID', // Transaction ID - Type:String - Required
                'transactionAffiliation': 'OnClickTransactionDataLayerPushAffiliation', // store name - Type:String - Optional to use                    
                'transactionTotal': 45, //total revenue - Type:Numeric - Required
                'transactionTax': 5, // Tax amount for transaction - Type:Numeric - Optional to use
                'transactionShipping': 5, // Shipping cost - Type:Numeric - Optional to use
                'transactionProducts': [{
                    'sku': 'SKU456789', // Product SKU - Type:String - Required
                    'name': 'OnClickTransactionDataLayerPushName', // Product Name - Type:String - Required
                    'category': 'OnClickTransactionDataLayerPushNameCategory', // Product Category - Type:String - Optional to use
                    'price': 35, // Product Price - Type:Numeric - Required
                    'quantity': 1 // Product Quantity - Type:Numeric - Required
                }]
            });

In the GA Debugger I can see that the category is being sent as: ec:item variation (&iv) OnClickTransactionDataLayerPushNameCategory

The only problem is that this isn't a true variation. A variation would be something like color or size, not whether an item belongs to a t-shirt category or whatever. In any event, if this information is being sent over, why can't I see it in Analytics?

enter image description here

EDIT After trying the Enhanced ECommerce code again as below, I see that the product names are hitting the top products list, but no monetary amounts or quantities are displayed. I can see that being sent in the GA debugger though?

dataLayer.push({
                "event": "addToCart",
                "ecommerce": {
                    "currencyCode": "USD",
                    "add": {
                        "products": [{
                            "id": "b55da",
                            "name": "Flexigen T-Shirt",
                            "price": "16.00",
                            "brand": "Flexigen",
                            "category": "T-Shirts",
                            "variant": "red",
                            "dimension1": "M",
                            "position": 0,
                            "quantity": 1
                        }]
                    }
                }
            });

enter image description here

Upvotes: 1

Views: 1593

Answers (1)

Kemen Paulos Plaza
Kemen Paulos Plaza

Reputation: 1570

Your code is standard e-commerce and the report says enhance e-commerce.

Standard https://support.google.com/tagmanager/answer/6107169?hl=en

Enhance https://developers.google.com/tag-manager/enhanced-ecommerce

Disable the enhance e-commerce in you view configuration, tab e-commerce and try to look again.

Upvotes: 2

Related Questions