I need to build a model that measures the impact of TV advertising on website traffic.

I have two datasets: one contains the number of visits to the page and a timestamp, the other contains a timestamp and TV ad data such as a channel, information about whether the ads are shown in the middle, after or before a TV show, and so on.

My problem is that I don't know how to merge these datasets as the timestamps in the datasets have different granularity and then which machine learning method should be appropriate to measure this impact.

If you have any ideas or experiences please let me know.

  • $\begingroup$ Is it a website displaying TV ads at different positions on the page, or is it after some time being on the page? $\endgroup$ Jul 9, 2022 at 20:30
  • $\begingroup$ this is a page of e.g. a product that is advertised on TV and the data includes information about the number of visits to that page every hour $\endgroup$
    – Pablo1547
    Jul 10, 2022 at 12:44

1 Answer 1


If you have data about visits every hour, it would not be easy to have a precise analysis because some shows last more than 1 hour and you can't evaluate the impact of the TV ads.

The only thing you can have is a rough idea about the ads' impacts every hour.

If you had a record of visits every 10 minutes, you could at least measure the impact in the short and medium-term. Very often after an ad, you can have a peak of visits from people highly interested.

In all the cases, you have to base your study on page visit numbers, and then add the moments when a TV show is displayed, like this graph. enter image description here

Once you have this view, you can see a delta in the short and long term.

  • $\begingroup$ Does it answer your question? If not, please let me know. $\endgroup$ Aug 5, 2022 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.