Change document titles afterwards


#1

I set the document title for each individual page using the Piwik tracking code like so: piwikTracker.setDocumentTitle(“This is the title”);

Now, due to some internal changes to the website (and a coding error on my part), some of the document titles were wrong for a brief period of time and now show up like that in Piwik.

Is there a way to use phpMyAdmin or something to fix the messed up document titles so I get clean analytics data? E.g., my page is supposed to be called “A” all the time, but it is tracked as “A” and occasionally “B”. I want to combine the tracked data so they all show up as “A”.

I’m proficient at PHP, but not quite the expert on MySQL. So I’m a bit afraid to fiddle around and eventually ruin all my Piwik data.

Many thanks!


(Matthieu Aubry) #2

Get all ID from piwik_log_action that are from the WRONG names
Get the ID of the right final name

Then UPDATE the table piwik_log_link_visit_action SET the old IDs to the new ID.

Then re-process stats: How to - Analytics Platform - Matomo


#3

It worked! Thank you so much. Great support.


#4

One follow-up question: Would it be safe to delete the now obsolete entries in log_action to save some resources? Or doesn’t it make a difference at all?

[Edit: spelling]