Piwik Plugin for VM 2; Abadonned cart is using server IP instead of Customer IP

Started by kratzi, November 11, 2013, 21:14:33 PM

Previous topic - Next topic

kratzi

Hi I have installed the Piwik Plugin for VM 2. The plugin works quite well however it has a little issue. When customers put products into the cart the piwik plugin takes the ip from the server where VM2 is installed on. It would be however correct to get the ip from the customer which added the product.

I have asked my question also in the Piwik Forum - Please check: http://forum.piwik.org/read.php?2,107233

The problem is if you sell to different countries abadonned carts will be always from your home country and it seems as customers from other countries always have a conversion rate of 100%.

Please check the attached image. It shows the plugin copies infos from the customer like Browser, Operating System however not the IP so it always takes the Server IP -> You have all abadonned carts from your server country

I appreciate your help in this case.

Regards

kratzi

VM 2.0.18a
Joomla 2.5.9

[attachment cleanup by admin]

alatak

Hello
I am trying to understand myself what is going on.
I did a test, and i do not have exactly the same as you.
I am running piwik 1.12
What i have is the following:
In the Visitors Real Time:
- the IP address and all the clients infos are correct for the logged visit
- but for the abandonned cart: just like you , the IP address is not the correct one, BUT the clients infos are correct (the flag is France, chrome, mac)

i checked the code. The PiwikTracker construct does have $this->ip = @$_SERVER['REMOTE_ADDR'];
So at the moment i dod not see where the problem comes from.


[attachment cleanup by admin]

kratzi

Hello Alatak,

Thank you so much for your answer. You don't know how important this is for us.

I am also running Piwik 1.12. And for my understanding you have exact the same mistake as I have.

When you check my picture in the first post the logged visitor came from Denmark has IE and Windows. That info is all correct. Our server is in Germany. Also the abadonned cart is the same as yours. IE and Windows is copied.

I think you received the flag of France because your Server is in France and not because your visitor had the French flag.

I would say that the flag is generated with help of the IP and not with the help of visitor info.

I guess if we change $this->ip = @$_SERVER['REMOTE_ADDR']; to something like $this->ip = CUSTOMER-IP; Piwik will also take the right info.

Regards

kratzi

alatak

Hello
QuoteI think you received the flag of France because your Server is in France
No, my server is not in France.
I have to set up a new test environment, to check why we have  the issue exactly.

kratzi

Hello,

ok then it is really different. Because I receive always the German flag.

I would appreciate a lot if you could find the time to where the issue comes form.

Regards

alatak

Hello
Can you try this version ?
If the problem is fixed, i will upload it to the extensions.virtuemart.net


[attachment cleanup by admin]

kratzi

Hello alatak,

I have tried it and it nearly works perfect. The only issue now is that if the user uses Microsoft IE then the abadonded cart is displayed together with the other logs of the customer together. If the user uses f.e. Firefox or Opera Piwik creates a new visitor for the abadonded cart.

Please check the attached picture.

I think that the way you see with Internet Explorer is the way it should be. It would be great you could correct this little issue. Everthing else works perfectly.

Regards

[attachment cleanup by admin]

alatak

Hello
Thanks for testing.
Strange that problem,I will have a look. But the only data i send is the IP
and i do not see how i can give that info to Piwik
http://docs.piwik.org/PiwikTracker/files/PiwikTracker.html#\PiwikTracker

I will check more anyway

kratzi

Hello alatak,

thank you for testing. I have contacted the Piwik forum and a core member said adding products should be done in the Java Script code (in view template) and not server based with PHP.

Maybe this information helps you a bit.

Regards

kratzi

alatak


kratzi


alatak

Hello
ok, i have change all the product, addtocart tracking.
Can you test it?
with this version you can remove the JavaScript Tracking Code in your template. The plugin inserts it.

[attachment cleanup by admin]

kratzi

Hello,

does it work fine for you??

Actually it seems that all abandonned carts are recorded correct.

It my case however I always get two trackings. And as you said I have deleted the Piwik tracking code from my site.

What I also saw from the beginnging is that products in abandonned cart are recorded with the price 1. It seems that all products just cost 1 €, DKK whatever. Also there is some kind of "test" value in abandonned cart.

Please check the picture for reference.

Regards

kratzi


[attachment cleanup by admin]

alatak

Hello
It is more difficult for me to test, because i am testing locally, and i am the only user.
But i will do a test on a remote server.
Thank you for your feedback

kratzi

If you like I could create a Piwik copy for you and give you ftp access. So you could have more visitors.

Regards