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

Messing Goal stats in Actions #14572

Closed
bobivass opened this issue Jun 25, 2019 · 23 comments
Closed

Messing Goal stats in Actions #14572

bobivass opened this issue Jun 25, 2019 · 23 comments
Labels
worksforme The issue cannot be reproduced and things work as intended.

Comments

@bobivass
Copy link

bobivass commented Jun 25, 2019

Hi,
I have a Goal named "Payable Link Clicked", which is triggered when "Click on a Link to an external website" matches some pattern.
For several days now, in Visitors/Visits log, as well as in Dashboard/Visits in Real-time, this Goal appears on top of the Actions of most of the visitors, with a different (old) date. Check the screenshot, please.
image
As you can see the visitor log is from June 25, 2019, and the first action is "Payable Link Clicked", with the date Nov 23, 2018.
Can anyone help me with this bug?

@tsteur
Copy link
Member

tsteur commented Jun 26, 2019

Are you using the latest version of Matomo? Can you try to convert this goal yourself and see if it shows the correct date afterwards?

@bobivass
Copy link
Author

I'm using the latest version, I think - Matomo version: 3.9.1
What do you mean by "try to convert this goal yourself"?

@tsteur
Copy link
Member

tsteur commented Jun 26, 2019

I meant could you trigger this goal, aka perform the steps needed so this goal is converted and appears in the visitor log. And then check the time. Or is this for all visits?

@bobivass
Copy link
Author

bobivass commented Jun 26, 2019

image

It is for many of the visits. All Actions "Payable Link Clicked" (in red borders) are with the date Nov 25, 2018.
Sometimes there are several Actions "Payable Link Clicked", not just one.

@tsteur
Copy link
Member

tsteur commented Jun 26, 2019

We can't reproduce this here. Are you using any third party plugins (plugins that are not from Matomo, InnoCraft / premium feature)? What timezone is your site set to (you can see in Administration => Sites => Manage)?

We might need access to your database to have an idea how this happens, would that be possible?

@bobivass
Copy link
Author

bobivass commented Jun 26, 2019

No, I'm not using any third party plugins.
TIME ZONE: Bulgaria
Yes, it is possible. What do you need for this, and where to send the info?

@tsteur
Copy link
Member

tsteur commented Jun 26, 2019

You could send us an email with credentials to hello at matomo.org.

@bobivass
Copy link
Author

Credentials just sent.

@tsteur
Copy link
Member

tsteur commented Jun 27, 2019

Tracked values seem to be stored correctly. Might be a server issue or something in our code. @sgiehl do you remember any changes on this recently maybe?

@bobivass did this only start recently? Have you changed anything on the server maybe?

@tsteur
Copy link
Member

tsteur commented Jun 27, 2019

Thanks for your recent email.
There is definitely something wrong see
<serverTimePretty>Nov 26, 2018 18:23:00</serverTimePretty><timestamp>1543256580</timestamp> for a goal,

and <serverTimePretty>Jun 27, 2019 10:40:59</serverTimePretty><timestamp>1561632059</timestamp> for a regular action.

Interestingly there is actually a wrong date tracked for this visit:
image

So maybe it's a problem with the tracking code or so. Do you use the JavaScript tracker @bobivass ? It's a bit funny it works for some, but broken for some others. Do you customise the tracker in any way?

@tsteur
Copy link
Member

tsteur commented Jun 27, 2019

Also have you adjusted any configs in config/config.ini.php? For example to increase the visit time?

@tsteur
Copy link
Member

tsteur commented Jun 27, 2019

FYI: For this visitor the first action time is 2019-06-27 07:40:59 and last action time is 2019-06-27 08:28:55 so seems all normal.

@bobivass
Copy link
Author

bobivass commented Jun 27, 2019

The only thing I added in config/config.ini.php is force_ssl = 1

I'm using JS tracker, but I'm using it since I installed Matomo, and there was no problem. The issue started on June 21, 2019.
Here is the tracking code I have:

<!-- Matomo -->
<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
window.addEventListener('load', function() {
    var u="https://www.mysite.com/st/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://www.mysite.com/st/piwik.js'; s.parentNode.insertBefore(g,s);
  });
</script>
<!-- End Matomo Code -->

@tsteur
Copy link
Member

tsteur commented Jun 27, 2019

In theory recording a token > 1 day would actually require a token so not quite sure how this happens. Do you have multiple servers maybe and one server randomly has a wrong date set?

@bobivass
Copy link
Author

No, just one server.

@tsteur
Copy link
Member

tsteur commented Jun 28, 2019

@Findus23 maybe any thoughts how this could happen? Seems like time() randomly returns a different value which doesn't seem possible. Haven't heard anything like it before so suspecting some server issue as code for these things seems quite straight forward.

@bobivass
Copy link
Author

Not sure if it is related to this issue, but on May 20, 2019, I had a database problem, here is the error message I got:
SQLSTATE[42S02]: Base table or view not found: 1932 Table 'thumbsy_matomo.matomo_log_visit' doesn't exist in engine
This table was corrupted and my hosting support repaired it.

@bobivass
Copy link
Author

bobivass commented Sep 3, 2019

Hi, @tsteur I still have this problem. Any ideas what causes this and how to fix it?

@tsteur
Copy link
Member

tsteur commented Sep 3, 2019

Sorry no idea. I suggest you ask in the forums: https://forum.matomo.org

I searched for 1932 Table doesn't exist in engine and there might be some solutions coming up. Give it a try maybe

@bobivass
Copy link
Author

bobivass commented Sep 4, 2019

@tsteur I have new findings. Please, check this:

image

In the table matomo_log_link_visit_action there are the same idvisit for two completely different dates - 2019-05-26 and 2019-09-04. I hope this will help your team to discover the problem.

@tsteur
Copy link
Member

tsteur commented Sep 4, 2019

thanks for the screenshot @bobivass I've noticed this in the past as well yet cannot explain how this can possibly happen. I'm really at the end of my wisdom here. I'm hoping someone else has an idea

@bobivass
Copy link
Author

bobivass commented Sep 5, 2019

Thank you @tsteur for your efforts, I appreciate them.
Finally, I found the problem and fixed it.
After repairing the matomo_log_visit table, the auto-increment of the idvisit column started from 0. But there are the same idvisit in the table matomo_log_link_visit_action already.
So, I run this sql line:
ALTER TABLE matomo_log_visit AUTO_INCREMENT=N
Where the N is the last value of the idvisit column in matomo_log_link_visit_action.

@tsteur
Copy link
Member

tsteur commented Sep 5, 2019

That explains it. Thanks for letting us know 👍 Would have never thought of this.

@tsteur tsteur closed this as completed Sep 5, 2019
@tsteur tsteur added the worksforme The issue cannot be reproduced and things work as intended. label Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants