How to get the first visit time of a unique visitor?

I use matomo on-premise, And recently I found a problem. There are some visitor that do not have their first visit data in table matomo_log_vist. all of their visit data show that visitor_returning = 1.
I want to know what’s the reason,and how to fix it?
Here is the example:

Hi @wenjuan_xie
Didn’t you delete some hits, thanks to GDPR tool or with raw log auto cleaning?

GDPR tool

Raw log auto cleaning

Hi @heurteph-ei
I confirm that I have not deleted any historical Matomo data and didn’t make any change with GDPR tool.
Are there any other possible reasons for this result?

Can you check if the visitor has a user ID, and if so, can you check this user ID is not associated with another visitor?
On your last request screenshot, can you include also the visitor_count_visit column?

I never set User ID, just use visitorid

Very strange indeed: the first visit of 00074ebec9063ee1 doesn’t appear…
It has been deleted, and I don’t see other reason than:

  • Manual deletion in the DB
  • Manual deletion through GDPR tool
  • Manual / auto deletion via Matomo DB cleaning

Here are the settings of my matomo.

is there other settings that will lead to data deletion?

Hi @wenjuan_xie
I don’t see any other UI way to delete data.
But data could also be deleted by direct SQL query.
I am not sure if a console job could also delete some, but I don’t think this is the case in your issue…
Maybe @innocraft can lead you to the source of problem?

Deleting directly with a SQL query is fraught: you can delete too much or not enough, causing unexpected effects.

So as @heurteph-ei suggested, whenever possible, delete user visits with the tools in the Matomo interface. It might not help with this exact question @wenjuan_xie but it is adjacent to your issue. Caveat: It will delete all of the visits for the matching user(s).

Matomo >> :gear: >> Privacy >> GDPR Tools

1 Like

However, for folks willing to directly alter the database, it will be useful to know the schema and some examples of similar syntax:

1 Like