summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-08-31 19:59:58 +0200
committerJules Laplace <julescarbon@gmail.com>2020-08-31 19:59:58 +0200
commita81d20bc18d002623fc24cdcea8df7eed6d85bc9 (patch)
tree6cc84744b966f3ca5a80c7ed86488751a0603f35
parentd738bb120f86d491729a928cec275ff26c90cc09 (diff)
pre-firebase setup...
-rw-r--r--StoneIsland/GoogleService-Info.plist22
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist4
-rw-r--r--StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstatebin23606 -> 23438 bytes
-rwxr-xr-xStoneIsland/www/js/index.js2
-rwxr-xr-xStoneIsland/www/js/lib/_router.js4
-rw-r--r--StoneIsland/www/js/lib/etc/analytics.js66
-rwxr-xr-xStoneIsland/www/js/lib/etc/push.js4
-rw-r--r--old-GoogleService-Info.plist40
-rw-r--r--old-google-services.json (renamed from StoneIsland/google-services.json)0
9 files changed, 96 insertions, 46 deletions
diff --git a/StoneIsland/GoogleService-Info.plist b/StoneIsland/GoogleService-Info.plist
index 0d23216d..fb4545dd 100644
--- a/StoneIsland/GoogleService-Info.plist
+++ b/StoneIsland/GoogleService-Info.plist
@@ -2,28 +2,24 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>AD_UNIT_ID_FOR_BANNER_TEST</key>
- <string>ca-app-pub-3940256099942544/2934735716</string>
- <key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
- <string>ca-app-pub-3940256099942544/4411468910</string>
<key>CLIENT_ID</key>
- <string>426306878988-nuqlbd4k944sk5mm63vdubdptb3cpkmt.apps.googleusercontent.com</string>
+ <string>862307359073-di238jkcuqfvbtslfllqd996nb5cjmfv.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
- <string>com.googleusercontent.apps.426306878988-nuqlbd4k944sk5mm63vdubdptb3cpkmt</string>
+ <string>com.googleusercontent.apps.862307359073-di238jkcuqfvbtslfllqd996nb5cjmfv</string>
<key>API_KEY</key>
- <string>AIzaSyAp9tJ_gK45ZhRDiaKOCgvsztQMbhsD_Ms</string>
+ <string>AIzaSyBl8CpcmBGZrz2M1ejNU_00jI3PTUJsv4M</string>
<key>GCM_SENDER_ID</key>
- <string>426306878988</string>
+ <string>862307359073</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>us.okfoc.stoneisland</string>
<key>PROJECT_ID</key>
- <string>stone-island</string>
+ <string>stone-island-app</string>
<key>STORAGE_BUCKET</key>
- <string>stone-island.appspot.com</string>
+ <string>stone-island-app.appspot.com</string>
<key>IS_ADS_ENABLED</key>
- <true></true>
+ <false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
@@ -33,8 +29,8 @@
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
- <string>1:426306878988:ios:0efb92963073829a</string>
+ <string>1:862307359073:ios:67ce45d9c1687415b24d20</string>
<key>DATABASE_URL</key>
- <string>https://stone-island.firebaseio.com</string>
+ <string>https://stone-island-app.firebaseio.com</string>
</dict>
</plist> \ No newline at end of file
diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist
index 4f3362e8..1020c69e 100644
--- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -12,7 +12,7 @@
<key>Cordova.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
- <integer>4</integer>
+ <integer>3</integer>
</dict>
<key>CordovaLib.xcscheme</key>
<dict>
@@ -22,7 +22,7 @@
<key>CordovaLib.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
- <integer>3</integer>
+ <integer>2</integer>
</dict>
</dict>
</dict>
diff --git a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
index b441aa1a..c4eb822b 100644
--- a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 9bc77c38..c8852f64 100755
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -121,7 +121,7 @@ var app = (function(){
console.log("blog fetched, launching router")
app.router.initial_route = window.deepLinkRoute || null
if (app.router.initial_route) {
- analytics.send('push/' + app.router.initial_route)
+ analytics.sendPageView('push/' + app.router.initial_route)
}
app.router.launch()
})
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js
index 9feb262a..7d487689 100755
--- a/StoneIsland/www/js/lib/_router.js
+++ b/StoneIsland/www/js/lib/_router.js
@@ -101,7 +101,7 @@ var SiteRouter = Router.extend({
}
// window.FirebasePlugin && window.FirebasePlugin.setScreenName(name)
- analytics.send(name)
+ analytics.sendPageView(name)
console.log("view >>", app.view)
app.header.set_back( !! app.view.back )
app.view.show()
@@ -129,7 +129,7 @@ var SiteRouter = Router.extend({
if (app.view && app.view.hide) {
app.view.hide()
}
- analytics.send('store/' + code)
+ analytics.sendPageView('store/' + code)
app.view = app.product
app.header.set_back( true )
app.product.load(code)
diff --git a/StoneIsland/www/js/lib/etc/analytics.js b/StoneIsland/www/js/lib/etc/analytics.js
index 0d026f2f..2df8a04c 100644
--- a/StoneIsland/www/js/lib/etc/analytics.js
+++ b/StoneIsland/www/js/lib/etc/analytics.js
@@ -2,47 +2,61 @@ var analytics = (function() {
var analytics = {}
analytics.fields = {
- trackingId: 'UA-XXXXXXXX-Y',
+ trackingId: 'G-24XNLKH9Z6',
clientId: localStorage.getItem('ga:clientId'),
storage: 'none',
}
analytics.init = function() {
console.log("Analytics init")
+ if (window.FirebasePlugin) {
+ window.FirebasePlugin.setAnalyticsCollectionEnabled(true)
+ }
analytics.build()
- analytics.send('/')
+ analytics.sendPageView('/')
}
analytics.build = function() {
- ;( function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga' );
+ // ;( function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ // (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ // m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ // })(window,document,'script','https://www.google-analytics.com/analytics.js','ga' );
- analytics.ga = window.ga
- analytics.ga('create', analytics.fields)
- // prevent tasks that would abort tracking
- analytics.ga('set', {
- // don't abort if the protocol is not http(s)
- checkProtocolTask: null,
- // don't expect cookies to be enabled
- checkStorageTask: null,
- })
- // a callback function to get the clientId and store it ourselves
- analytics.ga(function(tracker){
- localStorage.setItem('ga:clientId', tracker.get('clientId'));
- })
+ // analytics.ga = window.ga
+ // analytics.ga('create', analytics.fields)
+ // // prevent tasks that would abort tracking
+ // analytics.ga('set', {
+ // // don't abort if the protocol is not http(s)
+ // checkProtocolTask: null,
+ // // don't expect cookies to be enabled
+ // checkStorageTask: null,
+ // })
+ // // a callback function to get the clientId and store it ourselves
+ // analytics.ga(function(tracker){
+ // localStorage.setItem('ga:clientId', tracker.get('clientId'));
+ // })
+
+ // window.dataLayer = window.dataLayer || [];
+ // analytics.dataLayer = window.dataLayer
+ // analytics.gtag = () => { analytics.dataLayer.push(arguments) }
+ // analytics.gtag('js', new Date())
+ // analytics.gtag('config', 'G-24XNLKH9Z6')
}
- analytics.send = function(path) {
+ analytics.sendPageView = function(path) {
console.log("/a\\ send", path)
- if (!analytics.ga) return
- analytics.ga('send', {
- // these are the three required properties, check GA's doc for the optional ones
- hitType: 'screenview',
- screenName: path,
- appName: 'StoneIsland'
+ if (!analytics.gtag) return
+ FirebasePlugin.logEvent("select_content", {
+ content_type: "page_view",
+ item_id: path,
})
+ // FirebasePlugin.setScreenName(path)
+ // analytics.gtag('send', {
+ // // these are the three required properties, check GA's doc for the optional ones
+ // hitType: 'screenview',
+ // screenName: path,
+ // appName: 'StoneIsland'
+ // })
}
return analytics
diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js
index e09204d3..a744d5c9 100755
--- a/StoneIsland/www/js/lib/etc/push.js
+++ b/StoneIsland/www/js/lib/etc/push.js
@@ -141,11 +141,11 @@ var push = (function(){
}
}
else if (is_hub) {
- analytics.send("push/open/hub")
+ analytics.sendPageView("push/open/hub")
app.router.go("hub")
}
else {
- analytics.send("push/open/store")
+ analytics.sendPageView("push/open/store")
app.router.go("intro")
}
}
diff --git a/old-GoogleService-Info.plist b/old-GoogleService-Info.plist
new file mode 100644
index 00000000..0d23216d
--- /dev/null
+++ b/old-GoogleService-Info.plist
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>AD_UNIT_ID_FOR_BANNER_TEST</key>
+ <string>ca-app-pub-3940256099942544/2934735716</string>
+ <key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
+ <string>ca-app-pub-3940256099942544/4411468910</string>
+ <key>CLIENT_ID</key>
+ <string>426306878988-nuqlbd4k944sk5mm63vdubdptb3cpkmt.apps.googleusercontent.com</string>
+ <key>REVERSED_CLIENT_ID</key>
+ <string>com.googleusercontent.apps.426306878988-nuqlbd4k944sk5mm63vdubdptb3cpkmt</string>
+ <key>API_KEY</key>
+ <string>AIzaSyAp9tJ_gK45ZhRDiaKOCgvsztQMbhsD_Ms</string>
+ <key>GCM_SENDER_ID</key>
+ <string>426306878988</string>
+ <key>PLIST_VERSION</key>
+ <string>1</string>
+ <key>BUNDLE_ID</key>
+ <string>us.okfoc.stoneisland</string>
+ <key>PROJECT_ID</key>
+ <string>stone-island</string>
+ <key>STORAGE_BUCKET</key>
+ <string>stone-island.appspot.com</string>
+ <key>IS_ADS_ENABLED</key>
+ <true></true>
+ <key>IS_ANALYTICS_ENABLED</key>
+ <false></false>
+ <key>IS_APPINVITE_ENABLED</key>
+ <true></true>
+ <key>IS_GCM_ENABLED</key>
+ <true></true>
+ <key>IS_SIGNIN_ENABLED</key>
+ <true></true>
+ <key>GOOGLE_APP_ID</key>
+ <string>1:426306878988:ios:0efb92963073829a</string>
+ <key>DATABASE_URL</key>
+ <string>https://stone-island.firebaseio.com</string>
+</dict>
+</plist> \ No newline at end of file
diff --git a/StoneIsland/google-services.json b/old-google-services.json
index e638d477..e638d477 100644
--- a/StoneIsland/google-services.json
+++ b/old-google-services.json