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?
סיכום מבוסס בינה מלאכותית
The incoming link count in the Discourse database refers to the number of incoming links from within the forum itself, i.e., the number of other posts that have linked to a specific post. codinghorror clarifies that it does not account for external websites linking to a post, as tracking that would require crawling the entire web.
Akshara_Goyal initially thought it represented the number of external mentions of a post, but found the numbers too high to believe. GregAtkinson analyzed the code and agrees with codinghorror’s explanation. They also mention that the incoming_link_count does not increment when the request format is JSON.
Both GregAtkinson and gassim express interest in tracking the number of times a topic is visited from external links, including search engines, versus internal links.
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.
I looked at the code and it seems like incoming_link_count is similar to the “topic_views” table except it doesn’t increment the incoming_link_count when the request format is json.
Here’s the relevant lines in 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
I was hoping this column would tell me the number of times someone arrived at this topic from an external link (including external search engines) vs clicking internal links.
Same! It would be great if it’s possible to see which topics are being visited the most from external links ![]()
![]()
![]()