Assign "Directs" to a campaign over a certian period of time

Hey,

we are currently running advertisment on TV and I would like to assign “Direct” hits to a certian TV campaign. So if our advetisment runs at 15:00 everybody hitting our page as a direct should be assigned to TV campaign. Any chance on doing that automatically or later via database access?

Thanks in advance

You could do this after the fact, using a SQL query such as:


UPDATE piwik_log_visit 
SET referer_type = 6, referer_name="TV", referer_keyword = "Ad summer deal" 
WHERE visit_first_action_time > '2011-01-01 15:00:00' AND visit_first_action_time < '2011-01-01 16:00:00'

Make sure the datetime is in UTC timezone.

If you run this query for days in the past, you will want to reprocess reports. See: How to - Analytics Platform - Matomo

thank you! will try that