Skip to content
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

wrong ecommerce conversion calculation in custom variables report #5828

Closed
ryrun opened this issue Jul 14, 2014 · 12 comments
Closed

wrong ecommerce conversion calculation in custom variables report #5828

ryrun opened this issue Jul 14, 2014 · 12 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@ryrun
Copy link

ryrun commented Jul 14, 2014

The custom variables report in the ecommerce tab show always 0 orders, which is wrong. We are tracking users with custom variables all the time and ecomemrce orders itself are correctly tracked. Only the custom variables report seems to be broken.

@mattab mattab added the Bug label Aug 3, 2014
@mattab mattab added this to the Short term milestone Aug 3, 2014
@mattab
Copy link
Member

mattab commented Apr 7, 2015

Hi @ryrun thanks for the report.

@mattab mattab modified the milestones: Piwik 2.13.0, Short term Apr 7, 2015
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Apr 7, 2015
@diosmosis
Copy link
Member

Hi @ryrun, I'm unable to reproduce this problem, if you still experience the bug, can you post a screenshot of the custom variables report w/ ecommerce orders being 0, and a screenshot your ecommerce log showing some ecommerce orders w/ custom variables?

@ryrun
Copy link
Author

ryrun commented Apr 17, 2015

Ok, but i need some time. I'll recheck this issue next week.

@mattab
Copy link
Member

mattab commented Apr 22, 2015

Hi @ryrun can you please post a screenshot with 2.12.1 showing the issue? it looks like it works in 2.12.1

@mattab mattab closed this as completed Apr 22, 2015
@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Apr 22, 2015
@ryrun
Copy link
Author

ryrun commented Apr 22, 2015

So, the problem is still there. The custom variables report in ecommerce tab still show just 0.
We are using following tracking code for ecommerce tracking:

var pkBaseURL = (("https:" == document.location.protocol) ? "https://***/" : "http://***/");
    try {
        var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", ***);
                piwikTracker.setCustomVariable(1, "CustomerStatus", "Bestandskunde", "page");
                piwikTracker.addEcommerceItem("***", "***", "***", 99.99, 1);
        piwikTracker.trackEcommerceOrder("***", 99.99, 99.99, 99.99, 99.99, 0.0);
        piwikTracker.trackPageView();
        piwikTracker.enableLinkTracking();
    } catch (err) {
    }

Maybe our tracking is wrong? It works atleast for normal ecommerce tracking. Please note, that i've changed the values.

Screenshot from Test website:
testscreencustomecm

@mattab mattab reopened this Apr 22, 2015
@mattab
Copy link
Member

mattab commented Apr 22, 2015

Thanks for the feedback @ryrun

In

            piwikTracker.setCustomVariable(1, "CustomerStatus", "Bestandskunde", "page");

replace page by visit - this should solve the problem for you. By design Piwik will copy in the Ecommerce conversion / Goal conversion those custom variables that have the scope visit - we should document this somewhere so I'll leave issue opened until I document it

(edit: i'm not 100% sure this will fix your issue - so let me know if not!)

@mattab mattab self-assigned this Apr 22, 2015
@mattab mattab modified the milestones: Piwik 2.14.0, Piwik 2.13.0 Apr 22, 2015
@ryrun
Copy link
Author

ryrun commented May 11, 2015

Hi @mattab i've changed the tracking code, i'll will post some updates soon.

@ryrun
Copy link
Author

ryrun commented May 14, 2015

@mattab Problem is fixed for me. visit works fine for me.

@mattab
Copy link
Member

mattab commented May 15, 2015

Good to know. I've updated the user guide at: https://piwik.org/docs/custom-variables/#tracking-a-custom-variable

If you measure Goals or use Ecommerce Analytics, note that when the conversion occurs Piwik will copy any custom variables of scope "visit" in the Conversion. You can then view Conversion rates by Goal (and Ecommerce conversion rate) for each of your "visit" scope custom variables.

@mattab mattab closed this as completed May 15, 2015
@fnagel
Copy link

fnagel commented Jun 9, 2015

@mattab

A question for understanding: We track a custom variable "language" of scope "page" as the user is able to change the language. Which will not work for eCommerce segements view. This leaves two options: change the custom variable to scope "visit" or wait for #3950 and use that as segment instead of our custom variable. Any other options?

@mattab
Copy link
Member

mattab commented Jun 10, 2015

@fnagel correct. don't think there are other option. hopefully we can do #3950 sooner rather than later

@fnagel
Copy link

fnagel commented Jun 10, 2015

@mattab Thanks for the fast response. Very appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

4 participants