No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Google analytics

    Framework
    1
    2
    822
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rbocharov last edited by

      Hello, I’m trying to add Google analytics following the guide http://beta.quasar-framework.org/guide/managing-google-analytics.html

      However, I’m getting ‘dataLayer’ is not defined in analytics.js file. I see it is mentioned in index.html file. How do I import/define it properly?

      Thanks, Roman

      1 Reply Last reply Reply Quote 0
      • R
        rbocharov last edited by

        Ok, I have resolved it - to access dataLayer object you need to write:

        window.dataLayer

        So in index.html you include the GTM code and in analytics.js you write window.dataLayer instead of just dataLayer

        1 Reply Last reply Reply Quote 1
        • First post
          Last post