패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.0.3

analytics

분석 서비스 작업을 위한 인터페이스입니다. 이 라이브러리는 다양한 분석 서비스 작업을 통합하는 것을 목표로 합니다.

AndroidiOSmacOSWindowsLinux
30일 다운로드
750
좋아요
43
Pub 점수
150

패키지 설치

flutter pub add analytics

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

분석 패키지는 플러터 플랫폼에서 여러 분석 서비스를 통합하고 관리하기 위한 유일한 인터페이스를 제공합니다. 사용자 행동과 앱 성능을 추적하는 것을 간소화하도록 설계되었으며, 다양한 분석 공급업체 간의 차이점을 추상화하여 개발자가 서비스를 쉽게 전환하거나 동시에 여러 서비스를 사용할 수 있도록 합니다. 이 라이브러리는 Android, iOS, macOS, Windows 및 Linux를 지원하여 일관된 데이터 수집이 필요한 크로스플랫폼 애플리케이션에 적합합니다. 단일 API를 통해 이벤트 로깅, 사용자 속성 추적 및 세션 관리가 가능합니다.

사용 사례

  • 크로스 플랫폼 분석 통합
  • 여러 공급자에 걸친 통합 이벤트 추적
  • 사용자 행동 모니터링
  • 앱 성능 측정
  • A/B 테스트 데이터 수집

주요 기능

  • 플랫폼에 관계없는 분석 인터페이스
  • 다중 분석 백엔드 지원
  • 플랫폼 간 일관된 API
  • 간편한 서비스 전환
  • 이벤트 및 사용자 속성 추적

적합한 대상

  • 다중 플랫폼 앱을 개발하는 개발자
  • 여러 분석 도구를 사용하는 팀
  • 유연한 분석 구성이 필요한 프로젝트
  • 세부 사용자 인사이트가 필요한 앱
  • 스타트업들이 조기에 분석 표준화 시작

고려 사항

  • 개별 분석 제공업체의 설정이 필요합니다
  • 추가된 종속성으로 인해 앱 크기가 증가할 수 있습니다
  • 공급자 고유의 구현 세부 사항에 따라 다름
  • 개인정보 및 동의에 대한 신중한 처리가 필요합니다
  • 하위 제공자가 지원하는 기능에 제한됨

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Analytics

Made by Surf 🏄‍♂️🏄‍♂️🏄‍♂️

Build Status Coverage Status Pub Version Pub Likes Pub popularity Flutter Platform

Overview

Interface for working with analytic services. The library is supposed to unify work with various analytic services. The main actors are:

  • AnalyticAction — any action that is valuable for analytics. Usually it is a "button pressed" or "screen opened" type of event but the main criterion is a possibility to be handled by AnalyticStrategy.
  • AnalyticActionPerformer - an interface for analytic action performers. This class is an abstract base class for analytic strategies.
  • AnalyticStrategy — a class that provides a special way to send an analytical action. To create a custom analytic strategy, you should extend this class and implement the performAction method.
  • AnalyticService — a class that provides a way to send analytic action using a set of analytic strategies. To use this class, you should create an instance of it with a set of analytic strategies, and then call the performAction method to send analytic action.

Example

The easiest interaction with the library is as follows:

  1. Determine the actions that ought to be recorded in the analytics service:

    class MyAnalyticAction implements AnalyticAction {
        final String key;
        final String value;
    
        MyAnalyticAction(this.key, this.value);
    }
    
    class ButtonPressedAction extends MyAnalyticAction {
        ButtonPressedAction() : super("button_pressed", null);
    }
    
    class ScreenOpenedAction extends MyAnalyticAction {
        ScreenOpenedAction({String param}) : super("screen_opened", param);
    }
    
  2. Implement analytic strategy:

    class MyAnalyticStrategy
        extends AnalyticStrategy<MyAnalyticAction> {
        final SomeAnalyticsApi _analyticsApi;
    
        SomeAnalyticsApi(this._analyticsApi);
    
        @override
        void performAction(MyAnalyticAction action) {
            _analyticsApi.send(action.key, action.value);
        }
    }
    
  3. Create an AnalyticService with your strategy:

    final analyticService = AnalyticService.withStrategies({
        MyAnalyticStrategy(analytics),
    });
    

Usage:

    analyticService.performAction(ButtonPressedAction());

Installation

Add analytics to your pubspec.yaml file:

dependencies:
  analytics: $currentVersion$

At this moment, the current version of analytics is analytics version.

Migrating from 1.x.x to 2.x.x

1.x.x

    final analyticService = DefaultAnalyticService();
    analyticService.addActionPerformer(
        MyAnalyticActionPerformer(SomeAnalyticService()),
    );

Starting from version 2.0.0, sending an event to a specific analytics service is implemented using strategies. The AnalyticService class stores these strategies. Implement analytics strategies using the AnalyticStrategy egy class.

    final analyticService = AnalyticService.withStrategies({
        MyAnalyticStrategy(analytics),
    });

Changelog

All notable changes to this project will be documented in this file.

Issues

To report your issues, submit directly in the Issues section.

Contribute

If you would like to contribute to the package (e.g. by improving the documentation, fixing a bug or adding a cool new feature), please read our contribution guide first and send us your pull request.

Your PRs are always welcome.

How to reach us

Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.

Telegram

License

Apache License, Version 2.0

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트