AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

2.6K members online now
2.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Ecommerce Data / DataLayer Not Pushing to Analytics

SMG Badged Google Partner
Badged Google Partner
# 1
SMG Badged Google Partner
Badged Google Partner

We are using Google Tag Manager. Transaction data is in the datalayer on the order confirmation page as follows:



In console I wrote “universal_variable” which I believe holds all the datalayer data. I wrote a custom JS function (below) which uses Google's required variables and fires when I place a sample order. However the transaction information is not registering in GA. What are we missing? Help is much appreciated. Thanks. 



  var obj_to_push = {
	"transactionId": universal_variable.transaction.order_id,
	"transactionProducts": []
	universal_variable.transaction.line_items.forEach(function(item) {
		temp = {"name","price":item.product.unit_sale_price,"quantity":item.quantity,"sku":item.product.sku_code};
window.dataLayer = window.dataLayer || [];
1 Expert replyverified_user

Re: Ecommerce Data / DataLayer Not Pushing to Analytics

Top Contributor
# 2
Top Contributor
Hi there,
a couple points about
1- Refer to the data layer specification for Enhanced eCommerce for GTM
2- don't use "universal_variable" it's a reserved name for other tag management systems
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan