Paypal Orders Not Recorded By Analytics

My google tracking code is on the Order confirmation page. Paypal orders are not being recorded to the Ecommerce results( all the credit card orders are recorded) I think the Paypal customers may not be returned to the confirmation page. Is this possible? I called Paypal and they say that it is controlled by the program and the developer controls this.

Any help appreciated.

Notlim

I do not know why, but the module does not send ecommerce data if the order status was changed in the store-front (after the order is paid). The condition was added in the latest CS-Cart versions only

app\addons\google_analytics\func.php

if (Registry::get('addons.google_analytics.track_ecommerce') == 'N' || AREA != 'A') {

Thanks ECom- It appears from looking at the logs that all of the order statuses are changed after the order is paid. PayPal or credit card. I can't tell where it occurred.

The question is can this be changed so that I get full coverage in analytics?

Thanks

Notlim

Thanks ECom- It appears from looking at the logs that all of the order statuses are changed after the order is paid. PayPal or credit card. I can't tell where it occurred.

The question is can this be changed so that I get full coverage in analytics?

Thanks

Notlim

Notlim,

Try this solution:

Open /app/addons/google_analytics/func.php and change this line:

if (Registry::get('addons.google_analytics.track_ecommerce') == 'N' || AREA != 'A') {

to this one:

if (Registry::get('addons.google_analytics.track_ecommerce') == 'N') {

Please let me know the result.

imac, why was this condition added in the latest versions?

thanks imac- the code now reads:

function fn_google_analytics_change_order_status($status_to, $status_from, $order_info)

{
	if (Registry::get('addons.google_analytics.track_ecommerce') == 'N') {
		return false;
Do I change this to  your suggestion?

notlim

Do I change this to your suggestion?

Yes, you made correct changes. Wait for 1 day and check if the data received correctly. Please keep us updated.

I was also looking for this solution for a long time! Could you please give the changes to be made for V 2.1.3?

Cheers

Thanks eCom. I didn't make the change yet. Just wanted to confirm. I'll do it and see what happens when I get the next order with a Paypal Credit Card.

Notlim

Ok,eCom. I made the change and I see that Google Analytics recorded an order that was paid with a Paypal account. However where all other orders had a "processed" code, the new one has an "open" code and the customer receives an email that they will be notified when the order is approved. How can I correct that to be sure the customer of Paypal receives the same message as all the others?

Thank you

Notlim

Ok,eCom. I made the change and I see that Google Analytics recorded an order that was paid with a Paypal account. However where all other orders had a "processed" code, the new one has an "open" code and the customer receives an email that they will be notified when the order is approved. How can I correct that to be sure the customer of Paypal receives the same message as all the others?

Thank you

Notlim

Unfortunately I am not sure about a reason of this issue. Possibly IPN response was not received from PayPal for some reason. Therefore system set Open status instead of the Incomplete one when the customer was redirected back to your website

ok. Google Analytics is now recording my sales with Paypal credit cards.

HOWEVER- These orders are coming to my site with order statuses like "open" and "incompleted" . I get notices emailed from Paypal

that these orders are processed and ok to ship. Checking the logs, i can see this happening. Can you tell me how to correct this?

Thanks

Notlim