I described my problem here: https://www.nopcommerce.com/boards/t/51545/nop-40-problem-with-analytics-and-conversions.aspx
in short... After upgrade 3.7 > NOP4, our GA(Google Analytics) stop working and show 0 transactions...
I saw ths few day ago, and i was thinking it's problem because i have unchecked Ecommerce checkbox (don't know is this in 3.7 also), and was think it's this...
Today I check again panel and i see few problem:
1. Conversion are only from "direct" source. All other source have 0 conversions.
2, Wrong summary. For example Nopcommerce show 100 orders first day and 100 a second day, but in GA we have 180 (first day) and 40 orders (next day)...
I check code in demo admin panel and maybe i found bug http://admin-demo.nopcommerce.com/Admin/WidgetsGoogleAnalytics/Configure
Your analytics code before we click anything is:
<!-- Google code for Analytics tracking -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{GOOGLEID}']);
_gaq.push(['_trackPageview']);
{ECOMMERCE}
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
BUT if we click anything (one button from pre-configure Google Analytics / Universal Analytics) our script code are changed and {ECOMMERCE} line missing?
PRECONFIGURE GOOGLE ANALYTICS code
<!-- Google code for Analytics tracking -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{GOOGLEID}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Preconfigure Universal Analytics
<!-- Google code for Analytics tracking -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{GOOGLEID}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
If we don't perceive/saw this before click save... {ecommerce} is deleted, and we can't move to see "first code".
My code after clicks look like below: I don't have {ecommerce} line, maybe that's why it's stoped work?
<!-- Google code for Analytics tracking -->
<script>
(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', '{GOOGLEID}', 'auto');
ga('send', 'pageview');
</script>