add goatcounter

This commit is contained in:
Rik Berkelder 2021-05-05 10:19:41 +02:00
parent 0b4ddff65b
commit f70729c774
2 changed files with 95 additions and 90 deletions

View File

@ -7,6 +7,7 @@
module.exports = {
/* Your site config here */
plugins: [
'gatsby-plugin-graphql-codegen',
'gatsby-plugin-react-helmet',
{
resolve: `gatsby-plugin-sass`,

View File

@ -15,6 +15,10 @@ const Layout: React.FC<{}> = (props) => {
{props.children}
</main>
</div>
{process.env.NODE_ENV === "production" ? (
<script data-goatcounter="https://riksolo-com.stats.riksolo.com/count"
async src="//riksolo-com.stats.riksolo.com/count.js"></script>
) : null}
</div>
)
};