Skip to content

Commit

Permalink
added google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
enochval committed Jun 17, 2024
1 parent 83ce5f3 commit 097de07
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 75 deletions.
52 changes: 16 additions & 36 deletions views/guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@
<script>
hljs.initHighlightingOnLoad()
</script>
<title>JSONPlaceholder - Fake online REST API for developers</title>
<title>GraphQLPlaceholder - Fake online GraphQL API for developers</title>
</head>

<body>
<header>
<div class="announcement">
This service is maintained and provided for free, please consider
supporting it on
<a href="https://github.com/users/typicode/sponsorship">GitHub Sponsors</a>
<a href="https://github.com/users/enochval/sponsorship">GitHub Sponsors</a>
❤️
</div>
<nav class="container">
<ul>
<li><a href="/">JSONPlaceholder</a></li>
<li><a href="/guide.html">Guide</a></li>
<li><a href="https://github.com/typicode">GitHub</a></li>
<li>
<a href="https://my-json-server.typicode.com">My JSON Server</a>
</li>
</ul>
<ul>
<li><a href="/">QraphQLPlaceholder</a></li>
<li><a href="/guide">Guide</a></li>
<li>
<a href="https://graphqlplaceholder.vercel.app/graphql" target="_blank">GraphQL Playground</a>
</li>
<li><a href="https://github.com/enochval">GitHub</a></li>
</ul>
</nav>
</header>

Expand Down Expand Up @@ -214,33 +214,13 @@ <h3 id="nestedresources">Nested resources</h3>
</footer>

<!-- Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KVHZHCH0EW"></script>
<script>
; (function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r
; (i[r] =
i[r] ||
function () {
; (i[r].q = i[r].q || []).push(arguments)
}),
(i[r].l = 1 * new Date())
; (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0])
a.async = 1
a.src = g
m.parentNode.insertBefore(a, m)
})(
window,
document,
'script',
'//www.google-analytics.com/analytics.js',
'ga',
)
ga('create', 'UA-44497010-1', 'typicode.com')
ga('send', 'pageview')
var trackOutboundLink = function (url) {
ga('send', 'event', 'outbound', 'click', url, {
transport: 'beacon',
})
}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-KVHZHCH0EW');
</script>

<script src="//cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.min.js"></script>
Expand Down
59 changes: 20 additions & 39 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ <h1>
</h1>

<p class="subtitle">
{{!-- Fake Online GraphQL API for Testing and Prototyping --}}
<!-- Fake Online GraphQL API for Testing and Prototyping -->
Your Sandbox for Seamless GraphQL Testing and Prototyping
{{!-- <br> <b>Serving ~350M requests per month</b> --}}
<!-- <br> <b>Serving ~350M requests per month</b> -->
<br> Powered by
<a href="https://jsonplaceholder.typicode.com" target="_blank">JSONPlaceholder</a>
{{!-- +
<a href="https://github.com/typicode/lowdb">LowDB</a> --}}
<!-- +
<a href="https://github.com/typicode/lowdb">LowDB</a> -->
</p>

{{!-- <p>
<!-- <p>
<a href="https://www.patreon.com/bePatron?c=784328">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="217">
</a>
</p> --}}
</p> -->
</div>
</div>

Expand Down Expand Up @@ -281,13 +281,13 @@ <h2>Use your own data</h2>
<footer>
<div class="container">
<div style="margin-bottom: 2rem;">
<!-- <a href="https://www.patreon.com/bePatron?c=784328"> -->
<!-- <img -->
<!-- src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" -->
<!-- width="217" -->
<!-- /> -->
<!-- </a> -->
<a href="https://github.com/users/typicode/sponsorship">
<!-- <a href="https://www.patreon.com/bePatron?c=784328">
<img
src="/become_a_patron_button.png"
width="217"
/>
</a> -->
<a href="https://github.com/users/enochval/sponsorship">
<i class="fab fa-github-alt"></i>
<strong>Sponsor this project on GitHub</strong>
</a>
Expand All @@ -302,33 +302,14 @@ <h2>Use your own data</h2>
</footer>

<!-- Analytics -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KVHZHCH0EW"></script>
<script>
; (function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r
; (i[r] =
i[r] ||
function () {
; (i[r].q = i[r].q || []).push(arguments)
}),
(i[r].l = 1 * new Date())
; (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0])
a.async = 1
a.src = g
m.parentNode.insertBefore(a, m)
})(
window,
document,
'script',
'//www.google-analytics.com/analytics.js',
'ga',
)
ga('create', 'UA-44497010-1', 'typicode.com')
ga('send', 'pageview')
var trackOutboundLink = function (url) {
ga('send', 'event', 'outbound', 'click', url, {
transport: 'beacon',
})
}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-KVHZHCH0EW');
</script>

<script src="//cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.min.js"></script>
Expand Down

0 comments on commit 097de07

Please sign in to comment.