This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
choco install sqlite | |
sqlite3 grafana.db 'PRAGMA journal_mode=wal;' | |
az login | |
az storage copy -s .\grafana.db -d https://<storage_account>.file.core.windows.net/<file_share> --subscription <subscription_name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { BasePageComponent } from '../base-page/base-page.component'; | |
@Component({ | |
selector: 'app-first-page', | |
templateUrl: './first-page.component.html', | |
styleUrls: ['./first-page.component.scss'] | |
}) | |
export class FirstPageComponent extends BasePageComponent implements OnInit { | |
private _clickCnt = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { GoogleAnalyticsService } from '../google-analytics.service'; | |
@Component({ | |
template: '', | |
}) | |
export class BasePageComponent implements OnInit { | |
constructor(protected $gaService: GoogleAnalyticsService) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { GoogleAnalyticsService } from '../google-analytics.service'; | |
@Component({ | |
selector: 'app-first-page', | |
templateUrl: './first-page.component.html', | |
styleUrls: ['./first-page.component.scss'] | |
}) | |
export class FirstPageComponent implements OnInit { | |
private _clickCnt = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logEvent(event, category, label, value) { | |
gtag('event', event, { | |
event_category: category, | |
event_label: label, | |
value: value | |
}); | |
console.log('gtag event captured...'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { GoogleAnalyticsService } from './google-analytics.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent implements OnInit { | |
title = 'Google Analytics Service'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppRoutingModule } from './app-routing.module'; | |
import { AppComponent } from './app.component'; | |
import { GoogleAnalyticsService } from './google-analytics.service'; | |
@NgModule({ | |
declarations: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Router, RouterEvent, NavigationEnd } from '@angular/router'; | |
import { filter } from 'rxjs/operators'; | |
import { environment } from '../environments/environment'; | |
declare var gtag: any; | |
@Injectable({ | |
providedIn: 'root' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-173474946-1"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'UA-173474946-1'); | |
</script> |
NewerOlder