I was hoping that incoming link count for a post in discourse database means no. of times external websites have mentioned that post in their content… But the numbers that I have are too high to believe that.
Could someone please explain what does incoming link count mean?
「いいね!」 2
I believe it is the number of incoming links from the forum itself, that is, the number of other posts that have linked to that post.
There is no rational way to determine how many times external websites have linked to a place without crawling the entire web, like Google.
「いいね!」 7
コードを確認したところ、incoming_link_count は “topic_views” テーブルに似ていますが、リクエストのフォーマットが JSON の場合に incoming_link_count がインクリメントされないようです。
topics_controller.rb の関連行は以下のとおりです。
def track_visit_to_topic
topic_id = @topic_view.topic.id
ip = request.remote_ip
user_id = (current_user.id if current_user)
track_visit = should_track_visit_to_topic?
if !request.format.json?
hash = {
referer: request.referer || flash[:referer],
host: request.host,
current_user: current_user,
topic_id: @topic_view.topic.id,
post_number: @topic_view.current_post_number,
username: request['u'],
ip_address: request.remote_ip
}
# defer this way so we do not capture the whole controller
# in the closure
TopicsController.defer_add_incoming_link(hash)
end
TopicsController.defer_track_visit(topic_id, ip, user_id, track_visit)
end
このカラムは、内部リンクをクリックした場合と比較して、外部リンク(外部検索エンジンを含む)からこのトピックにアクセスした回数を知ることができると思っていました。
「いいね!」 1
私もです!どのトピックが外部リンクから最も多く訪問されているかを確認できると素晴らしいですね ![]()
![]()
![]()