Google Analytics ecommerce only tracking Paypal - magento

I'm having an issue with Google Analytics ecommerce tracking. I've found numerous posts about this, but none of the fixes seem to apply. We're on Magento 1.5.0.1, so all the GA code should be built in. We also installed the Fooman GA+ module, but that didn't help this issue. The tracking code IS showing up on the success page when viewing the page source, but it doesn't look right...no items listed. If I view the list of transactions in GA, it seems that they are all the Paypal transactions but credit card or money order transactions aren't coming through. We use Website Payments Pro for our Credit Card transactions, so ultimately it's all going through Paypal anyhow.
I did some digging around in the code and it seems that the "_getOrdersTrackingCode" function in Ga.php is where the problem lies. I added some logging...
$orderIds = $this->getOrderIds();
Mage::Log($orderIds);
...and found that the majority of the time, $orderIds is empty. Sometimes it isn't and that is when the tracking code works.
What's going on here? Anyone know?

I have fixed the problem. We use a 3rd party extension for checkout and it needed to be updated for 1.5.0.1 compatibility. The dispatcher of the *checkout_onepage_controller_success_action* event needs to send an array of the order ids as well. This wasn't necessary in 1.4.2.0. I updated the extension and it's working great now! I hope this helps anyone else with a similar issue.

Please note that this is an ORDER COMPLETE / SUCCESS event. You can't see the rendered code until you've completed a (test) transaction. On the order confirmation page, hit view source. In your <script /> tag's you'll see some new push code if all goes well.
Yes, Brian, your code definitely lead us in the right direction. We ended up turning the PayPal checkout to test mode = yes, debug mode = yes. We're on 1.4.2. and this worked fine. Respond to this if you need help. If I'm alive, I will try to get back to you.

Related

Paypal donations with summary in Joomla

I'm working on a joomla site for a charity event. The event has 5 causes to donate for each with its own page. I have created paypal donation buttons for each of the five causes using this site: https://www.paypal.com/cgi-bin/webscr?cmd=_donate-intro-outside. That all works fine but I need to accomplish two more things. 1) How do I display a summary of the donations for each cause on its respective page and 2) How do I display a total donations received across all 5 causes on the home page?
I am currently going into the paypal account and updating these values manually every night. I know there has to be a better way. I think I have to do something with IPN but I can't find any good documentation. I'm not a php programmer so I need some hand holding but I can get through it with some help.
I have searched high and low for a Joomla extension to do this but I just can't seem to find anything that fits my situation. Any help would be appreciated.
Thanks!
I don't think you'll be able to pull this off without some PHP programming and a good integration with Joomla.
As a general overview you will have to:
activate and configure IPN (Instant Payment Notifications) in PayPal
for your buttons configure the notify_url (the URL where PayPal should send the IPN)
on the Joomla site you will have to process those notifications and save into a database the transaction information that you get
finally - on each of your pages you will have to do a database look up and compute the totals that you require.
I have used Jumi (Joomla extension) to implement something similar to what you need, but it does require a lot of PHP programming to do it like this.

Magento Duplicate Orders

I have a Magento site using version 1.6.2.0 with which I'm experiencing problems with duplicate orders.
Having researched the subject I have found mostly forum threads explaining that 1.4.x had problems with duplicate orders and the solutions mentioned (even those on SO which I have found) merely suggest the user updates Magento to >1.4.
I have also found a proposed solution here but am reluctant to delete observers which will prevent downloadable purchases working.
I've also spotted the Array Of Death fix mentioned a few times (e.g. here) but this problem isn't present in 1.6.x, Zend appears to have resolved it.
There are a couple of Javascript hacks suggested whereby the Confirm Order button is hidden upon submission but Magento 1.6.x already does this.
I have increased the payment gateway timeout configuration variable to 120 seconds and am as yet to see if it yields results. I can't test it as the problem is intermittent (and probably therefore caused by communication or lack thereof between the payment gateway and Magento).
I am using Sagepay as the payment gateway.
How might I further debug this?
The link you posted is correct, but I wouldn't use their fix, I would just disable the Mage_Rss module.
Mage_Rss has several observers in it that call Mage::app()->cleanCache(...) in the checkout process, which is extremely expensive if your installation is using the default filesystem cache and it's gotten large.
I found the best thing for troubleshooting Magento performance problems is to wire up Xhgui and do some profiling. Reading call stacks will help your understanding of Magento immensely also.
Oh, and I don't know if this is true for Sagepay, but I went and fixed this problem completely for PayflowPro by rewriting the method that generates transaction IDs to use the quoteID instead of generating unique IDs on every invocation. I started down the path of committing this back, but I'm on 1.4.2 still and don't have time to test in later versions and it's a pretty significant rewrite. Guess I could just put it out there for someone else to run pass Moses...

