New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom variables not always set in the conversion when using tracking API #2564
Comments
Also: http://node.gordo4.com/snaps/a327819fb2d14ffb093e169c1b4f69f4.png I'm assuming Other, are all of the IE versions and Opera and such. Not sure why those are all meshing into Other when they have more keywords and all of the Firefox variations are shown independently, but that's beside the point of this ticket. |
Thanks for the report. As you can see on the demo it is working fine at least for us. You are right that Piwik doesn't process conversion rates per browser. We process it for Countries/Custom vars/Websites/Keywords/etc. but not all user attributes (for performance reasons). Using Custom vars is therefore a good idea if you wish to achieve this. The sub tables are limited to 50 by default (see faq). you can change this to a bigger value by overriding datatable_archiving_maximum_rows_subtable_referers in your config.ini.php (which also happens to affect custom vars subtable, not only referer - yes this is confusing ;) log_conversion custom vars are normally copied from the log_visit table indeed. Would you be able to submit a small code using php tracking api, that would help reproduce the problem? thanks |
On our landing page I'm calling the following to set the browser version into a custom var:
At the top of our process_order function I'm calling:
Before we attempt to process the order I run the following so we can track abandoned carts" (due to things such as CC error, etc) Basically our process_order only gets ran when the user submits our registration form. Sometimes we lose orders for various reasons, such as duplicate email, invalid CC, etc...
Then after we actually process the card successfully we redirect to a receipt page, right before that happens I run the following:
There are more examples, such as duplicate order, how we log the CC_Errors, etc... but those don't apply to this ticket and all appear to work properly. Like I said before, the custom vars are tracking properly, but they aren't updating into the conversions table. Do I need to re-set those variables again on the conversion? I would assume the values would be copied out of the visits table upon conversion... |
Any advice? |
gordo, it would really help if you were able to produce a script that reproduces the issue on a fresh piwik install. Are you able to test a simple version of your script that will show the issue? we hope to fix this bug for Piwik 1.6 for sure, your help is greatly appreciated. thanks! |
When I get a free moment I'll setup Piwik on one of my other domains and see if I can replicate the issue and will provide access if need be. |
gordo, do you have an update on the issue? would be great to get this bug fixed in next release :) thanks |
Thanks for the report. I could replicate the bug. This is because the custom variables, during a conversion, are read from the first party cookie supposedly passed to the request. We could change the code to read custom variables from the visit and set them in the conversion, but this would add overhead for all requests. Therefore in this case we won't fix (for now, might re-consider later), and to work around this limitation please set the custom variables again before making the purchase / conversion. |
Well it's not a wontfix, since I now confirm that it should be copied into conversions, sorry for the comment above ;) |
(In [5251]) Fixes #2564 - now copying custom variables from the visit when custom variables not passed in the Goal conversion (or ecommerce) tracking request (eg. when request comes from a script in the backoffice) |
Milestone 1.8.x Piwik 1.8.x deleted |
I checked the database and have confirmed that custom vars are not being set in the log_conversion table but are being set in log_visit.
I'm using the PHP API instead of Javascript if that helps narrow things down at all.. I haven't dug into the core code much at all, so I'm not sure really how the log_conversion custom vars are being added/updated.
I have tried using both visit and page scoped vars as well...
My code goes something like this:
Maybe there's a better way to track goal conversion rates by browser version?
Google Analytics does this, so I assumed Piwik would, but I'm not finding any way to do this and found this issue w/ custom vars. We'd like to use custom vars to segment our split-test variations as well, and if they aren't tracking conversions at all then Piwik is useless for us.
http://node.gordo4.com/snaps/5ede0a39df3b8354dc5d70af8f2d24a6.png
vs
http://node.gordo4.com/snaps/b2d5c80eb56ceefd9e4fc1a9a09c95de.png
This is a fresh install of 1.5.1, not an upgrade, so I'm at a loss here as to why it's not working. We get a boatload of traffic, so I'm using a cron to do the archiving. The only thing I've changed was added memory_limit 4G to the PHP commands in the cron script.
Keywords: ecommerce, browser, goal, tracking, database
The text was updated successfully, but these errors were encountered: