Analytics
1.9K members online now
1.9K 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
star_border
Reply

Unable to see transaction data since 3rd NOV 2015

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am using enhanced ecommerce plugin to send ecommerce data to the google analytics. Since 3rd of NOV 2015 I am not seeing the transactions in the sales preformance report. Earlier it was appearing.

Here is my tracking code. Please advise.

 

<script type="text/javascript">
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src=g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

ga('create', 'UA-6098039-13', 'auto');
ga('send', 'pageview');
ga('require', 'ec');
ga('set', '&cu', 'GBP');
$(document).ready(function () {
var cartArray = $("#<%= hfProductList.ClientID %>").val();
var transactionID = $("#<%= hfTransactionID.ClientID %>").val();
var storeName = $("#<%= hfStoreName.ClientID %>").val();
var shipping = $("#<%= hfShipping.ClientID %>").val();
var tax = $("#<%= hfTax.ClientID %>").val();
var orderTotal = $("#<%= hfOrderTotal.ClientID %>").val();
var orderID = $("#<%= hfOrderID.ClientID %>").val();
console.log('<<<<<<<<<<<<<<<<<<<Transaction ID : ' + transactionID)
var _orderTotal = parseFloat(orderTotal);
var _orderTax = parseFloat(tax);
var _shipping = parseFloat(shipping);
var jsonArray = jQuery.parseJSON(cartArray);
$.each(jsonArray, function (i, item) {
if (item != null) {
console.debug('BEGIN');
var _productPrice = parseFloat(item.Price);

ga('ec:addProduct', {
'id': item.ProductId,
'name': item.ProductName,
'category': item.Category,
'price': _productPrice,
'quantity': item.Quantity
});
ga('send', 'pageview');

console.debug('Product Price:' + _productPrice + ' Product Quantity:' + item.Quantity + ' Order Total:' + _orderTotal + ' Tax:' + _orderTax + ' Shipping:' + _shipping);
console.debug('END');
}
});
if (transactionID != null) {
console.debug('Transaction ID is not NULL: ' + transactionID);
ga('ec:setAction', 'purchase', {
id: transactionID,
affiliation: storeName,
revenue: _orderTotal,
tax: _orderTax,
shipping: _shipping
});
ga('send', 'pageview');
}
else {
console.debug('Transaction ID is NULL: ' + transactionID);
}
console.log('-------------Sent to ecommerce universal google analytics-----------------');
UpdateOrders(parseInt(orderID));
});
function UpdateOrders(orderID) {
//debugger;
var args = { OrderId: orderID }
$.ajax({
type: "POST",
url: "/CheckoutCompleted.aspx/SetGoogleCommercegOrder",
data&colon; JSON.stringify(args),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function () {
console.log('UpdateOrders Success : ' + orderID);
},
error: function () {
console.log('UpdateOrders Fail!' + orderID);
}
});
}

</script>

1 Expert replyverified_user

Re: Unable to see transaction data since 3rd NOV 2015

Top Contributor
# 2
Top Contributor
Hi,

You can check your order confirmation page using the Google Tag Assistant and/or Google Analytics debugger Chrome extensions to see if your ecommerce code is working. Let me know what you find.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Unable to see transaction data since 3rd NOV 2015

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Arnold,
Thanks for quick reply.

GA debug has the following results:
Initializing Google Analytics.
analytics_debug.js:9 Loading resource for plugin: ec
analytics_debug.js:9 Loading script: "http://www.google-analytics.com/plugins/ua/ec.js"
analytics_debug.js:9 Running command: ga("create", "UA-6098039-13", "auto")
analytics_debug.js:9 Creating new tracker: t0
analytics_debug.js:9 Auto cookieDomain found: "none"
analytics_debug.js:9 Running command: ga("send", "pageview")
analytics_debug.js:9
Sent beacon:
v=1&_v=j40d&a=300351192&t=pageview&_s=1&dl=http%3A%2F%2Flocalhost%2Fcheckoutcompleted.aspx&ul=en-gb&de=UTF-8&dt=Checkout&sd=24-bit&sr=1920x1080&vp=1127x979&je=1&fl=19.0%20r0&_u=AACAAEIJI~&jid=&cid=683733652.1446708484&tid=UA-6098039-13&z=1405155001


