Upgrade to Pro — share decks privately, control downloads, hide ads and more …

アプリのログをチーム外で活用してもらうためにやったこと

 アプリのログをチーム外で活用してもらうためにやったこと

Mobile 勉強会 Wantedly x チームラボ #5 で発表したスライドになります
https://wantedly.connpass.com/event/244011/

Shota Kashihara

May 17, 2022
Tweet

More Decks by Shota Kashihara

Other Decks in Programming

Transcript

  1. ©2022 Wantedly, Inc. λΠτϧͷิ଍Ͱ͢ ΞϓϦͷϩάΛ → Treasure Data / Google

    Analytics for Firebase ͷϩά νʔϜ֎Ͱ → ϞόΠϧΞϓϦνʔϜҎ֎ͷϝϯόʔ ׆༻͢Δ → ໨తͷࢦඪʹ͍ͭͯूܭ͢Δ͜ͱ ࠷ॳʹ
  2. ©2022 Wantedly, Inc. ՝୊ ϩάར༻ʹ͔͔Δ༷ʑͳϋʔυϧ w ͭͷUBCMF EBUBTFUʹશͯͷϩά͕ೖ͍ͬͯΔ w ཉ͍͠ϩάʹରԠ͢ΔFWFOU@OBNF

    FWFOU@QBSBNT͕Θ͔Βͳ͍ w TDIFNF͕ͳ͍ w FWFOU@OBNF FWFOU@QBSBNTͷ੾Γํ͕όϥόϥ w ҉໧஌ͷ਺ʑ w J04 "OESPJEͰFWFOU@OBNF͕ҟͳΔ w J04 "OESPJE͓Αͼ࢞ຓΞϓϦͷϩά΋ಉҰUBCMFʹೖ͍ͬͯΔ w 4XJGU΍,PUMJOͷΫϥε໊΍࣮૷༝དྷͷ஋͕ϩάʹೖ͍ͬͯΔ w ೥લʹFWFOU@OBNFͷUZQPΛ௚ͨ͠FUD
  3. ©2022 Wantedly, Inc. ՝୊ -- εΫϦʔϯϩάΛूܭ͢Δ View select case (

    select value.string_value from unnest(event_params) where key = "screen_name" ) when "UserViewController" then "Ϣʔβʔը໘" when "SettingViewController" then "ઃఆը໘" ... -- @ը໘਺͚ͩ else "" end, ... -- user_id ͳͲ from `<project>.analytics.events_*` where _table_suffix = "20220401" and event_name = "screen_event" and app_info.id = "com.wantedly.app" w ը໘ͱΫϥε໊ͷରԠΛ஌ͬͯ ͍Δ ඞཁ͕͋Δ w εΫϦʔϯϩάͷFWFOU@OBNF Λ஌͍ͬͯΔ w ໨తͷΞϓϦͷCVOEMF JEFOUJ fi FSΛ஌͍ͬͯΔ ूܭ͢ΔͨΊʹɺ஌Βͳ͍ͱ͍͚ͳ͍͜ͱ͕ଟ͍
  4. ©2022 Wantedly, Inc. enum EventName { // DO NOT EDIT

    extension Event { var name: String { switch self { case .tapControl: return "tap_control" } } var params: [String: Any] { switch self { case .tapControl(name): switch name { case .userShareButton(let userId): return ["name": "user_share_button", "user_id": userId] case .companyShareButton(let companyId): return ["name": "company_share_button", "company_id": companyId] } } } } TUFDJM 📄
  5. ©2022 Wantedly, Inc. ҙຯͷ͋Δ୯ҐͰ7JFXΛ࡞Δ શͯͷϩά͕ೖ͍ͬͯΔςʔϒϧ͔ΒɺΧςΰϦ͝ͱʹ7JFXΛ੾Γग़͢ ඇΞϓϦΤϯδχΞ ཁٻ͞ΕΔ༷ʑͳ҉໧஌ BOBMZUJDTFWFOUT@ -- εΫϦʔϯϩάΛूܭ͢Δ

    View select case ( select value.string_value from unnest(event_params) where key = "screen_name" ) when "UserViewController" then "Ϣʔβʔը໘" when "SettingViewController" then "ઃఆը໘" ... -- @ը໘਺͚ͩ else "" end, ... -- user_id ͳͲ from `<project>.analytics.events_*` where _table_suffix = "20220401" and event_name = "screen_event" and app_info.id = "com.wantedly.app"
  6. ©2022 Wantedly, Inc. ҙຯͷ͋Δ୯ҐͰ7JFXΛ࡞Δ શͯͷϩά͕ೖ͍ͬͯΔςʔϒϧ͔ΒɺΧςΰϦ͝ͱʹ7JFXΛ੾Γग़͢ ඇΞϓϦΤϯδχΞ ҉໧஌ΛӅṭͨ͠7JFX -- εΫϦʔϯϩάΛूܭ͢Δ View

    select * from `ios_screen_view` JPT@TDSFFO@WJFX JPT@TDSFFO@WJFX JPT@TDSFFO@WJFX BOBMZUJDTFWFOUT@ -- εΫϦʔϯϩάΛूܭ͢Δ View select case ( select value.string_value from unnest(event_params) where key = "screen_name" ) when "UserViewController" then "Ϣʔβʔը໘" when "SettingViewController" then "ઃఆը໘" ... -- @ը໘਺͚ͩ else "" end, ... -- user_id ͳͲ from `<project>.analytics.events_*` where _table_suffix = "20220401" and event_name = "screen_event" and app_info.id = "com.wantedly.app"
  7. ©2022 Wantedly, Inc. ҙຯͷ͋Δ୯ҐͰ7JFXΛ࡞Δ 7JFXΛ૊Έ߹ΘͤΔ w ఆٛࡁΈ7JFXΛ࠶ར༻͢Δ͜ͱͰෳࡶ౓Λ཈͑ͳ͕Β༷ʑͳूܭΛՄೳʹ͢Δ select count(receive.id) receive_count,

    count(open.id) open_count, count(open.id) / count(receive.id) open_rate, from `ios_receive_push_notifications` receive left outer join `ios_open_push_notifications` open using (id) w ྫ ϓογϡ௨஌ͷड৴ϩά ։෧ϩάϓογϡ௨஌ͷ։෧཰ͷूܭ