angulartics / angulartics2

Vendor-agnostic analytics for Angular2 applications.
MIT License
1.01k stars 193 forks source link

Site content in google Analytics is empty (Google Tag Manager) #365

Open irux opened 4 years ago

irux commented 4 years ago

For support questions, please consider using Gitter - Chat

I'm submitting a ...

At the moment the "All Pages" section under the site content (Site Content -> All Pages) on google analytics is empty. It doesn't send any information. Here some pictures:

image

However I receive under the Events -> Pages the visited pages by the user: image

Here is a fraction of the code: app.component.ts :

export class AppComponent implements OnInit {
  constructor(private router: Router,
    private fbTrackingAnalytics:Angulartics2Facebook,
    private googleTrackingAnalytics : Angulartics2GoogleTagManager,
    ) {
    this.googleTrackingAnalytics.startTracking();
    this.fbTrackingAnalytics.startTracking();
  }

in index.html I have this tag:

<!-- 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', 'XXXXXXXX');</script>
  <!-- End Google Tag Manager -->

I have the following tags in google tag manager :

image

image

image

image

image

I think it is not the problem of the library but a misconfiguration on my side.

please run the following and copy the output

./node_modules/.bin/ng --version