Map existing data for campaigns from ids to names


we are gathering data since some months in Matomo now, and got the problem that campaigns from Google Ads just ended up being some ids/numbers. We now managed to map the ids to names, but of course only future data will be mapped. Is there a way to map these existings number-entries to name-entries somehow? Perhaps by accessing the database directly?


Yes, you could do it within the database, but with the risk of doing something wrong. Ideally you could hire someone but it will probably cost you more than it will bring you.
So better to use a segment for your analysis by using an OR condition.

Thanks for your reply! In the meantime I found the column campaign_name in the table matomo_log_visit which seems to store this data, so I would just replace this and then re-process all reports.

I was wondering why there is a column campaign_id as well. Would it give some advantages or disadvantages when storing the campaign-id there? So I’m thinking of something like:

UPDATE matomo_log_visit SET campaign_id = campaign_name, campaign_name = “My Campaign Name” WHERE campaign_name = “12345678”;