analytics_debug.js:9 _j1 (&jid)
analytics_debug.js:9 adSenseId (&a) 300351192
analytics_debug.js:9 apiVersion (&v) 1
analytics_debug.js:9 clientId (&cid) 683733652.1446708484
analytics_debug.js:9 encoding (&de) UTF-8
analytics_debug.js:9 flashVersion (&fl) 19.0 r0
analytics_debug.js:9 hitType (&t) pageview
analytics_debug.js:9 javaEnabled (&je) 1
analytics_debug.js:9 language (&ul) en-gb
analytics_debug.js:9 location (&dl) http://localhost/checkoutcompleted.aspx
analytics_debug.js:9 screenColors (&sd) 24-bit
analytics_debug.js:9 screenResolution (&sr) 1920x1080
analytics_debug.js:9 title (&dt) Checkout
analytics_debug.js:9 trackingId (&tid) UA-6098039-13
analytics_debug.js:9 viewportSize (&vp) 1127x979
analytics_debug.js:9 Running command: ga("require", "ec")
analytics_debug.js:9 Waiting on require of "ec" to be fulfilled.
checkoutcompleted.aspx:927 UpdateOrders Success : 7442
analytics_debug.js:9 Executing Google Analytics commands.
analytics_debug.js:9 Registered new plugin: ga(provide, "ec", Function)
analytics_debug.js:9 Running command: ga("require", "ec")
analytics_debug.js:9 Plugin "ec" intialized on tracker "t0".
analytics_debug.js:9 Running command: ga("set", "&cu", "GBP")
analytics_debug.js:9 Running command: ga("ec:addProduct", {id: 833, name: "SuperWave 12 Col.2 Dream Girl", category: "Yaki", price: 24, quantity: 1})
analytics_debug.js:9 Running command: ga("send", "pageview")
analytics_debug.js:9
Sent beacon:
v=1&_v=j40d&a=300351192&t=pageview&cu=GBP&_s=2&dl=http%3A%2F%2Flocalhost%2Fcheckoutcompleted.aspx&ul=en-gb&de=UTF-8&dt=Checkout&sd=24-bit&sr=1920x1080&vp=1127x979&je=1&fl=19.0%20r0&_u=SCCAAEIJI~&jid=&cid=683733652.1446708484&tid=UA-6098039-13&pr1id=833&pr1nm=SuperWave%2012%20%20Col.2%20Dream%20Girl&pr1ca=Yaki&pr1pr=24&pr1qt=1&z=1988181105


