Trying to install Google Analytics. Very confused!



  • Dear Community.

    I am trying to install Google Analytics according to the guide:
    http://quasar-framework.org/guide/managing-google-analytics.html

    1. First I did step 1 - 5 of this guide:
      http://www.multiminds.eu/2016/12/06/google-analytics-tag-manager-ionic-cordova/
    2. Then I followed the Quasar framework guide.

    Question 1
    I’m not sure what to fill in the sessionId. Do I have to use the user ID that is logged into my cordova app?
    Question 2
    Nothing is recorded in my Google Analytics… How can I know if I set up everything correctly? The ajax requests seem to be sent correctly.

    Any ideas??

    Best regards,
    -Luca Ban



  • ** Question 1 **
    If you have a user id you could use this with the benefit that you can link that id to real world users.
    But you can use everything you want to, as long as it is unique per user.

    ** Question 2 **
    Use your Quasar app in web mode and try to check the links with a tool like http://www.gachecker.com/



  • @a47ae Thanks!! I tried the link you gave me. It seems nothing is working… : D

    0_1504829279466_スクリーンショット 2017-09-08 09.03.31.png

    Any ideas?

    here’s my code:
    src/index.html

    	<!-- Google Tag Manager -->
    	<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    	new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    	j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    	'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    	})(window,document,'script','dataLayer','GTM-5RFM833');</script>
    	<!-- End Google Tag Manager -→
    

    main.js

    // G.A. Google Analytics
    import ga from './config/analytics.js'
    router.afterEach((to, from) => {
        ga.logPage(to.path, to.name, store.getters['user/id'])
    })
    

    Is there anything else I need to add?



  • That’s really strange. have a look at the rendered page in the browser and inspect the source if the script part for the Google Tag Manager is still there.


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.