jandres
(Julian)
12월 19, 2024, 9:56오후
1
In last Version 3.4.0.beta4-dev I noted that topic views doesn’t update when using rest API requests. Even putting headers likeDiscourse-Visible, X-Requested-With or even more
‘Discourse-Visible’: ‘true’,
‘Discourse-Logged-In’ : ‘true’,
‘Discourse-Present’: ‘true’,
‘Discourse-Track-View’: ‘true’,
‘Discourse-Track-View-Topic-Id’: 2214
I don’t know if this is a bug or is something that is programmed like that. But in previous version this behaviour didn’t happen
I would be very grateful if you could help me with this issue.
Thank you very much
jandres
(Julian)
3월 24, 2025, 8:46오후
2
Is this something that just happening to me ?
I would really appreciate any help you can give me with this problem. I’ve tried several things without success. I think I’ve set all the possible headers I’ve seen in the reverse engineering I’ve done, and the views still aren’t updating. I think there must be a header I’m missing.
By the way I’m using admin API keys instead of User api keys. I hope this is not a problem
Thank you very much
sam
(Sam Saffron)
3월 24, 2025, 10:24오후
3
API requests don’t track views, unconditionally, by design.
I guess you are after some feature request here to allow you to track views via our API, recategorizing.
2개의 좋아요
jandres
(Julian)
3월 25, 2025, 2:24오후
4
hmmm
Thank you @sam but I wonder why before 3.4.0.beta-4 version it did it ?
also if User::last_seen_at is updated why not the views ?
When you say a feature it means a plugin that allow me to track views via API ?
Thank you again
sam
(Sam Saffron)
5월 12, 2025, 2:42오전
5
@david can you clarify here, is there a change missing from request tracker?
david
(David Taylor)
5월 12, 2025, 9:27오전
6
Topic views have been migrated to use our “browser pageviews” system. That means that they no longer include any kind of API or crawler requests.
The DISCOURSE_VISIBLE header relates only to the legacy pageviews system.
3개의 좋아요
Nima1
(Nima)
11월 16, 2025, 7:25오전
8
API 트래픽(모바일 앱, 통합 등)을 토픽 조회수로 집계하고 싶으시다면, 이를 정확히 수행하는 작은 플러그인을 공개했습니다:
api-topic-views
https://github.com/gorfist/api-topic-views
이 플러그인은 TopicsController#show에 연결되어 자격이 있는 API/사용자 API 요청을 토픽 조회수로 집계하며, 커스텀 헤더, 레이트 리미팅, 크롤러 필터링, 사용자 인식 추적 등의 옵션을 제공합니다.
아직 출시된 지 얼마 되지 않아 완전히 검증되지는 않았지만, 대부분의 자체 호스팅 환경에서 잘 작동할 것입니다. 피드백이나 PR을 환영합니다!
1개의 좋아요
jandres
(Julian)
11월 17, 2025, 3:30오후
9
와, 정말 감사합니다 @Nima1
직접 테스트해 보고 피드백을 드리겠습니다.
1개의 좋아요