Skip to content

Commit

Permalink
track click
Browse files Browse the repository at this point in the history
  • Loading branch information
0xelsherif committed Apr 3, 2024
1 parent 034f40d commit 9211c29
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ <h2>About Me</h2>
<div class="card">
<h3>Follow Me</h3>
<div class="socialmediaicons">
<a href="https://www.linkedin.com/in/0xelsherif/" class="fa fa-linkedin"></a>
<a href="https://github.com/0xelsherif" class="fa fa-github"></a>
<a href="https://www.hackerrank.com/profile/0xelsherif" class="fa fa-code"></a>
<a href="https://stackoverflow.com/users/23931990/0xelsherif" class="fa fa-stack-overflow"></a>
<a href="https://codepen.io/0xelsherif" class="fa fa-codepen"></a>
<a href="https://www.linkedin.com/in/0xelsherif/" class="fa fa-linkedin" onclick="trackClick('LinkedIn')"></a>
<a href="https://github.com/0xelsherif" class="fa fa-github" onclick="trackClick('github')"></a>
<a href="https://www.hackerrank.com/profile/0xelsherif" class="fa fa-code" onclick="trackClick('hackerrank')"></a>
<a href="https://stackoverflow.com/users/23931990/0xelsherif" class="fa fa-stack-overflow" onclick="trackClick('stackoverflow')"></a>
<a href="https://codepen.io/0xelsherif" class="fa fa-codepen" onclick="trackClick('codepen')"></a>

</div>

Expand Down Expand Up @@ -244,6 +244,12 @@ <h3>Follow Me</h3>
gtag('js', new Date());

gtag('config', 'G-HB3RTCNPYN');
function trackClick(linkName) {
gtag('event', 'click', {
'event_category': 'Link Click',
'event_label': linkName
});
}
</script>
</body>
</html>

0 comments on commit 9211c29

Please sign in to comment.