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

Matomoを使ってみた

Tiphaine
July 21, 2023

 Matomoを使ってみた

potatotips #83 iOS/Android開発Tips共有会
https://potatotips.connpass.com/event/287244/

Tiphaine

July 21, 2023
Tweet

More Decks by Tiphaine

Other Decks in Technology

Transcript

  1. ̏ͭͷόʔδϣϯ ‣ ༗ྉ ‣ ࢖͍΍͍͢ ‣ &6ͷαʔόʔ ‣ ແྉ ‣

    ηοτΞοϓ͕ਏ͍ ‣ ࣗ෼ͷαʔόʔ ‣ ແྉ ‣ ࢖͍΍͍͢ ‣ ʁ
  2. 4FUVQ dependencies { implementation "com.github.matomo-org:matomo-sdk-android:4.1.4" } repositories { maven {

    url 'https://jitpack.io' } } IUUQTHJUIVCDPNNBUPNPPSHNBUPNPTELBOESPJE 2⃣%FQFOEFODZ௥Ճ
  3. 4FUVQ 3⃣ॳظԽ.BUPNP"QQMJDBUJPOΛܧঝ͢Δ import org.matomo.sdk.TrackerBuilder class MySuperApplication : MatomoApplication() { //

    … override fun onCreateTrackerConfig(): TrackerBuilder { return TrackerBuilder.createDefault( // apiUrl: "${μογϡϘʔυͷURL}/matomo.php" "https://tahia910.matomo.cloud/matomo.php", // sideId: ʮઃఆʯ → ʮ΢ΣϒαΠτʯ → ʮ؅ཧʯͰ֬ೝͰ͖Δ 1 ) } }
  4. 4FUVQ 3⃣ॳظԽ.BUPNP"QQMJDBUJPOΛܧঝ͢Δ import org.matomo.sdk.TrackerBuilder class MySuperApplication : MatomoApplication() { //

    … override fun onCreateTrackerConfig(): TrackerBuilder { return TrackerBuilder.createDefault( // apiUrl: "${μογϡϘʔυͷURL}/matomo.php" "https://tahia910.matomo.cloud/matomo.php", // sideId: ʮઃఆʯ → ʮ΢ΣϒαΠτʯ → ʮ؅ཧʯͰ֬ೝͰ͖Δ 1 ) } }
  5. 4FUVQ 3⃣ॳظԽ.BUPNP"QQMJDBUJPOΛܧঝ͢Δ import org.matomo.sdk.TrackerBuilder class MySuperApplication : MatomoApplication() { //

    … override fun onCreateTrackerConfig(): TrackerBuilder { return TrackerBuilder.createDefault( // apiUrl: "${μογϡϘʔυͷURL}/matomo.php" "https://tahia910.matomo.cloud/matomo.php", // siteId: ʮઃఆʯ → ʮ΢ΣϒαΠτʯ → ʮ؅ཧʯͰ֬ೝͰ͖Δ 1 ) } }
  6. 4FUVQ 3⃣ॳظԽ.BUPNP"QQMJDBUJPOΛܧঝ͢Δ import org.matomo.sdk.TrackerBuilder class MySuperApplication : MatomoApplication() { //

    … override fun onCreateTrackerConfig(): TrackerBuilder { return TrackerBuilder.createDefault( // apiUrl: "${μογϡϘʔυͷURL}/matomo.php" "https://tahia910.matomo.cloud/matomo.php", // siteId: ʮઃఆʯ → ʮ΢ΣϒαΠτʯ → ʮ؅ཧʯͰ֬ೝͰ͖Δ 1 ) } }
  7. 4FUVQ 4⃣ΠϕϯτΛૹ৴͢Δ import org.matomo.sdk.extra.MatomoApplication class MainActivity : ComponentActivity() { override

    fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val tracker = (application as MatomoApplication).tracker //… } }
  8. 4FUVQ 4⃣ΠϕϯτΛૹ৴͢Δ import org.matomo.sdk.extra.TrackHelper class MainActivity : ComponentActivity() { override

    fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val tracker = (application as MatomoApplication).tracker TrackHelper.track() .screen("/main_activity") .title("MainActivity") .with(tracker) } }