gtag_interop 0.2.0

  • Example
  • Installing
  • Versions
  • 63

Gtag Interop for Dart

Runtime Release License Coverage Build

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




Gtag Interop for Dart is distributed under the MIT License.


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

Alternatively, your editor might support 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';
Version Uploaded Documentation Archive
0.2.0 Nov 29, 2018 Go to the documentation of gtag_interop 0.2.0 Download gtag_interop 0.2.0 archive
0.1.0 Jun 25, 2018 Go to the documentation of gtag_interop 0.1.0 Download gtag_interop 0.1.0 archive
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 Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: web

Primary library: package:gtag_interop/gtag_interop.dart with components: html, js.

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 class '_ImpressionData' isn't used.

line 15 col 7: The class '_ProductData' isn't used.

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 issues and suggestions

Homepage does not exists. (-20 points)

We were unable to access at the time of the analysis.

Documentation URL does not exists. (-10 points)

We were unable to access at the time of the analysis.


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