gtag_interop 0.2.0

Gtag Interop for Dart #

Runtime Release License Coverage Build

Global site tag (gtag.js) interoperability for Dart.

Documentation #

Development #

License #

Gtag Interop for Dart is distributed under the MIT License.

Changelog #

Version 0.2.0

  • Breaking change: raised the Dart SDK constraint.
  • Added an example code.
  • Added a unit test.
  • Updated the documentation.

Version 0.1.0 #

  • Initial release.


import 'package:gtag_interop/gtag_interop.dart';

void main() => Analytics('GA_TRACKING_ID')..configure();

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  gtag_interop: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:gtag_interop/gtag_interop.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/js/data.dart. (-1 points)

Analysis of lib/src/js/data.dart reported 2 hints:

line 6 col 7: The declaration '_ImpressionData' isn't referenced.

line 15 col 7: The declaration '_ProductData' isn't referenced.

Format lib/src/html/analytics.dart.

Run dartfmt to format lib/src/html/analytics.dart.

Format lib/src/html/service.dart.

Run dartfmt to format lib/src/html/service.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/js/command.dart (Run dartfmt to format lib/src/js/command.dart.)
  • lib/src/js/event.dart (Run dartfmt to format lib/src/js/event.dart.)
  • lib/src/js/gtag.dart (Run dartfmt to format lib/src/js/gtag.dart.)
  • lib/src/js/parameters.dart (Run dartfmt to format lib/src/js/parameters.dart.)

Maintenance suggestions

Package is getting outdated. (-23.84 points)

The package was last published 64 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
js ^0.6.1 0.6.1+1
Dev dependencies
build_runner ^1.1.2
build_test ^0.10.3
build_web_compilers ^0.4.4
coveralls ^5.0.0
grinder ^0.8.3
test ^1.5.1