Is the info Top Referred Topics/ Top Traffic Sources stored in a table in the database?

Here is a Data Explorer query that returns the top referred topics for a given time period. I’ll add a query for the top traffic sources soon.

The query returns a list of Discourse topics, and the number of times links to each topic have been clicked from an external source. The query requires you to supply start_date and end_date parameters in the form ‘yyyy-mm-dd’, for example 2020-01-08. Results are ordered by click count in descending order. The top 100 referred topics for the time period are returned. If you need more results than that, adjust the query’s LIMIT value.

--[params]
-- date :start_date
-- date :end_date

SELECT
t.id AS topic_id,
COUNT(p.id) AS external_click_count
FROM incoming_links il
JOIN posts p
ON p.id = il.post_id
JOIN topics t
ON t.id = p.topic_id
WHERE t.archetype = 'regular'
AND il.created_at::date BETWEEN :start_date::date AND :end_date::date
GROUP BY p.id, t.id
ORDER BY external_click_count DESC
LIMIT 100