Git Product home page Git Product logo

usage's People

Contributors

abarth avatar collinjackson avatar dependabot[bot] avatar devoncarew avatar fox32 avatar franklinyow avatar geisterfurz007 avatar kasperpeulen avatar kevmoo avatar michaelrfairhurst avatar natebosch avatar pq avatar sethladd avatar sigurdm avatar srawlins avatar tvolkert avatar yjbanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

usage's Issues

publish version 3.0.0 to pub

Hello,

I cannot get the last version (3.0.0) with pub get.
Moreover, the dedicated dart-lang website page of usage refer to the version 2.2.2

Is it normal?

Vincent

delegate to `intl`?

We have a getPlatformLocale() method, which is a poor man's version of what package:intl can do. Should we take a dep in intl and delegate to it? On dart:io, require consumers to pass the platform locale into our constructor?

Update docs for Google Analytics setup

When you are creating a new property at google analytics make sure to select the mobile app option, not the website option.

I’m not sure if this is possible anymore. I selected mobile app but then you are forced to create a firebase analytics project?

Used named optionals instead of positional

Many methods in Analytics use optional positionals. IMO optional positional should rarely be used on public APIs:

  • Callsite is less readable, especially for bools.
  • Hard to add more optional arguments in the future.
  • Have to pass null when you only care about the trailing optionals (which might overwrite the default value).

Change to named arguments?

ddc analysis issues

severe: [INVALID_FIELD_OVERRIDE] Field declaration Analytics.optIn cannot be overridden in AnalyticsImpl. (package:usage/src/usage_impl.dart, line 85, col 3)
severe: [INVALID_FIELD_OVERRIDE] Field declaration Analytics.optIn= cannot be overridden in AnalyticsImpl. (package:usage/src/usage_impl.dart, line 87, col 3)

usage example in a Dart Web app

Simple working example of a dart Web App (SPA) that uses usage would be appreciated. I have tried to implement one based on the console app but I have not been successful. A working Web App that is similar to the example console app would be very helpful.

Breaks on flutter master/alpha

E/flutter : [ERROR:dart_error.cc(17)] Unhandled exception:
E/flutter : No top-level method 'getFilesDir' declared.
E/flutter : 
E/flutter : NoSuchMethodError: method not found: 'getFilesDir'
E/flutter : Receiver: top-level
E/flutter : Arguments: [...]
E/flutter : #0      NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:169)
E/flutter : #1      createAnalytics.<createAnalytics_async_body> (package:usage/src/usage_impl_flutter.dart:22)
E/flutter : #2      Future.Future.microtask.<anonymous closure> (dart:async/future.dart:144)
E/flutter : #3      _microtaskLoop (dart:async/schedule_microtask.dart:41)
E/flutter : #4      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)

String dataPath = await getFilesDir();

getFilesDir was removed from flutter in flutter/flutter#3636

windows platforms are not recognized

For the dart:io provider, we're not recognizing windows platforms correctly. I suspect that the user agent we're synthesizing is incorrect (mac and linux platforms are being recognized).

Problem in package import version 2.0.0

Hello,
I have imported the version 2.0.0
When i compile my YAML i obtain this error:

Expected ';' after this.
import 'src/usage_impl_default.dart'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error from Dart2JS on myprjweb/dart/main.dart:
packages/usage/usage.dart:28:4:
'if' is a reserved word and can't be used here.
Try using a different name.
if (dart.library.js) 'src/usage_impl_html.dart'
^^

See the image below that shown the issue:

screen shot 2016-04-08 at 17 40 32

Thank you
Andrea

Add optional logging

It'd be useful to track errors, especially

using 'pub.usage' or something as the name – or just let a user provide the details in the CTOR

Huge output size

While regularly checking the output size (after dart2js) of your web application, I noticed a big increase. The uncompressed size of our javascript file increased by 400 kb. After compression using gzip it is still 100 kb bigger than before. This is not acceptable for us.

I investigated what this increase is causing: It is the use of the uuid package and all it's dependencies. Currently uuid is used to generate the unique client id.
Using uuid in console applications is fine. Looks like the normal Google Analytics implementation is only using a simple random number as a client id.

I think it would be usefull if the generator for the client id could be set from the outside, or to force the use of a simple random number for the Html version of the library. The client id generator could be a simple callback function or a class as we already have for PostHandler and PersistentProperties.

Handle runtime errors

We have problems with errors from HttpRequest.request. There are several reasons that temporary error can occure, I our case it seems to be a Safari problem.

For now that means that we have a unhandled exception that crashes the application. We can add manually a catchError to the returned futures from the Analytics class.

Now I wonder if we should move handling such exceptions directly into the post handler?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.