Skip to content

Commit 0db8099

Browse files
authored
Merge pull request #270 from valor-software/development
Update master
2 parents 6ff3a26 + 83fd773 commit 0db8099

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

apps/valor-software-site/src/app/app.component.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { filter, pairwise } from "rxjs/operators";
66
import { Subscription } from "rxjs";
77

88
const notFoundPageUrl = '/404';
9+
declare const gtag: any;
910

1011
@Component({
1112
selector: 'valor-software-site-base-root',
@@ -16,6 +17,7 @@ export class AppComponent implements OnDestroy, AfterViewInit {
1617
title = 'valor-software-site';
1718
scrollPosition = 0;
1819
$routeEvents?: Subscription;
20+
$gaRouteEvents?: Subscription;
1921
$routerEventNavigationEnd: Subscription;
2022
showFooterAndHeader = true;
2123

@@ -45,6 +47,7 @@ export class AppComponent implements OnDestroy, AfterViewInit {
4547
}
4648

4749
ngAfterViewInit() {
50+
this.handleGoogleAnalyticsTracking();
4851
setTimeout(() => {
4952
if (this.scrollPosition) {
5053
this.scrollToPosition(this.scrollPosition);
@@ -77,5 +80,22 @@ export class AppComponent implements OnDestroy, AfterViewInit {
7780
ngOnDestroy() {
7881
this.$routeEvents?.unsubscribe();
7982
this.$routerEventNavigationEnd?.unsubscribe();
83+
this.$gaRouteEvents?.unsubscribe();
8084
}
85+
86+
private handleGoogleAnalyticsTracking(): void {
87+
let configured = false;
88+
this.$gaRouteEvents = this.router.events.subscribe((event) => {
89+
if (event instanceof NavigationEnd) {
90+
if(!configured){
91+
gtag('config', 'UA-73071494-2', { send_page_view: false });
92+
configured = true;
93+
}
94+
gtag('event', 'page_view', {
95+
page_location: window.location.href,
96+
page_path: event.urlAfterRedirects,
97+
});
98+
}
99+
});
100+
}
81101
}

apps/valor-software-site/src/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
window.dataLayer = window.dataLayer || [];
2626
function gtag(){dataLayer.push(arguments);}
2727
gtag('js', new Date());
28-
29-
gtag('config', 'UA-73071494-2');
3028
</script>
3129
<script type="text/javascript">
3230
window.onload = function () {

libs/route-pages/press-release/src/press-release.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h1 class="text-light_title_col text-40 font-bold lg:w-10/12">Rspack: The Rust-B
2626

2727
<p class="The docs put us on a clear migration path, and Rspack itself came with the right level of ecosystem backwards compatibility, so it only took an afternoon to get it up and running."></p>
2828

29-
<p>We can’t wait to see Rspack also make it to the hands of Netlify customers and speed up their development workflows!" Kaelig Deloumeau-Prigent, principal software engineer at Netlify when highlighting the benefits of Rspack."</p>
29+
<p>We can’t wait to see Rspack also make it to the hands of Netlify customers and speed up their development workflows!"</p>
3030
</quote>
3131

3232
<p>Rspack offers developers a new and innovative solution for web bundling, combining multi-threaded high performance with webpack interoperability. </p>

0 commit comments

Comments
 (0)