与piwik的angulartics2跟踪一个双倍的网址#

时间:2018-03-22 17:31:49

标签: analytics angular5 matomo angulartics2

我已经在我的角度5应用程序中集成了angulartics2和Piwik。在观察到跟踪的网址后,我在Piwik管理模块中成功找到了网址跟踪,发现http://localhost:4200/#/app/#/app/main-route/sub-route

以下是根据演示使用的代码

  1. 在index.html中添加了带有_paq语句的Piwik跟踪代码评论
  2. 在app.module.ts

    @NgModule({
         imports : [Angulartics2Module.forRoot([Angulartics2Piwik])]
    });
    
  3. 在app.component.ts

    export class AppComponent implements OnInit{
        constructor(private angulartics2: Angulartics2) {
        }
    }
    
  4. 任何人都可以知道为什么会这样吗?

    提前致谢。 桑帕特

0 个答案:

没有答案