How does the Magento backend sales quote work?

In general, I'm looking for a tutorial or walkthrough of how the payment system works in magento. Specifically, I'm interested in the process of creating an order from the admin backend. I have a customer credit extension that isn't working properly when creating an order from the admin backend. I've tried tracing through the code and there's SO much going I can't make heads or tails of it. There's the quote, then the addresses, which have totals associated with them, etc, etc...it's all very confusing. I know this is a bit of an open ended question, but if anyone has any good resources on exactly what does what and how it all works that would REALLY help.
Thanks!
Hopefully this tutorial can give you some basic idea:
http://inchoo.net/ecommerce/magento/magento-quote-order-invoice-workflow/

Google in-page analytics doesn't work in my ASP.NET MVC 3 Razor website

We've recently launched a new website http://atlascode.com and since the launch I've been unable to get in-page analytics working on the website. Google also claims that my tracking code is not working but I think this is a misnomer.
Whenever I attempt to load in-page analytics I receive the error:
We've identified problems in your setup. These may cause problems loading In-Page Analytics.
Your site doesn't load ga.js from Google.
If you host the Google tracking code on your own servers, it isn't updated automatically and can miss important changes.
We didn't find a tracking snippet on your site. In-Page Analytics cannot load. Please make sure you have tracking installed correctly. If your snippet is included in a separate JavaScript file, you'll have to manually check it is being loaded correctly.
-ENDS-
I've simply copy and pasted the tracking code on to the website and haven't done anything out of the ordinary. I've also checked to make sure that under Web Property Settings my Web property name and default URL is atlascode.com.
Any ideas you guys have really would be welcomed.
EDIT: Added screenshot of Google Analytics error http://min.us/mdqlrhj
Thanks in advance
Simon
Well there's whole buncha people in the web complaining about the same issue.
I've noticed something funny.
Most of developers love to exclude Analytics tracking code for logged in administrators and trying to check out In-Page Analytics while they're logged in. So there's really no any ga.js.
In my experience, this occurred when I hadn't set my default URL to exactly match the URL set in the profile.
Matt
P.S. Someone beat me to your source!
Got the same problem on Magento Enterprise, but solution was pretty simple: GA code just need to be placed before <head> tags. After this simple fix In-Page tracking works perfectly.
Update
Also, be sure you have no framekiller installed in your site.

Magento & Google Checkout & Track Conversions

I'm running an online store on Magento. I have Google Checkout as a Payment method. The problem is if someone pays using it they don't always return to the site so it throws my Google Analytics conversion rates off. Is there a way to pass this information to analytics when the people don't return to the site after the transaction?
Magento has built-in support for sending data about Google Checkout process to Google Analytics. Implementation of this functionality is done according to
http://code.google.com/intl/ru/apis/checkout/developer/checkout_analytics_integration.html
You should see all the data (e.g. pages visited) and conversions from GC normally. The customer is not required to return to your shop.
Step1: no GC conversions in GA
Allow up to 24h delay before the conversion data will appear in GA.
Step 2: After 24h you still don't see GC conversions in GA
Make sure you've enabled Google Analytics in Magento and setup it properly, because GC module in Magento sends data to GA only if it's activated and working fine.
Step 3: If steps 1-2 are done, everything works and GA is activated, but GC conversions still not visible in GA
Make sure that your design theme includes all necessary GC & GA code as made in base/default scheme. You can temporarily enable default/modern theme to check that original core Magento code works fine and then check the differences between your design theme and Magento core theme
Step 4: you've done steps 1-2-3, but no conversions are present in GA
Hire a Magento professional to find the source of a problem. In such a case this problem cannot be solved remotely.
The only data that comes back from Paypal after the customer has paid would be the IPN callback that notifies Magento of the payment. If you wanted to hook into this, you would need to find a direct URL to notify GA of the conversion and to periodically monitor the database for IPN notifications so that you could invoke that URL.

Resources