analytics_debug.js:9 _j1 (&jid)
analytics_debug.js:9 adSenseId (&a) 300351192
analytics_debug.js:9 apiVersion (&v) 1
analytics_debug.js:9 clientId (&cid) 683733652.1446708484
analytics_debug.js:9 currencyCode (&cu) GBP
analytics_debug.js:9 ecSmiley Tongueroduct "1" category (&pr1ca) Yaki
analytics_debug.js:9 ecSmiley Tongueroduct "1" id (&pr1id) 833
analytics_debug.js:9 ecSmiley Tongueroduct "1" name (&pr1nm) SuperWave 12 Col.2 Dream Girl
analytics_debug.js:9 ecSmiley Tongueroduct "1" price (&pr1pr) 24
analytics_debug.js:9 ecSmiley Tongueroduct "1" quantity (&pr1qt) 1
analytics_debug.js:9 encoding (&de) UTF-8
analytics_debug.js:9 flashVersion (&fl) 19.0 r0
analytics_debug.js:9 hitType (&t) pageview
analytics_debug.js:9 javaEnabled (&je) 1
analytics_debug.js:9 language (&ul) en-gb
analytics_debug.js:9 location (&dl) http://localhost/checkoutcompleted.aspx
analytics_debug.js:9 screenColors (&sd) 24-bit
analytics_debug.js:9 screenResolution (&sr) 1920x1080
analytics_debug.js:9 title (&dt) Checkout
analytics_debug.js:9 trackingId (&tid) UA-6098039-13
analytics_debug.js:9 viewportSize (&vp) 1127x979
analytics_debug.js:9 Running command: ga("ec:setAction", "purchase", {id: "E35F210D-C7E2-0D25-D29F-52343D12B84C", affiliation: "www.ChicHair.co.uk", revenue: 28.5, tax: 4, shipping: 4.5})
analytics_debug.js:9 Running command: ga("send", "pageview")
analytics_debug.js:9
Sent beacon:
v=1&_v=j40d&a=300351192&t=pageview&cu=GBP&_s=3&dl=http%3A%2F%2Flocalhost%2Fcheckoutcompleted.aspx&ul=en-gb&de=UTF-8&dt=Checkout&sd=24-bit&sr=1920x1080&vp=1127x979&je=1&fl=19.0%20r0&_u=SCCAAEIJI~&jid=&cid=683733652.1446708484&tid=UA-6098039-13&ti=E35F210D-C7E2-0D25-D29F-52343D12B84C&ta=www.ChicHair.co.uk&tr=28.5&tt=4&ts=4.5&pa=purchase&z=1866073111


analytics_debug.js:9 _j1 (&jid)
analytics_debug.js:9 adSenseId (&a) 300351192
analytics_debug.js:9 apiVersion (&v) 1
analytics_debug.js:9 clientId (&cid) 683733652.1446708484
analytics_debug.js:9 currencyCode (&cu) GBP
analytics_debug.js:9 ec:action (&pa) purchase
analytics_debug.js:9 ec:affiliation (&ta) www.ChicHair.co.uk
analytics_debug.js:9 ec:id (&ti) E35F210D-C7E2-0D25-D29F-52343D12B84C
analytics_debug.js:9 ec:revenue (&tr) 28.5
analytics_debug.js:9 ec:shipping (&ts) 4.5
analytics_debug.js:9 ec:tax (&tt) 4
analytics_debug.js:9 encoding (&de) UTF-8
analytics_debug.js:9 flashVersion (&fl) 19.0 r0
analytics_debug.js:9 hitType (&t) pageview
analytics_debug.js:9 javaEnabled (&je) 1
analytics_debug.js:9 language (&ul) en-gb
analytics_debug.js:9 location (&dl) http://localhost/checkoutcompleted.aspx
analytics_debug.js:9 screenColors (&sd) 24-bit
analytics_debug.js:9 screenResolution (&sr) 1920x1080
analytics_debug.js:9 title (&dt) Checkout
analytics_debug.js:9 trackingId (&tid) UA-6098039-13
analytics_debug.js:9 viewportSize (&vp) 1127x979
ping?client_id=334341610034299&domain=localhost&origin=1&redirect_uri=http%3A%2F%2Fstatic.ak.facebo…:1 Given URL is not permitted by the Application configuration: One or more of the given URLs is not permitted by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

On the other hand Google Tag Assistance has the following results:

