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.
The data explorer had this removed and I wanted to run longer quires than the dashboard, I’ve searched for the query to copy/import with no luck, is it available anywhere?
Ecco una query per Data Explorer che restituisce gli argomenti più segnalati per un determinato periodo. Presto aggiungerò una query per le principali fonti di traffico.
La query restituisce un elenco di argomenti Discourse e il numero di volte in cui i link a ciascun argomento sono stati cliccati da una fonte esterna. La query richiede di fornire i parametri start_date e end_date nel formato ‘aaaa-mm-gg’, ad esempio 2020-01-08. I risultati sono ordinati per numero di clic in ordine decrescente. Vengono restituiti i 100 argomenti più segnalati per il periodo indicato. Se sono necessari più risultati, modifica il valore LIMIT della query.
--[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
Per le fonti di traffico, prova questa query.
Restituisce il nome del dominio della fonte di traffico, il numero di clic dalla fonte di traffico nell’arco temporale specificato e il numero di argomenti distinti collegati dalla fonte di traffico. I risultati sono ordinati per numero di clic in ordine decrescente. La query richiede di impostare i parametri start_date e end_date. Le date devono essere nel formato ‘aaaa-mm-gg’, ad esempio 2020-01-09.
La query limita il numero di risultati a 100. Se necessario, modifica il valore LIMIT nella query.
--[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
Grazie Simon, è stato davvero utile (e non ha richiesto modifiche dopo 2 anni
). A mio parere dovrebbe essere uno dei report dettagliati standard.
Spesso penso: “Mamma mia, chi sta facendo tutti questi rinvii??”.