gtag_analytics 0.1.7+2 gtag_analytics: ^0.1.7+2 copied to clipboard
A minimal Google Analytics interop library. Allows triggering page views and other events from Dart code.
example/gtag_analytics_example.dart
// Copyright (c) 2017, filiph. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.
import 'package:gtag_analytics/gtag_analytics.dart';
void main() {
final inProduction = const String.fromEnvironment('production') == 'true';
final ga = new GoogleAnalytics(failSilently: inProduction);
ga.sendCustom('choose_action', category: 'play');
}