How to track user traffic in Gather Town?

GatherTown - user traffic track

1. How it work?

Gather town will request your video link and get a preview picture when the user passes the video object. If we collect this request log data, then we can count the user traffic numbers.

video object

So let’s build up a middleware server between the Gather town and video storage, then we can get user IP & user agent from the server.

flow

2. Update your video to Google Storage

  1. Upload your video to Google Storage
  2. Grand the access to public
upload your video to storage
  1. Then, copy your public link.
get your public link

3. Build up your event log server with Cloud function

  1. Build up your Google Cloud Function
  2. Copy below script to your Edit function
cloudfunction
  1. After deployment, you can copy the link from the trigger tab. (see below picture)
cloudfunction link

4. Create Video in Gather Town

  1. Open your Gather town
  2. Put your Cloud Function link to the Video(Url) place.
  3. Set the Activation distance
mapobjecttv
  1. Then, you can get the IP & user-agent in your database or cloud function log.
cloud function log

Thanks for your reading. I hope this article will help you better track user traffic.

References:

「How to track user traffic in Gather Town?」共有 5 則已核准留言

  1. Hi Max, 我現在遇到了一個問題, 我可以正常透過電視機request的方式去取得function log, 請問如何套用 google analytics來分析人流, 希望您可以回答我的問題, 謝謝 ! ! Best regard, Kenny
    1. Hi Kenny, 可以參考這篇,在後端向 GA 發個請求,將資料傳送給你的 GA https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
      1. Hi Max, 首先謝謝你的回覆, 我大致上已經理解如何去與GA做連結, 但似乎必須要在Gather埋入追蹤程式碼(Tracking code), 目前卡在如何於Gather埋入Tracking code這個點, 不知道是不是我思考的方向有誤, 如果能回復我就太感謝你了 !! 敬請指教 Kenny
  2. Hi Kenny, 不需要在 Gather 埋入 GA 基礎程式碼喲,因為是在後端向 GA API 發送 post request 的方式,程式碼的話可以參考這篇還蠻清楚的 https://www.themarketingtechnologist.co/measure-your-python-projects-with-google-analytics/
    1. Hi Max, 非常感謝你的協助, 目前已經成功地將偵測的Function寫好了, 如果有需要我的Code, 可以聯絡我 ! (關公面前耍大刀 XD) Best, Kenny