• Resolved somtam

    (@somtam)


    We made our site multilingual using WPML. Previously, the domain was .it, and now it’s .com/it/.

    Everything works correctly, and we see both versions in the data, the old one and the new one.
    For example, we have data for /domanda/example, which is now /it/domanda/example.

    This doesn’t happen for a specific custom post “review”.
    The italian structure is /recensione/example, which is now /it/recensione/example.
    The data for the new version /it/recensione/xxx is not recorded.
    The snippet generated by Matomo WordPress is present on these review pages. We also compared it with pages that are regularly tracked, and there are no differences.

    Furthermore, the correct URL is shown in the real-time section, but not in the Behavior / Pages section.

    Do you have any clues to even debug the problem?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Hi @somtam, if the correct URL is showing up in the real time visits section, then that means it’s being tracked and recorded properly, and its the generated reports that are incorrect.

    In the diagnostics page (Matomo Analytics > Diagnostics) can you check if the archiving process has run recently?

    If it has, can you try the following:

    1. Go to Matomo Analytics > Marketplace > Install Plugins and install the “InvalidateReports” plugin.
    2. Go to Matomo Analytics > Settings > Matomo Admin > System > Invalidate Reports and invalidate reports for the time period where the discrepancy is.
    3. Go to Matomo Analytics > Diagnostics > Troubleshooting and click “Archive Reports” or wait for the WP cron tasks to execute.
    4. Check if the URLs in the reports are now correct.

    ?

    Thread Starter somtam

    (@somtam)

    Hello and thank you for you support. I have a couple of doubts.

    How do I check if the archiving process has run recently? Is it in the Cron section?

    And the second doubts is that we activate the Regularly delete old raw data every 180 days. If I follow the procedure you just wrote to me, is there any risk that I will lost some data from 1 jan 2025?

    thank you

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    How do I check if the archiving process has run recently? Is it in the Cron section?

    Yes it’s in the Crons section, look for “Archive”.

    And the second doubts is that we activate the Regularly delete old raw data every 180 days. If I follow the procedure you just wrote to me, is there any risk that I will lost some data from 1 jan 2025?

    Yes that’s possible. You would want to only invalidate data within the last 6 months at most.

    Thread Starter somtam

    (@somtam)

    The Archive section reports “Last started: 2025-10-16 11:14:13 (-26 min 43s). Last ended: 2025-10-16 11:14:13 (-26 min 43s). Interval: hourly”

    Before you wrote me the answer, though, I pressed the Troubleshooting > Archive Reports (sorry!!) without doing the poitns 1 to 3 you wrote me.

    What is really strange in the Pages Report is that with different date range I see different results:

    In the year report I expect to see both /it/recensione/xxxx and /recensione/xxxx just like the other sections that work properly.

    If there is any chance that I am going to loose the reports before the last 6 moths, I can not do that. If I change the settings or disable Regularly delete old raw data, can it help?

    thank you

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    The Archive section reports “Last started: 2025-10-16 11:14:13 (-26 min 43s). Last ended: 2025-10-16 11:14:13 (-26 min 43s). Interval: hourly”

    That looks fine then. The task is running regularly.

    If there is any chance that I am going to loose the reports before the last 6 moths, I can not do that. If I change the settings or disable Regularly delete old raw data, can it help?

    As long as you only invalidate data within the last 6 months, that won’t happen. You can try with the last 3 months and see if it fixes the problem. Changing the setting won’t help since the raw data would already have been deleted. If old data is affected, it will unfortunately be stuck like that.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Although if the invalidating and re-archiving doesn’t work, there might be another solution by running some custom SQL. But it’s more complicated so I’d like to try invalidating first.

    Thread Starter somtam

    (@somtam)

    I have just made a mirror site to make some tests before make them on the production site. Unfortunatelly without success. As you can see from the image below for some day it gets the /it/recensione/… but with some range, even if the day is in that range, it doesn’t.

    We have this staging webiste at your disposal if the support of this plugin can give this kind of service.

    Please let me know, thanks

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @somtam In a date range, that is expected since the old data has the incorrect URL. You would have to invalidate the old dates and regenerate it from old raw data to see the correct URL. If the old URL is in data that’s older than 6 months, then I can write a custom script that will rewrite the URL in existing reports. But I may not have time to do that for a while.

    Thread Starter somtam

    (@somtam)

    Hi, and thank you for your time.

    This are not old data. As you can see the range is october from 9 to 18 and the single day is the october 15. This is why is strange for me.

    It is really important that we fix this problem, so if you want to make me a quote for that it would be nice. Thank you

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @somtam

    This are not old data. As you can see the range is october from 9 to 18 and the single day is the october 15. This is why is strange for me.

    Were you not able to invalidate the last 3 months of data and re-archive? If you are worried about losing data, you can always create a database backup.

    Thread Starter somtam

    (@somtam)

    Yes I am working on a staging website so we can make all the tests with no worries. And I invalidate the last 6 months of data and re-archive, as you explain before, but the problem is still there (see my image above). Thank you.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Ok, the SQL method would be to run the following SQL (replace websitedomain with your website’s real domain):

    UPDATE wp_matomo_log_action
    SET name = REPLACE(name, 'websitedomain.com/domanda/', 'websitedomain.com/it/domanda/'),
    hash = CRC32(REPLACE(name, 'websitedomain.com/domanda/', 'websitedomain.com/it/domanda/'));

    with every prefix used for Italian pages (note the domanda ). After that’s done, you need to invalidate data and re-archive for the reports to regenerate with the new URLs.

    Can you try this on your staging website?

    Thread Starter somtam

    (@somtam)

    Hello, I execute the SQL and I get the message “324 rows affected. (Query took 0.1173 seconds.)”.

    I invalidated the 6 months report and did it again.

    Then in Behaviour > Pages I requested the report for the url “scarponi-dynafit-ridge-pro” using the same range as before. I get the same result. For the range 9 to 18 october I get no results. For the day 15 october I get the results. Exachtly as the image above.

    Thanks

    • This reply was modified 9 months, 3 weeks ago by somtam.
    • This reply was modified 9 months, 3 weeks ago by somtam.
    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    @somtam can you check for entries LIKE '%websitedomain.com/domanda/%' in the wp_matomo_log_action table? Are there any still there?

    Thread Starter somtam

    (@somtam)

    Here the results without the /it/:

    Showing rows 0 – 8 (9 total, Query took 0.0133 seconds.)
    SELECT * FROM wp_matomo_log_action WHERE name LIKE ‘%mountainreview.com/recensione%’

    And here the results with the /it/:

    Showing rows 0 – 24 (1157 total, Query took 0.0053 seconds.)
    SELECT * FROM wp_matomo_log_action WHERE name LIKE ‘%mountainreview.com/it/recensione%’

    thank you

Viewing 15 replies - 1 through 15 (of 19 total)

The topic ‘Domain change and custom post tracking’ is closed to new replies.