Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Sep 16 10:16
    pasevin commented #318
  • Sep 13 05:44
    nigelsim edited #396
  • Sep 13 05:44
    nigelsim edited #396
  • Sep 13 05:44
    nigelsim opened #396
  • Sep 11 18:34
    dependabot[bot] labeled #395
  • Sep 11 18:34
    dependabot[bot] opened #395
  • Sep 11 18:34

    dependabot[bot] on npm_and_yarn

    chore(deps): bump node-fetch fr… (compare)

  • Sep 11 01:39
    nigelsim opened #394
  • Sep 10 15:14
    lmolteni commented #315
  • Sep 10 13:47
    lmolteni commented #315
  • Sep 10 13:46
    lmolteni commented #315
  • Sep 10 13:35
    lmolteni commented #315
  • Jul 24 09:05
    bvamos commented #315
  • Jul 24 08:59
    bvamos commented #387
  • Jul 23 12:10
    yaamoussa commented #230
  • Jul 16 19:32
    jaydiablo commented #393
  • Jul 16 16:09
    scttcper commented #393
  • Jul 15 19:03
    jaydiablo commented #393
  • Jul 15 18:34
    jaydiablo commented #393
  • Jul 15 18:01
    jaydiablo commented #393
I have the library for a new provider ready. How do I submit it? It's InnerTrends, a service I work for. The implementation was requested by a customer.
Ronald Fortmann Jr.
I am trying to install Angulartics 2 on an Angular4 Website but I don't which version to download ?
npm WARN angulartics2@6.2.0 requires a peer of @angular/common@>= 5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angulartics2@6.2.0 requires a peer of @angular/core@>= 5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angulartics2@6.2.0 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
This is the error log I get when I install the latest version
Hi all, I have recently setup angulartics2 and its working for the home page. I have got lazy routes and page tracking is not working for child pages. By the way, I am using angular 6. Can someone please help how to make it work for lazy routes.
Hey, Any chance there is a way to set the tracking id from the controller and not in the index.html? I'm looking to use a different tracking id depending on the env
Carsten Leue
I would like to use angulartics2 with the enhanced ecommerce plugin for GA. I realize the existence of the Angulartics2GoogleAnalyticsEnhancedEcommerce service.
One key aspect of angulartics2 is to be able to instrument the application independent of the underlying analytics product. How does this work for the enhanced ecommerce events? If I use the Angulartics2GoogleAnalyticsEnhancedEcommerce directly, then I am locking my components into GA. I would have expected an abstraction layer that shields the components from the knowledge of the actual analytics provider.
Does such an abstraction exist for the ecommerce APIs?
Sérgio Batista

Hey, I am trying to understand if my custom user properties with GA are not being accidentally unset.
On page load the custom dimensions are being properly set. Yet, I am seeing that on event track, my custom properties are being set to undefined with ga("set", "dimensionX", undefined).

After digging in the code, I see this is because Angulartics2GoogleAnalytics.setDimensionsAndMetrics() sets those to undefined whenever they are not passed through.
The issue I see, is that this method is being called up by the event track as well (in Angulartics2GoogleAnalytics.eventTrack(action, properties)), which passes the properties forward, but in this case I am not passing the custom properties, as they are USER and not HIT type.

Is this a reason of concern, does GA ignore these undefined and continues tracking with the previously set properties, or is this a bug?

Gautier P
Hello, are navigation paths supported by angulartics2 (for google analytics)? Since API pageTrack(path: string): void; is lacking previousPath: string parameter I'd say no, should I open a bug report for that or I did I miss something?
Hello. Is it possible to change default name of page view event tracked after importing Angulartics2GoogleTagManager in app.component? Rigth now its Page View and I need to change the name.
Cecil du Toit
Hello, I see in the 7.2.0 release from npm registry the Launch provider is missing but is available in the master branch. Is there a release coming soon with the Launch provider included?
Nick Wallace
hey all, getting an error on runtime with this plugin
AppComponent_Host.ngfactory.js? [sm]:1 ERROR Error: StaticInjectorError(AppModule)[RouterlessTracking]: 
  StaticInjectorError(Platform: core)[RouterlessTracking]: 
    NullInjectorError: No provider for RouterlessTracking!
    at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:3228)
    at resolveToken (core.js:3473)
    at tryResolveToken (core.js:3417)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:3314)
    at resolveToken (core.js:3473)
    at tryResolveToken (core.js:3417)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:3314)
    at resolveNgModuleDep (core.js:19784)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:20473)
    at injectInjectorOnly (core.js:1194)
