3

Orders not tracked in Google analytics, otherwise the number of visitors is tracked. Note that:

  1. E-commerce enabled in ga account
  2. Google API enabled + tracking code in place
  3. I tried to implement js tracking code manually in success page as following https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#example
  4. I'm testing with checkmo method in order to get native Magento behaviour but nothing works

Am I missing something? any ideas how to solve this problem?

  • have you clear Magento Cache After adding Tracking Code in backend.? – Keyul Shah May 7 '15 at 6:56
  • First thing to check is your checkout success page. If the code is there and has order values, verify it for correctness against Google documentation. – Melvyn May 7 '15 at 7:16
  • 1
    cache was cleared , the thing that I don't see the js code generated by the block ga.php ( _AddTrans , etc ...) in success page , it seems not generated or returned empty , except the common ga tracking code – Sabri Zouari May 7 '15 at 8:00
2

Got it , it was a conflict with payment method module (klarna 5.2) which override block/ga.php. just some xml configuration solve the problem or upgrade to klarna 5.3. Now it's working!

  • Here we have the same problem with Klarna 5.3.1. Can you share the xml configuration changes that solves the issue. Thanks in advance. – Zinat Nov 27 '15 at 8:01
  • Sorry for the delay '<default> - <reference name="google_analytics"> + <reference name="head"> + <action method="unsetChild"> <name>google_analytics</name> </action> <block type="klarna/klarnacheckout_ga" name="google_analytics" as="google_analytics" template="googleanalytics/ga.phtml" /> </reference> </default>' - line to be removed – Sabri Zouari Dec 2 '15 at 15:24
  • Thanks Sabri. So you mean I should find above mentioned tags in klarna xml file and remove it. But there is no such tags? – Zinat Dec 3 '15 at 15:53
  • Actually as I mentioned earlier, all my projects are using 5.2 version so maybe they changed the xml structure in 5.3 ! it could be ... anyway, do we talk about the same file ? app/design/frontend/base/default/layout/vaimo_klarna.xml – Sabri Zouari Dec 4 '15 at 8:30
  • Thanks Sabri, I was looking in another xml. Can I just remove <default> <reference name="google_analytics"> <block type="klarna/klarnacheckout_ga" name="google_analytics" as="google_analytics" template="googleanalytics/ga.phtml" /> </reference> </default> ? – Zinat Dec 7 '15 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.