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

Goal Tracking Broken Since 2.15.0-b1 update #8622

Closed
ericimprint opened this issue Aug 21, 2015 · 22 comments
Closed

Goal Tracking Broken Since 2.15.0-b1 update #8622

ericimprint opened this issue Aug 21, 2015 · 22 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@ericimprint
Copy link

I have a basic regex goal of thanks4quote|/confirm/quote. Since upgrading to 2.15.0-b1 it has stopped working. The page visits are showing up in the log, but the goal is not being marked. This is still not fixed on b2 either.

@mattab
Copy link
Member

mattab commented Aug 26, 2015

Hi @ericimprint, thanks for the report!
We will investigate before 2.15.0 stable.

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Aug 26, 2015
@mattab mattab added this to the 2.15.0 milestone Aug 26, 2015
@ericimprint
Copy link
Author

FYI, still not working in beta 3.

@tsteur
Copy link
Member

tsteur commented Aug 29, 2015

I tried to reproduce different patterns including a similar one than yours and it worked fine for me. I also debugged it and it should work. From the looks there were also no changes in the GoalManager class recently. From which version did you update?

The only thing that I noticed that could be potentially a problem is the character & as it seems to be replaced by an entity before the regexp is checked: http://apache.piwik/index.php?module=CoreHome&action=index&idSite=1&period=day&date=2015-08-29#/module=Goals&action=goalReport&idSite=1&period=day&date=2015-08-29&idGoal=6

image

Just to be sure we are talking about URLs and the "matches the expression" check?

@ericimprint
Copy link
Author

I upgraded from 2.14.3 and it didn't work for any of the 15 betas.
goalerror

@ericimprint
Copy link
Author

I tested this a little more and added the goal again under a new name and added a simple page visit goal. Neither are working, but I did notice visitor.visitConverted flag is getting triggered in the live visitor log for visits that trigger the goal.
The other interesting thing is the goal overall conversion rate graph is working, but not the reported number or the conversion rate for each individual goal in the goal widget of the dashboard.
goalerror2

@tsteur
Copy link
Member

tsteur commented Sep 1, 2015

I just tried to reproduce with allow multiple conversions but still works for me.

Can you maybe change the file core/Db/Adapter/Pdo/Mysql.php in line 79 (https://github.com/piwik/piwik/blob/master/core/Db/Adapter/Pdo/Mysql.php#L79) and comment it? Meaning putting // in front of $this->_connection->exec: // $this->_connection->exec and try again?

@tsteur
Copy link
Member

tsteur commented Sep 1, 2015

Otherwise maybe try to enable logging for the tracker: http://developer.piwik.org/api-reference/tracking-api#debugging-the-tracker in case you're familiar with the browser's developer console tool

@ericimprint
Copy link
Author

Can you maybe change the file core/Db/Adapter/Pdo/Mysql.php in line 79 (https://github.com/piwik/piwik/blob/master/core/Db/Adapter/Pdo/Mysql.php#L79) and comment it? Meaning putting // in front of $this->_connection->exec: // $this->_connection->exec and try again?

That made no change.

I turned on debugging and everything is getting passed to piwik correctly. The visits and pages are being logged and marked as a converted goal according to visitor.visitConverted.

I also turned off all 3rd party plugins and that made no difference.

@tsteur
Copy link
Member

tsteur commented Sep 2, 2015

Maybe someone else can have a look and try to reproduce? Not sure what to do here.

Is it maybe possible that we get access to your Piwik instance and server? That would be helpful. If so, please send us an email to "hello at piwik.org" and comment here in case it goes to the spam folder.

@ericimprint
Copy link
Author

I did a fresh install of a new testing system. Running 2.14.3 it converted a goal just fine. I upgraded it to beta 4 and the goals stopped converting as above. I emailed the access info for the new testing site to hello. The email came from Eric.

@ericimprint
Copy link
Author

This is not fixed with beta 5. Did you get my email with my testing site info?

@tsteur
Copy link
Member

tsteur commented Sep 9, 2015

Sorry! I got your email but didn't have time yet, will have a look now

@tsteur
Copy link
Member

tsteur commented Sep 10, 2015

Thanks a lot! This helped us to find a bug that would have hit many users over time. I'm getting the following error:

Fatal error: Unsupported operand types in core/Tracker/GoalManager.php on line 236 https://github.com/piwik/piwik/blob/2.15.0-b6/core/Tracker/GoalManager.php#L236

The CustomVariables plugin is disabled on that system (I checked) and that's why it is failing I believe. This is due to core having knowledge about plugins in https://github.com/piwik/piwik/blob/2.15.0-b6/core/Tracker/GoalManager.php#L227 . Ideally we would remove that knowledge from core but that's probably quite a bit of work and needs some refactoring.

I tried to add a simple check if (empty($visitCustomVariables)) { $visitCustomVariables = array(); } but couldn't verify as the PHP files seem to be cached and a server restart is possibly required (or an opcache clearance)

@ericimprint There's a chance that it works after refreshing the webserver.

@diosmosis do you mind having a look at it? Maybe there are more such similar issues re $request->getMetadata()?

@diosmosis
Copy link
Member

@tsteur created a pull request here: #8751

I looked at all uses of Tracker\Request::getMetadata() this is the only one that assumes the value isn't empty(), everything else defaults the value or checks if it's !empty() before using it.

@ericimprint
Copy link
Author

#8751 Does not seem to fix this on my site (test or live) when applied to beta 6. I manually made the edit to core/Tracker/GoalManager.php and restarted Apache, I know this change is not included in the beta yet.

@diosmosis
Copy link
Member

Reopening since OP reports it's not fixed for him

@diosmosis diosmosis reopened this Sep 11, 2015
@mattab
Copy link
Member

mattab commented Sep 11, 2015

this change didn't make it in beta6, it was merged after. it will be in beta7. @ericimprint please re-open if it won't be fixed in beta7

@mattab mattab closed this as completed Sep 11, 2015
@ericimprint
Copy link
Author

Beta 7 fixed it. Thanks. Not sure why the manual change didn't, but doesn't really matter. Is there anyway to reprocess the visitor data to get the lost goal data back?

@mattab
Copy link
Member

mattab commented Sep 11, 2015

Is there anyway to reprocess the visitor data to get the lost goal data back?

unfortunately we don't have this capability yet

@ericimprint
Copy link
Author

unfortunately we don't have this capability yet

Bummer.

There is still an error on the dashboard widget. It is showing a graph for the conversion rate, but listing it as a 0%.
goalerror3

It is listing it correctly on the goals page/tab.
goalerror4

@mattab
Copy link
Member

mattab commented Sep 11, 2015

@ericimprint could you try remove widget and re-add it to dashboard, maybe this fixes it?

@ericimprint
Copy link
Author

@ericimprint could you try remove widget and re-add it to dashboard, maybe this fixes it?

That did the trick. All good. Thanks for your help.

@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Oct 13, 2015
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. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

No branches or pull requests

4 participants