Angular Cli 7 here
Mathias Ewald
@Fyb3roptik I am seeing the same issue and cannot find any help. Have you made any progress?
Opera 57.0.3098 (Mac OS X 10.13.6) AppComponent should have as title 'app' FAILED StaticInjectorError(Platform: core)[RouterlessTracking]: NullInjectorError: No provider for RouterlessTracking! error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ Function ], ngDebugContext: DebugContext_({ view: Object({ def: Object({ factory: Function, nodeFlags: 33669121, rootNodeFlags: 33554433, nodeMatchedQueries: 0, flags: 0, nodes: [ Object({ nodeIndex: 0, parent: null, renderParent: null, bindingIndex: 0, outputIndex: 0, checkIndex: 0, flags: 33554433, childFlags: 114688, directChildFlags: 114688, childMatchedQueries: 0, matchedQueries: Object({ }), matchedQueryIds: 0, references: Object({ }), ngContentIndex: null, childCount: 1, bindings: [ ], bindingFlags: 0, outputs: [ ], element: Object({ ns: '', name: 'app-root', attrs: [ ], template: null, componentProvider: Object({ nodeIndex: 1, parent: <circular reference: Object>, renderParent: <circular reference: Object>, bindingIndex: 0, outputIndex: 0, checkIndex: 1, flags: 114688, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: Object, matchedQueryIds: 0, references: Object, ngContentIndex: -1, childCount: 0, ... Error: StaticInjectorError(DynamicTestModule)[RouterlessTracking]: at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get node_modules/@angular/core/fesm5/core.js:8894:1) at resolveToken node_modules/@angular/core/fesm5/core.js:9139:1) at tryResolveToken node_modules/@angular/core/fesm5/core.js:9083:1) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get node_modules/@angular/core/fesm5/core.js:8980:1) at resolveToken node_modules/@angular/core/fesm5/core.js:9139:1) at tryResolveToken node_modules/@angular/core/fesm5/core.js:9083:1) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get node_modules/@angular/core/fesm5/core.js:8980:1) at resolveNgModuleDep node_modules/@angular/core/fesm5/core.js:21120:1)
Mathias Ewald
Does anyone know a way around this?
Nick Wallace
nope no progress
I am trying to exclude some routes like the example but I am getting an error when using --aot because regexp is not supported as an expression. is there a workaround? Angulartics2Module.forRoot({ pageTracking: { excludedRoutes: [ /\/[0-9]{4}\/[0-9]{2}\/[a-zA-Z0-9|\-]*/, '2017/03/article-title' ], } }), Getting an error Expression form not supported for the regexp.
Full-Stack Developer
Hi @oscarcortess_twitter, @alexzaytsev-newsroomly, I am having an issue integrating angulartics2 with Mixpanel. I added the JS snippet provided by Mixpanel to my index.html. But it's still saying "mixpanel.track is not a function at Angulartics2Mixpane" . Can you explain how you managed to integrate it?
Full-Stack Developer
Ah I figured that out.
Michael Gilroy
hi @scttcper I would like to use the application insights provider but there are no setup instructions on how to use this in the README. Could anyone give me some guidance as to how you are meant to setup and use this provider?

Hi, i'm trying to setup angulartics2 for our app using Matomo(Piwik) and I'd like to know how to configure it to let me track pages manually.

Also, I need to set it up to use a custom dimension and i'm not sure where this is set

Hi, I am trying to setup Angulartics2 for an Angular 4.3 app using Matomo. Going by the documentation mentioned in Github README section, the version seems to be mentioned incorrectly. The Rxjs needed to be 6 and above which is not supported by angular 4.3.
I have installed anglartics2 version: 4.6.3, typescript version: ~2.6, rxjs version: ^5.5.6. The build fails with error that Property 'startTracking'
does not exist on type 'Angulartics2Piwik'. On checking the source, it was confirmed that startTracking is not present. I also get Expected 1-2 arguments, but
got 0. for import of Angulartics2.forRoot() in the main module. The version conflicts have become a roadblock for me to proceed. Any help would b highly appreciated.
Marcus Lindstrøm Larsen
When you make an event, what can you replace the click part of "angulartics2On="click"" with? couldn't find any mention of it in the documentation
Dan Wellman

Hi all, I'm having a really hard time getting Angulartics2 to clear IDs from URLs in an Angular 6 app. I have the module configured in my app.module like this:

        pageTracking: {
            clearIds: true,
            idsRegExp: new RegExp('[0-9]{10}-[0-9]{6}')

The URLs containing the IDs I want to clear are in this format:


So the regex should work right? I'm using GTM and in my app.component I start the tracking:


PageViews are being tracked, but I am still seeing the IDs in the URLs. Please help, what I am doing wrong?

Dan Wellman
Also, the developerMode config doesn't appear to actually do anything
hi All, i have a big problem and cant send my event.
In GTM i created custom event with event name send_form, after i past this code in my component to send this even{ action: 'send_form', })
But it isnot work. what can I do?
Alessandro Tagliapietra

Hello everyone, I'm using google analytics (analytics.js), this is my setup:

      pageTracking: {
        clearIds: true,
  constructor(private router: Router, private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics) {
    if (environment.gaTrackingCode) {
const routes: Routes = [
  { path: 'login', component: LoginComponent },
  { path: 'posts/:id', children: [
    { path: '', pathMatch: 'full', redirectTo: 'home' },
    { path: ':tab', component: PostComponent }
  { path: '**', redirectTo: '/login' }

when I load any page it tracks a pageview, the problem is with the change of the :tab parameter nothing is tracked, is that expected?

Alessandro Tagliapietra
nvm found it , the router was triggering a NavigationCancel because I was double navigating
Joao Correia
hi! is there any way to change the event Page View to something customizable?
Igor Artasevych

Hi there!
Could anybody tried to change a Google Analytics transport to beacon?
How can I see in the documentation method ga("send") can be used in a couple of options.
In the first option it can get couple arguments and the last argument must be an options object, e.g.

ga('send', 'event', 'click', 'download-me', {transport: 'beacon'});

Or there is a different option how to use, e.g.

 ga('send', 'event', {
    eventCategory: 'Outbound Link',
    eventAction: 'click',
    transport: 'beacon'

But code in angulartics2 library like this

if ( {
    ga('send', 'event', eventOptions, {

and it looks like a mistake.

UPD. Using version v6.3.1


I was looking for a plugin to insert Twitter Pixel in a similar way that the Facebook does. But unfortunately I dod not find anything.

Does anyone how could be implemented? I haven't found docs to implement this.

Twitter docs:

Hi, has anyone encountered the following behavior - I'm using angular 7 with angulartics ^7.0.0 and piwik provider. Our router have the 'useHash' set (not html5 mode). When a user enters the app through the 'front gate' login, the page views are tracking correctly (ex., but when it's refreshed on a nested route, the url that gets sent becomes

Was hoping someone could help me with a Angulartics2/MixPanel question. A codebase I was working on was currently upgraded to Angular 8 and I currently went from Angulartics2 7.5.2 to 8.1.0. There is some legacy code in my component calling events similar to the example in the documentation:

      Click Me

However the events are no longer tracking in MixPanel but if I track with angulartics2Mixpanel.eventTrack(...) I can see the events firing. I’m wondering does the angulartics2On directive approach still work in the latest version? Is there something else I should be adding? If I’m using ngrx, should I have an action called “DownloadClick”? I’m out of options so hopefully someone can lend a hand

Hi All, just thought I’d follow up here in regards to my issue above. Is there anyone here successfully using the angulartics2Ondirective with version 8.1.0? Would it be possible to give me a little detail on how it was implemented? I can’t seem to get my events to fire and I feel like there is something really simple I’m missing.
vishal singh
Object(...) is not a function
in angulartics2
can someone help me to fix this issue
Shubhashish Verma
can anyone help on what are the other events angulartics2On can capture besides click? like 'component load'?
Hi Friends, can any one integrate the splunk with angular
can anyone help me on this
@svashish305_gitlab : Hi verma
can you please help me to integrate splunk
Hi everyone, I
I've managed to integrate GTM with angulartics2, but in the on real time tracking of google analytics I only see that every user is in route "/"
is this normal? I"ve set the trigger to history changes, not sure what could be wrong or if that's the expected behavior. Has anybody managed to configure google tag manager and analytics?
Cristian Avramescu
Hi guys, is there any way to make angulartics2 with GA works in places where there is no network? Storing stats in a local DB ?
Hi all, has anyone seen or tried an implementation of ELK stack provider?
Hi all, can someone please suggest on integration with Amplitude.
I have need to customise the way URLs are filtered and cleaned up. Specifically, I need some URLs to retain their query strings, while others need them removed. My solution to this is to refactor the Angulartics2 service to move matchesExcludedRoute and clearUrl into their own service, which I can then override in my application. Does this sound like an approach coherent with the Angulartics architecture. If so I'll put in a PR.