Skip to content

Instantly share code, notes, and snippets.

Created Nov 27, 2017
What would you like to do?
Google Analytics Global Site Tag (gtag.js) for Facebook Instant Articles (Full Snippet)
<figure class="op-tracker">
<script async="async" src=""></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('set', 'page_title', 'FBIA: '+ia_document.title);
gtag('set', 'campaignSource', 'Facebook');
gtag('set', 'campaignMedium', 'Social Instant Article');
gtag('config', 'UA-XXXXXXXX-X');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment