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

Quick question for the community- I see in the dashboard we have a top 10 for Top referred topics and traffic sources. Is this information stored in a table in a database? What I am most interested in is the records outside the top 10. Thanks for any tips!

You can find them with the data explorer plugin.

Thanks. Good call. Let me go take a look at the tables/ fields to see how they are stored.

데이터 탐색기에서 이 기능이 제거되었고, 대시보드보다 더 긴 쿼리를 실행하고 싶었습니다. 복사/가져오기를 위해 해당 쿼리를 찾아보았지만 찾지 못했는데요, 어디에서든 사용할 수 있나요?

아래는 특정 기간 동안 가장 많이 참조된 토픽을 반환하는 Data Explorer 쿼리입니다. 곧 상위 트래픽 소스에 대한 쿼리도 추가할 예정입니다.

이 쿼리는 Discourse 토픽 목록과 각 토픽에 대한 링크가 외부 출처에서 클릭된 횟수를 반환합니다. 쿼리를 실행하려면 yyyy-mm-dd 형식의 start_date와 end_date 매개변수를 제공해야 합니다. 예를 들어 2020-01-08과 같은 형식입니다. 결과는 클릭 수 기준으로 내림차순으로 정렬됩니다. 해당 기간 동안 상위 100개의 참조 토픽이 반환됩니다. 더 많은 결과가 필요하면 쿼리의 LIMIT 값을 조정하세요.

--[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

트래픽 소스에 대해서는 이 쿼리를 시도해 보세요.

이 쿼리는 트래픽 소스의 도메인 이름, 해당 기간 내 트래픽 소스에서 발생한 클릭 수, 그리고 해당 트래픽 소스에서 링크된 고유 토픽 수를 반환합니다. 결과는 클릭 수 기준으로 내림차순으로 정렬됩니다. 이 쿼리를 실행하려면 start_date와 end_date 매개변수를 설정해야 합니다. 날짜 형식은 'yyyy-mm-dd’여야 하며, 예를 들어 2020-01-09와 같습니다.

쿼리는 결과 수를 100개로 제한합니다. 이를 변경하려면 쿼리의 LIMIT 값을 조정하세요.

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

WITH links AS (
SELECT
ind.name,
t.id AS topic_id
FROM incoming_links il
JOIN posts p
ON p.id = il.post_id
JOIN topics t
ON t.id = p.topic_id
JOIN incoming_referers ir
ON ir.id = il.incoming_referer_id
JOIN incoming_domains ind
ON ind.id = ir.incoming_domain_id
WHERE t.archetype = 'regular'
AND il.created_at::date BETWEEN :start_date::date AND :end_date::date
)
SELECT
name,
COUNT(name) AS clicks,
COUNT(DISTINCT topic_id) AS topics
FROM links
GROUP BY name
ORDER BY clicks DESC
LIMIT 100

Simon, 정말 유용했어요 (그리고 2년 뒤에도 아무런 수정이 필요하지 않았어요 :+1: :sweat_smile: ). 제 생각에는 이 정도 수준의 상세 보고서가 표준이 되어야 합니다.

자주 이런 생각이 들어요: “도대체 누가 이 많은 의뢰를 처리하는 거지??”