Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve google analytics send #3

Open
wants to merge 1 commit into
base: improve_snow_component
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions frontend/src/app/project/pages/board/board.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,44 @@
<div class="text-2xl font-medium">Kanban board</div>
<div class="social-links">
<a href="https://www.buymeacoffee.com/tuantrungvo"
targetClick
targetEventName="Support buymeacoffee"
target="_blank"
rel="noopener">
<j-button className="btn-secondary mr-2"> 🍺 Support
</j-button>
</a>

<a href="https://github.com/trungk18/angular-spotify"
targetClick
targetEventName="Spotify"
target="_blank"
rel="noopener">
<j-button className="btn-secondary mr-2"> 🎧 Spotify
</j-button>
</a>

<a href="https://tetris.trungk18.com/"
targetClick
targetEventName="Tetris"
target="_blank"
rel="noopener">
<j-button className="btn-secondary mr-2"> 🎮 Tetris
</j-button>
</a>

<a href="https://jira-storybook.trungk18.com/"
targetClick
targetEventName="Storybook"
target="_blank"
rel="noopener">
<j-button className="btn-secondary mr-2"> 📕 Storybook
</j-button>
</a>

<a href="https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Ftrungk18%2Fjira-clone-angular&text=Awesome%20Jira%20clone%20app%20built%20with%20Angular%209%20and%20Akita&hashtags=angular,akita,typescript"
(click)="sendTwitterEventButton()"
targetClick
targetEventName="Share Twitter"
target="_blank"
rel="noopener"
class="mr-2">
Expand All @@ -46,6 +55,8 @@
</j-button>
</a>
<a href="https://github.com/trungk18/jira-clone-angular"
targetClick
targetEventName="Source Code"
target="_blank"
rel="noopener">
<j-button className="btn-secondary"
Expand All @@ -57,4 +68,4 @@

<board-filter></board-filter>
<board-dnd></board-dnd>
</div>
</div>
12 changes: 3 additions & 9 deletions frontend/src/app/project/pages/board/board.component.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import { Component } from '@angular/core';
import { GoogleAnalyticsService } from '@trungk18/core/services/google-analytics.service';
import {ChangeDetectionStrategy, Component} from '@angular/core';

@Component({
selector: 'board',
templateUrl: './board.component.html',
styleUrls: ['./board.component.scss']
styleUrls: ['./board.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class BoardComponent {
breadcrumbs: string[] = ['Projects', 'Angular Jira Clone', 'Kanban Board'];

constructor(private _googleAnalytics: GoogleAnalyticsService) {}

sendTwitterEventButton() {
this._googleAnalytics.sendEvent('Share Twitter', 'button');
}
}
2 changes: 2 additions & 0 deletions frontend/src/app/project/project.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ import { FullIssueDetailComponent } from './pages/full-issue-detail/full-issue-d
import { SettingsComponent } from './pages/settings/settings.component';
import { ProjectRoutingModule } from './project-routing.module';
import { ProjectComponent } from './project.component';
import { TargetClickDirective } from '@trungk18/core/directives/target-click.directive';

@NgModule({
declarations: [
AutofocusDirective,
TargetClickDirective,
...NavigationComponents,
...BoardPageComponents,
...IssueUtilComponents,
Expand Down