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

ログの収集とBigQueryを用いた分析 / liberty of analytics

sesta
November 26, 2018

ログの収集とBigQueryを用いた分析 / liberty of analytics

Assistant Developer Conference vol.1 の発表資料です

イベント: https://aogdevsja.connpass.com/event/107408/
PDF: https://github.com/sesta/slide/raw/master/20181126_liberty-of-analytics.pdf

sesta

November 26, 2018
Tweet

More Decks by sesta

Other Decks in Technology

Transcript

  1. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    גࣜձࣾ;0;0ςΫϊϩδʔζ
    Πϊϕʔγϣϯਪਐ෦ΤϯδχΞ
    ෢ాमฏ
    ϩάͷऩूͱ

    #JH2VFSZΛ༻͍ͨ෼ੳ
    ෼ੳΛ΋ͬͱࣗ༝ʹ

    View full-size slide

  2. ;0;0ςΫϊϩδʔζ
    Πϊϕʔγϣϯਪਐ෦ΤϯδχΞ
    ෢ాमฏTFTUBͤͨ͢
    Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    ϓϩϑΟʔϧ
    2
    (PPHMF"TTJTUBOUपΓɺ'JSFCBTFɺ'MVUUFSΛ৮ͬͯΔ
    ҰࣇͷύύͰझຯ͸ఉ͍͡Γ
    %SPJE,BJHJͰొஃ͕ܾ·ͬͨ
    ͍ͭʹݸਓͰΞϓϦΛग़ͨ͠ͷͰ޷͖উख࿩ͤΔ
    ϑΝογϣϯࣙయ

    View full-size slide

  3. ˓೔ຊ࠷େڃͷϑΝογϣϯγϣοϐϯάαΠτΞϓϦ
    ˓ Ҏ্ͷγϣοϓɺ Ҏ্ͷϒϥϯυͷऔΓѻ͍
    ˓ৗ࣌ສ఺Ҏ্ͷ঎඼ΞΠςϜ਺ͱຖ೔ฏۉ ఺Ҏ্ͷ৽ண঎
    ඼Λܝࡌ
    ˓ଈ೔഑ૹαʔϏεΪϑτϥοϐϯάαʔϏεπέ෷͍ͳͲ
    IUUQ[P[PKQ
    Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    3

    View full-size slide

  4. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    ˓೔ຊ࠷େڃͷϑΝογϣϯίʔσΟωʔτΞϓϦ
    ˓ ສμ΢ϯϩʔυಥഁɺίʔσΟωʔτ౤ߘ૯਺͸ສ݅
    ˓શੈքʢ"QQ4UPSF(PPHMFQMBZ͕ར༻ՄೳͳશͯͷࠃʣͰμ
    ΢ϯϩʔυ͕Մೳ
    ˓ສਓҎ্ͷϑΥϩϫʔΛ࣋ͭϢʔβʔʢ8&"3*45"ʣ΋஀ੜ
    IUUQTXFBSKQ
    4

    View full-size slide

  5. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    ˓౰͕ࣾಠࣗʹ։ൃͨ͠࠾ੇ༻ϘσΟʔεʔπ
    ˓શମʹࢪ͞ΕͨυοτϚʔΧʔΛεϚʔτϑΥϯΧϝϥͰ౓ࡱ
    Ө͢Δ͜ͱͰɺମܕσʔλΛܭଌ
    ˓ܭଌͨ͠ମܕσʔλ͸ɺॠ࣌ʹ%ϞσϧԽ͞Εɺ;0;0508/Ξ
    ϓϦʹอଘɻ%Ϟσϧ͸͋ΒΏΔ֯౓ʹಈ͔͢͜ͱ͕Ͱ͖ɺମܕΛ
    ౓νΣοΫ͢Δ͜ͱ͕Մೳ
    IUUQ[P[PKQ[P[PTVJU
    5

    View full-size slide

  6. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    ˓ʮ;0;046*5ʯͰܭଌͨ͠ମܕσʔλΛ΋ͱʹɺҰਓͻͱΓͷମ
    ܕʹ߹ͬͨʮ͋ͳͨαΠζʯͷΞΠςϜ
    ˓ʮڀۃͷϑΟοτײʯΛ࣮ݱͨ͠ϕʔγοΫΞΠςϜΛఏڙ
    άϩʔόϧαΠτʮ;0;0DPNʯͰւ֎ల։
    ˓ΞΠςϜ̩γϟπɺσχϜύϯπɺγϟπɺϏδωεεʔπɺ
    ωΫλΠɺϘʔμʔ̩γϟπɺ௕କΫϧʔωοΫ̩γϟπͳͲ
    IUUQ[P[PKQQC
    6

    View full-size slide

  7. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    7
    ࠓճ͢Δ࿩
    ɾݸਓͰ։ൃͨ͠ʮϑΝογϣϯࣙయʯͷ࿩Ͱ͢

    View full-size slide

  8. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    8
    ෼ੳ

    View full-size slide

  9. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    9
    ෼ੳͯ͠·͔͢ʁ

    View full-size slide

  10. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    10
    Ͳ͏΍ͬͯ
    ෼ੳͯ͠·͔͢ʁ

    View full-size slide

  11. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    11
    ෼ੳͷΑ͋͘Δखஈ
    Actions on Google の
    Analytics 機能
    Dialogflow の
    Analytics や History 機能

    View full-size slide

  12. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    12
    "P(΍%JBMPHGMPXͰΘ͔Δ͜ͱ
    ɾΞϓϦ͕Կճݺͼग़͞Ε͔ͨʁ
    ɾΤϥʔ཰͸ͲΕ͙Β͍͔ʁ
    ɾΠϯςϯτͷݺͼग़͞ΕΔॱ൪͸ʁ
    ΞϓϦશମͷ༷ࢠ
    "P("DUJPOTPOHPPHMF

    View full-size slide

  13. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    13
    "P(΍%JBMPHGMPXͰΘ͔Βͳ͍͜ͱ
    ɾଟ͘࢖ΘΕ͍ͯΔݴ༿͸ʁ
    ɾ࿩͔͚͠ΒΕ͍ͯΔ࣌ؒଳ͸ʁ
    ɾར༻ස౓ͷߴ͍Ϣʔβʔͷಛ௃͸ʁ
    Ұ෦ͷଆ໘ͷ༷ࢠ

    View full-size slide

  14. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    14
    ཁ͸
    ࣗ༝ʹ෼ੳ͍ͨ͠

    View full-size slide

  15. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    15
    ࣗ༝ʹ෼ੳͱ͸
    ɾ޷͖ͳσʔλ͚ͩൈ͖ग़͍ͨ͠
    ɾൃ࿩಺༰
    ɾ࣌ؒଳ
    ɾूܭͷ࢓ํΛ͍͡Γ͍ͨ
    ɾશମͷฏۉ
    ɾ࣌ؒଳ͝ͱͷ߹ܭ
    ɾϢʔβʔϕʔεͷதԝ஋
    #JH2VFSZ

    View full-size slide

  16. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    16
    ࣗ༝ʹ෼ੳ͢Δ·Ͱͷखॱ
    ੜσʔλʹΞΫηε
    σʔλΛ#JH2VFSZʹಉظ
    #JH2VFSZΛଘ෼ʹୟ͘

    View full-size slide

  17. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    17
    ੜσʔλʹΞΫηε

    View full-size slide

  18. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    18
    ੜσʔλͷ͋Δ৔ॴ
    ɾ4UBDLESJWFS-PHHJOH

    View full-size slide

  19. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    19
    4UBDLESJWFS-PHHJOHͱ͸
    ɾ(PPHMF$MPVEͷ؅ཧπʔϧͷͭͰɺϩάͷ֨ೲ΍ݕࡧ͕Ͱ͖Δ
    ϦΫΤετ΍ϨεϙϯεΛϩάͱͯ͠อଘ
    ϩάΛूܭͯ͠දࣔ

    View full-size slide

  20. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    20
    4UBDLESJWFS-PHHJOHʹߦ͘ํ๏
    ɾ%JBMPHGMPX

    4FUUJOH

    (FOFSBM

    View full-size slide

  21. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    21
    ੜσʔλͷ༷ࢠ
    ɾʮ(PPHMFΞγελϯτͷૢ࡞ʯ

    ͰߜΔͱग़͖ͯ·͢

    View full-size slide

  22. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    22
    σʔλΛ#JH2VFSZʹಉظ

    View full-size slide

  23. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    23
    ಉظͷํ๏
    ɾ-PHHJOHͷΤΫεϙʔτΛ࢖͏

    View full-size slide

  24. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    24
    ಉظͷઃఆͷ༷ࢠ

    View full-size slide

  25. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    25
    ඞཁͳϩά͚ͩʹϑΟϧλʔ
    Ξγελϯτؔ܎ͷϩάʹߜΔ
    ΫϩʔϥʔΛআ֎
    ɾΞϓϦͷՔಈঢ়ଶΛ֬ೝͯ͠Δ

    ϦΫΤετ͕ఆظతʹ͘ΔͨΊ
    %JBMPHGMPXʹૹ͍ͬͯΔϩάʹߜΔ
    ɾϢʔβʔͷൃ࿩಺༰͕ೖ͍ͬͯΔͷ͸ͬͪ͜ͳͷͰ

    View full-size slide

  26. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    26
    γϯΫ݁Ռ

    View full-size slide

  27. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    27
    #JH2VFSZΛଘ෼ʹୟ͘

    View full-size slide

  28. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    28
    ޷͖ʹୟ͖·͠ΐ͏
    ɾʮςʔϒϧΛΫΤϦʯΛԡͤ͹ςϯϓϨ͕ग़ΔͷͰ

    ͦΕΛ͍͍ײ͡ʹ͍͡Δ

    View full-size slide

  29. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    29
    ྫʣൃ࿩͞Εͨݴ༿ϥϯΩϯά
    8*5)GPSNBUFE@KTPOBT
    4&-&$5
    46#453 UFYU1BZMPBE -&/(5) UFYU1BZMPBE

    BTKTPO KTPOҎ֎ͷ෦෼Λ੾ΓऔΔ
    UJNFTUBNQ
    SFTPVSDFMBCFMTBDUJPO@JEBTBDUJPO
    '30.AMPHEFNPMPH@EFNP@SFRVFTUBDUJPOT@HPPHMFBQJT@DPN@BDUJPOT@A
    8)&3&
    @5"#-&@46''*9
    "/%@5"#-&@46''*9


    EBUBBT
    4&-&$5
    +40/@&953"$5@4$"-"3 KTPO DPOWFSTBUJPODPOWFSTBUJPO*E
    BTDPOWFSTBUJPO*E εΩϧݺͼग़͠͝ͱͷ*%
    +40/@&953"$5@4$"-"3 KTPO VTFSVTFS*E
    BTVTFS*E Ϣʔβʔ*%ɺΞΧ΢ϯτ࿈ܞͯ͠ͳ͍৔߹OVMM
    +40/@&953"$5@4$"-"3 KTPO JOQVUT<>SBX*OQVUT<>RVFSZ
    BTRVFSZ ൃ࿩಺༰
    +40/@&953"$5@4$"-"3 KTPO JT*O4BOECPY
    BTJT4BOECPY ։ൃΞΧ΢ϯτ͔Ͳ͏͔
    BDUJPO "DUJPOTPO(PPHMFͰೝࣝͰ͖ͨΞΫγϣϯ໊
    '03."5@5*.&45".1 :NE).4 UJNFTUBNQ "TJB5PLZP
    BTEBUFൃ࿩ͨ࣌ؒ͠
    '30.GPSNBUFE@KTPO


    4&-&$5RVFSZ $06/5
    BTDPVOU
    '30.EBUB
    8)&3&JT4BOECPY*4/6--
    "/%RVFSZ*4/05/6--
    (3061#:RVFSZ
    03%&3#:DPVOU%&4$

    View full-size slide

  30. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    30
    ྫʣ࣌ؒଳ͝ͱͷεΩϧݺͼग़͠ճ਺
    8*5)GPSNBUFE@KTPOBT
    4&-&$5
    46#453 UFYU1BZMPBE -&/(5) UFYU1BZMPBE

    BTKTPO KTPOҎ֎ͷ෦෼Λ੾ΓऔΔ
    UJNFTUBNQ
    SFTPVSDFMBCFMTBDUJPO@JEBTBDUJPO
    '30.AMPHEFNPMPH@EFNP@SFRVFTUBDUJPOT@HPPHMFBQJT@DPN@BDUJPOT@A
    8)&3&
    @5"#-&@46''*9
    "/%@5"#-&@46''*9


    EBUBBT
    4&-&$5
    +40/@&953"$5@4$"-"3 KTPO DPOWFSTBUJPODPOWFSTBUJPO*E
    BTDPOWFSTBUJPO*E εΩϧݺͼग़͠͝ͱͷ*%
    +40/@&953"$5@4$"-"3 KTPO VTFSVTFS*E
    BTVTFS*E Ϣʔβʔ*%ɺΞΧ΢ϯτ࿈ܞͯ͠ͳ͍৔߹OVMM
    +40/@&953"$5@4$"-"3 KTPO JOQVUT<>SBX*OQVUT<>RVFSZ
    BTRVFSZ ൃ࿩಺༰
    +40/@&953"$5@4$"-"3 KTPO JT*O4BOECPY
    BTJT4BOECPY ։ൃΞΧ΢ϯτ͔Ͳ͏͔
    BDUJPO "DUJPOTPO(PPHMFͰೝࣝͰ͖ͨΞΫγϣϯ໊
    '03."5@5*.&45".1 ) UJNFTUBNQ "TJB5PLZP
    BTIPVSൃ࿩ͨ࣌ؒ͠
    '30.GPSNBUFE@KTPO


    4&-&$5IPVS $06/5 %*45*/$5DPOWFSTBUJPO*E
    BTDPVOU
    '30.EBUB
    8)&3&JT4BOECPY*4/6--
    "/%RVFSZ*4/05/6--
    (3061#:IPVS
    03%&3#:IPVS
    ※ count ͸ഭྗΛग़ͨ͢Ίʹ੝͍ͬͯ·͢

    View full-size slide

  31. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    31
    ޷͖উख෼ੳͰ͖ΔΑ͏ʹͳͬͨͷ͔
    ɾ޷͖ͳσʔλ͚ͩൈ͖ग़͍ͨ͠+40/ͷதʹ͋Δ΋ͷͳΒ͍͚Δ
    ɾൃ࿩಺༰
    ɾ࣌ؒଳ
    ɾूܭͷ࢓ํΛ͍͡Γ͍ͨ4UBOEBSU42-͕͍͢͝ͷͰେৎ෉
    ɾશମͷฏۉ
    ɾ࣌ؒଳ͝ͱͷ߹ܭ
    ɾϢʔβʔϕʔεͷதԝ஋

    View full-size slide

  32. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    32
    1MVT6MUSB
    ͞ΒʹߴΈ΁

    View full-size slide

  33. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    33
    #JH2VFSZͰ޿͕ΔՄೳੑ
    ɾଞͷσʔλͱ૊Έ߹ΘͤΔ
    ɾ'JSFTUPSFʹอଘͯ͠ΔϢʔβʔͷੑผ
    ɾ(PPHMF"OBMZUJDTͰऔͬͨߦಈཤྺ
    ɾ৭ʑͳΤΫεϙʔτ
    ɾ(PPHMFεϓϨουγʔτɺ(PPHMF%BUB4UVEJP
    ɾ3FEBTI

    View full-size slide

  34. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    34
    Ͱ͖ͦ͏ͳ͜ͱ
    ɾܗଶૉղੳ
    ɾͲ͔͜͠Βʹ.F$BCͳΓΛט·ͤΕ͹͍͚Δ͸ͣ
    ɾձ࿩ͷϓϩηεͷ෼ੳ
    ɾ"DUJPOTPO(PPHMFͱͷ૊Έ߹Θ͕ͤྑ͍͔΋

    View full-size slide

  35. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    35
    ·ͱΊ
    ɾ೺Ѳ͍ͨ͜͠ͱʹ߹Θͤͯ"P(ͳͷ͔%JBMPHGMPXͳͷ͔

    ·ͨ͸ɺ#JH2VFSZͳͷ͔ΛબͿΑ͏ʹ͍ͨ͠
    ɾࢥͬͨΑΓ؆୯ʹूܭͰ͖ΔΑ͏ʹͳͬͨ
    ɾ(PPHMFʹମ͕ຬͨ͞Ε͍ͯ͘ײ֮
    ɾϓϩμΫτΛ࡞Γʹڵຯ͕͋Δํ͸੠Λ͔͚͍ͯͩ͘͞
    ɾҰॹʹੈքΛ͔ͬ͜Α͘͠·͠ΐ͏

    View full-size slide

  36. Copyright © ZOZO Technologies, Inc. All Rights Reserved.
    36
    &/%

    View full-size slide