Skip to content

Commit 542f9f9

Browse files
committed
added GA4 google analytics file
1 parent 41d1c71 commit 542f9f9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

google_analytics-GA4.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Google tag (gtag.js) -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EHKFWN7QXP"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', 'G-EHKFWN7QXP');
9+
</script>

ui.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ ui <- function(request){shinyUI(
8080
dashboardBody(
8181
useShinyjs(), #imp to use shinyjs functions
8282
tags$head(includeScript("google_analytics.js")),
83+
tags$head(includeHTML(("google_analytics-GA4.html"))),
8384

8485
tags$head(
8586
tags$link(rel = "stylesheet", type = "text/css", href = "./css/custom.css")

0 commit comments

Comments
 (0)