Setting Up True Anthem Analytics Tag for Facebook Instant Articles & Google AMP

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

 


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, or TITLE.
  • These placeholders dynamically collect data for True Anthem reporting.
  • Replace CAMPAIGN_ID_CODE with 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:

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section