Skip to content

Commit

Permalink
Merge pull request #31 from Mattolo4/develop
Browse files Browse the repository at this point in the history
counter
  • Loading branch information
Mattolo4 committed Aug 29, 2024
2 parents 09878ec + ec18777 commit c1c3a62
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -488,17 +488,15 @@ <h4>Linkedin</h4>


<!-- Visit Counter section -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9QT0BDN1XE"></script>
<script>
fetch('https://api.countapi.xyz/hit/mattolo4/visits')
.then(response => response.json())
.then(data => {
console.log("Total Visits:", data.value); // This logs the count to the browser's console
document.getElementById('visits').innerText = data.value;
});
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

gtag('config', 'G-9QT0BDN1XE');
</script>
<!-- Hidden Visit Counter -->
<p style="display:none;">Visite totali: <span id="visits"></span></p>

</main>

<!-- Footer -->
Expand Down

0 comments on commit c1c3a62

Please sign in to comment.