-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ node_modules | |
/.svelte-kit | ||
/package | ||
/dist | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
.vercel | ||
.vscode/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<svg class="h-12 mx-auto mb-3 text-gray-400 dark:text-gray-600" viewBox="0 0 24 27" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<script lang="ts"> | ||
export let svgCls: string = 'h-12 mx-auto mb-3 text-gray-400 dark:text-gray-600' | ||
</script> | ||
<svg class="{svgCls}" viewBox="0 0 24 27" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z" fill="currentColor" /> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts"> | ||
export let analyticsId:string; | ||
$: { | ||
const script = document.createElement('script'); | ||
script.innerHTML = ` | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag() { dataLayer.push(arguments); } | ||
gtag('js', new Date()); | ||
gtag('config', '${analyticsId}'); | ||
`; | ||
document.head.appendChild(script); | ||
}; | ||
</script> | ||
|
||
<svelte:head> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={analyticsId}"></script> | ||
</svelte:head> | ||
{#if !analyticsId} | ||
<h2>You need to provide your Google Analytics ID, "ANALYTICS_ID", in .env file.</h2> | ||
<p>Please read the <a href="https://runatics.codewithshin.com/">docs</a> how to set it up.</p> | ||
{/if} |