summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-08-31 23:07:20 +0200
committerJules Laplace <julescarbon@gmail.com>2020-08-31 23:07:20 +0200
commit22721a013bdd10d5eb395ba18453585f5f3f1f7f (patch)
tree5a920e31d6026ed5dc55265e5fd057febccc50e3 /StoneIsland/platforms/ios/www/js/lib/etc/analytics.js
parentd22d51a1ae49680015326857360eb699f31efced (diff)
rebuild the ios platform and the plugins
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/etc/analytics.js')
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/etc/analytics.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js b/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js
new file mode 100644
index 00000000..f5f871f5
--- /dev/null
+++ b/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js
@@ -0,0 +1,21 @@
+var analytics = (function() {
+ var analytics = {}
+
+ analytics.init = function() {
+ console.log("Analytics init")
+ if (window.FirebasePlugin) {
+ window.FirebasePlugin.setAnalyticsCollectionEnabled(true)
+ }
+ analytics.sendPageView('/')
+ }
+
+ analytics.sendPageView = function(path) {
+ console.log("/a\\ send", path)
+ FirebasePlugin.logEvent("select_content", {
+ content_type: "page_view",
+ item_id: path,
+ })
+ }
+
+ return analytics
+})()