Skip to content

Commit

Permalink
[firebase_analytics] Endorse web implementation. (firebase#2865)
Browse files Browse the repository at this point in the history
* [firebase_analytics] Endorse web implementation.
  • Loading branch information
ditman authored Jun 30, 2020
1 parent acca7ef commit 1daaea7
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/firebase_analytics/firebase_analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 5.0.16

* Endorse `firebase_analytics_web`.
* Add web support to the example app.

## 5.0.15

* Use the platform interface.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">

<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="example">
<link rel="apple-touch-icon" href="icons/Icon-192.png">

<!-- Favicon -->
<link rel="shortcut icon" type="image/png" href="favicon.png"/>

<title>example</title>
<link rel="manifest" href="manifest.json">

<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.15.1/firebase-app.js"></script>

<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/7.15.1/firebase-analytics.js"></script>

<script>
// Your web app's Firebase configuration
var firebaseConfig = {
// Get this from your firebase project.
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
</script>


</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('flutter_service_worker.js');
});
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "example",
"short_name": "example",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
5 changes: 4 additions & 1 deletion packages/firebase_analytics/firebase_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description:
Flutter plugin for Google Analytics for Firebase, an app measurement
solution that provides insight on app usage and user engagement on Android and iOS.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_analytics/firebase_analytics
version: 5.0.15
version: 5.0.16

flutter:
plugin:
Expand All @@ -13,11 +13,14 @@ flutter:
pluginClass: FirebaseAnalyticsPlugin
ios:
pluginClass: FLTFirebaseAnalyticsPlugin
web:
default_package: firebase_analytics_web

dependencies:
meta: ^1.0.4
flutter:
sdk: flutter
firebase_analytics_web: ^0.1.0
firebase_analytics_platform_interface: ^1.0.1

dev_dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void main() {
arguments: 234,
),
);
});
}, testOn: 'android');

test('resetAnalyticsData', () async {
await analytics.resetAnalyticsData();
Expand Down

0 comments on commit 1daaea7

Please sign in to comment.