Skip to main content

Code Injection Snippets

Useful code snippets for Ghost (Header/Footer).

Google Analytics

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'GA_TRACKING_ID');
</script>

Custom CSS

<style>
.gh-head { background: #000; }
</style>