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

Analytics
3K members online now
3K 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

Missing Ecommerce tracking

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I've been implementing code on 6 properties and tracking these separately and in to one master view and adjusted the code accordingly to do so. I had several transactions and I have activated Ecommerce tracking and waited more than 48 hours for the data to be processed to see if it were because of a delay.

 

Because of technical restrictions I had to ad Javascript to all pages through the website admin to tell the website to load a ga-new.js file with the analytics code, which is unique for every property. It seems to work just fine and were implemented in the header tag, but I can't track ecommerce, though everything else seems to work. 

 

One thing I noticed Is that the javasrcript where loaded in the end of the head tag and not in the beginning. And I've adjusted that since Google wants the code to be as far up in the header tag as possible, but can this affect the ecommerce tracking?

 

Any ideas?

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Fredrik E
March 2017

Missing Ecommerce tracking

Top Contributor
# 10
Top Contributor

You need to add the values to the variables in the ecommerce tracking code dynamically using javascript or server side coding. There are examples at the bottom of the document I linked above.


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

View solution in original post

Missing Ecommerce tracking

Top Contributor
# 2
Top Contributor

Hi,

 

I would suggest you to record your test transactions using the Google Tag Assistant Chrome extension and analyze the recordings to see what is happening on the receipt page.

https://support.google.com/analytics/answer/6277313?hl=en

 

If you can post your ecommerce tracking code we can check if it's correct.


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

Missing Ecommerce tracking

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi!

Iv'e installed it but not certain how to use it. What I can tell I that se the javascript on all pages including the checkout and confirmation page. Below I've posted the tracking code of one property. Where as UA-91257792-5 is sending data to the master. I'm using this script to load the ga-new-.js file: <script src="/stage/scripts/ga-new.js"></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','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-91262628-1', 'auto');
  ga('create', 'UA-91257792-5', 'auto', 'clientTracker');
  ga('send', 'pageview');
  ga('clientTracker.send', 'pageview');

Missing Ecommerce tracking

Top Contributor
# 4
Top Contributor

Hi,

 

Your code for sending pageviews to the two properties is correct. What does the ga-new.js file do?

 

How did you implement the ecommerce tracking code? Please review the document below and check if you've added everything that is needed for tracking ecommerce transactions.

 

https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce


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

Missing Ecommerce tracking

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

The ga-new.js file loads the Analytics script. From what I've understand you activate e-commerce tracking within the setting of Google Analytics, but the code remains the same? Before I did enter the UA-xxxxxxx-x code on the website admin and didn't need to do anything else, but since I adjusted the code to track to a master, could that make the case different?

 

The ecommerce tracking were activated within settings, but did not know any code needed to be added?

Missing Ecommerce tracking

Top Contributor
# 6
Top Contributor

The default tracking snippet loads the analytics.js script, there is no need to load it from a local file.

 

Unfortunately it is not enough to enable ecommerce tracking in the GA settings, it needs additional code. It's not a simple copy/paste implementation, you need to get the transaction details into the tracking code. What ecommerce platform do you use? There is a chance that there are GA ecommerce tracking plugins for it.


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

Missing Ecommerce tracking

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Is there an universal tracking code that can be written in the <head> tag that loads after the first GA-tracking tag?

 

In that case I could add that code to the orderconfimation page.

Missing Ecommerce tracking

Top Contributor
# 8
Top Contributor

Just leave the tracking code you have in the head tag and add the ecommerce tracking code after it on the order confirmation page.


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

Missing Ecommerce tracking

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

I see, but is the ecommerce tracking code specifik or universal?

Marked as Best Answer.
Solution
Accepted by topic author Fredrik E
March 2017

Missing Ecommerce tracking

Top Contributor
# 10
Top Contributor

You need to add the values to the variables in the ecommerce tracking code dynamically using javascript or server side coding. There are examples at the bottom of the document I linked above.


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