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.

example/main.dart

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:


dependencies:
  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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jul 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

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.)

Dependencies

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

Admin