Facebook Instant Articles Configuration
To implement the True Anthem Javascript Analytics tag in Facebook Instant Article pages, embed the following code within the <body> of the Instant Article.
Note: This code is not supported in the header or footer.
<figure class="op-tracker">
<iframe>
<script>
(function (w, d, c) {
var s1 = d.getElementsByTagName('script')[0],
s = d.createElement('script');
s.src = '//tru.am/scripts/ta-pagesocial-sdk.js';
s.async = 1;
s.addEventListener('load', function () {
w.TRUE_ANTHEM.configure(c);
}, false);
s1.parentNode.insertBefore(s, s1);
}(window, document, 'CAMPAIGN_ID_CODE'));
</script>
</iframe>
</figure>Important Notes
-
Replace
CAMPAIGN_ID_CODEwith your implementation ID Code. - If you do not have this ID Code, contact support.
-
The ID Code is commonly a number such as
1234(example only—do not use this value).Facebook documentation:
Google AMP Configuration
To implement the True Anthem Javascript Analytics tag in Google AMP pages, embed the following code within the <body> of the Google AMP page.
<amp-pixel src="//beacon.tru.am/pageview?cid=CAMPAIGN_ID_CODE&canonical=CANONICAL_URL&ogURL=SOURCE_URL&referrer=DOCUMENT_REFERRER&search=AMPDOC_URL&title=TITLE" layout="nodisplay"></amp-pixel>
Important Notes
-
Paste this code exactly as provided—do not modify placeholders like
CANONICAL_URL,SOURCE_URL,DOCUMENT_REFERRER,AMPDOC_URL, orTITLE. - These placeholders dynamically collect data for True Anthem reporting.
-
Replace
CAMPAIGN_ID_CODEwith your implementation ID Code. - If you do not have this ID Code, contact support.
-
The ID Code is commonly a number such as
1234(example only—do not use this value).Google AMP documentation:
Comments
Please sign in to leave a comment.