navigate_next
web
Page load 16:
error
Checkout
Redirect : https://testcheckout.sagepay.com/gateway/service/authorisation
Redirect :
http://localhost:55437/SagePaySuccess.aspx?crypt=@3ada7cb1fe6a16c8d0d1f5f650fc05e9269bb087f75e8873af604197c02b8d5455697b6a0a1303e7408b465bcd41857aa2995000992d83cf2ae28a410e6fdb62fb25feac19373fe4107ead5fd2f367accb59782b10ef300cad0cb99446ffcd604330f84d353b396f800a6cdf6269742fbffeaf5091ad4c8f43e715e8c46d21516cd1d060c402d037a9adf57cd4ddd7388af196a3da6d277975d42d08371555b4ac875c337ae2d40530426a847447bc97d7047f8fb79d0665f59746f44f4cfbf9976f0cceeb0d28f2bee7aab37c1061f16e523e8451a1939ed69e7e3d17a54a970f80cdafd75122ddf5f4a33592bcafaa01e19458ee719ec2cae15de53ccfdb6e002e3aca65c23e4b85ebcc882ea17bfcf3903749ca70cd6d04125bd7a79edd3b52425e592366b42529f2dc5e2cbb4ccec8b7f94767bd4b44fc33cda4204e68dc3619252b28ea43df91c9db9205daf2c4d91ca2916bcd9475c56a24ee8e5da2f5ca070371e2643ffc6918b00b1d84676042b7168d59137cf81fa51c5410608d66d26fea07fd383a877bf68e1a232cf4bb29986c36da2ba52624a2e8d4acde95ef
navigate_next
URL : http://localhost:55437/checkoutcompleted.aspx
Time : 3876 ms after page load 15 navigate_next
Hits : 3 hits (1 property)
3 Hits for property: Chichair (UA-6098039-13)
navigate_next
description
Hit 1:
Pageview - Checkout
Time : 595 ms after page load 16
Hit URL :
http://www.google-analytics.com/collect?v=1&_v=j40d&a=300351192&t=pageview&_s=1&dl=http%3A%2F%2Floca...
navigate_next
Title : Checkout
URI : /checkoutcompleted.aspx
Hostname : localhost
Campaign (based on utm_source, utm_medium, ...)
Source : (direct)
Medium : (none)
public View: Chichair View
Hit number in session : 33
Stored in GA as : 15:17
Mutations
Hit captured without modifications.
navigate_next
description
Hit 2:
error
Pageview - Checkout
Time : 651 ms after page load 16
Hit URL :
http://www.google-analytics.com/collect?v=1&_v=j40d&a=300351192&t=pageview&cu=GBP&_s=2&dl=http%3A%2F...
navigate_next
Title : Checkout
URI : /checkoutcompleted.aspx
Hostname : localhost
error
This hit was preceded by an identical pageview hit. It's likely that this hit is a duplicate. If you have consecutive duplicate pageview hits, your bounce rate and pageview numbers could be inaccurate. Learn more
warning
This page has two interaction hits within a short time window. The page might have two hits that always fire on page load, which can cause an artificially low bounce rate. Learn more
Campaign (based on utm_source, utm_medium, ...)
Source : (direct)
Medium : (none)
public View: Chichair View
Hit number in session : 34
Stored in GA as : 15:17
Mutations
Hit captured without modifications.
navigate_next
description
Hit 3:
error
Pageview - Checkout
Time : 653 ms after page load 16
Hit URL :
http://www.google-analytics.com/collect?v=1&_v=j40d&a=300351192&t=pageview&cu=GBP&_s=3&dl=http%3A%2F...
navigate_next
Title : Checkout
URI : /checkoutcompleted.aspx
Hostname : localhost
error
This hit was preceded by an identical pageview hit. It's likely that this hit is a duplicate. If you have consecutive duplicate pageview hits, your bounce rate and pageview numbers could be inaccurate. Learn more
Campaign (based on utm_source, utm_medium, ...)
Source : (direct)
Medium : (none)
Ecommerce transaction
Transaction Id : E35F210D-C7E2-0D25-D29F-52343D12B84C
Revenue : 28.50
Shipping : 4.50
Tax : 4.00
Affiliation : www.ChicHair.co.uk
public View: Chichair View
Hit number in session : 35
Stored in GA as : 15:17
Mutations
Hit captured without modifications.

Re: Unable to see transaction data since 3rd NOV 2015

Top Contributor
# 4
Top Contributor
Hi,

You are sending the pageview three times in your code.
ga('send', 'pageview');
You should use the send command only once after the transaction code to send the transaction details to GA with your page view. Hope this helps, let me know what happens when you remove the first two instances.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Unable to see transaction data since 3rd NOV 2015

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
I removed the first two instance of the pageview from my tracking code now the Google Tag Assistance report did not give any error but the data still not appearing in the google analytic conversion report. Moreover form 16 NOV an alert is appearing on my current view:
"Missing Ecommerce Data
View Chichair View is configured for Ecommerce, but no data is flowing.
Adjust view settings | Check again | Ignore | Details"

Please advise.

Re: Unable to see transaction data since 3rd NOV 2015

Top Contributor
# 6
Top Contributor
Hi,

Do you see the ecommerce data being sent using Tag Assistant or GA debugger?
Can you paste the source code of your confirmation page here?
Thanks

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Unable to see transaction data since 3rd NOV 2015

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Yes the data is sent to the google analytics I had seened it using Tag Assistant and GA debugger.

The tracking code on confirmation page is :

&lt;script type="text/javascript">
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src=g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

ga('create', 'UA-6098039-13', 'auto');
ga('require', 'ec');
ga('set', '&cu', 'GBP');

$(document).ready(function () {
var cartArray = $("#<%= hfProductList.ClientID %>").val();
var transactionID = $("#<%= hfTransactionID.ClientID %>").val();
var storeName = $("#<%= hfStoreName.ClientID %>").val();
var shipping = $("#<%= hfShipping.ClientID %>").val();
var tax = $("#<%= hfTax.ClientID %>").val();
var orderTotal = $("#<%= hfOrderTotal.ClientID %>").val();
var orderID = $("#<%= hfOrderID.ClientID %>").val();
var _orderTotal = parseFloat(orderTotal);
var _orderTax = parseFloat(tax);
var _shipping = parseFloat(shipping);
var jsonArray = jQuery.parseJSON(cartArray);
$.each(jsonArray, function (i, item) {
if (item != null) {
console.debug('BEGIN');
var _productPrice = parseFloat(item.Price);
ga('ec:addProduct', {
'id': item.ProductId,
'name': item.ProductName,
'category': item.Category,
'price': _productPrice,
'quantity': item.Quantity
});
console.debug('Product Price:' + _productPrice + ' Product Quantity:' + item.Quantity + ' Order Total:' + _orderTotal + ' Tax:' + _orderTax + ' Shipping:' + _shipping);
console.debug('END');
}
});
if (transactionID != null) {
console.debug('Transaction ID is not NULL: ' + transactionID);
ga('ec:setAction', 'purchase', {
'id': transactionID,
'affiliation': storeName,
'revenue': _orderTotal,
'tax': _orderTax,
'shipping': _shipping
});
ga('send', 'pageview');
}
else {
console.debug('Transaction ID is NULL: ' + transactionID);
}
console.debug('-------------Sent to ecommerce universal google analytics-----------------');
UpdateOrders(parseInt(orderID));
});
function UpdateOrders(orderID) {
var args = { OrderId: orderID }
$.ajax({
type: "POST",
url: "/CheckoutCompleted.aspx/SetGoogleCommercegOrder",
data&colon; JSON.stringify(args),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function () {
console.log('UpdateOrders Success : ' + orderID);
},
error: function () {
console.log('UpdateOrders Fail!' + orderID);
}
});
}
&lt;/script&gt;

Re: Unable to see transaction data since 3rd NOV 2015

Top Contributor
# 8
Top Contributor
Do you have enhanced ecommerce enabled in Admin -> View -> Ecommerce settings?

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Unable to see transaction data since 3rd NOV 2015

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭
Yes.

Re: Unable to see transaction data since 3rd NOV 2015

Top Contributor
# 10
Top Contributor
Can you post the output html source code?

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital