WP Native Articles can automatically add the correct tracking code for multiple Analytics services. Navigate to the Analytics sub menu and enable the services you wish to include. Once a service is enabled you'll be given the option to enter your custom ID for that service. You can enable as many services as you like.

Supported analytics services:

  • Google Analytics
  • Google Site Tag
  • Jetpack
  • Simple Reach
  • Chartbeat
WP Native Articles will automatically work with the official WordPress plugins for all these services. If you have any of the official plugins active we'll use the settings from that plugin by default.
Custom Analytics

The custom analytics box is a free form textarea, meaning you can add as many or as few analytics scripts as you like. They will automatically be wrapped in a <figure class="op-tracker"> tag to make them compatible for Instant Articles.

Google Analytics

You can use the code to add Google Analytics to your Instant Articles. Don't forget to replace YOUR-ANALYTICS-ID with your actual Google Analytics ID

          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          ga('create', 'YOUR-ANALYTICS-ID', 'auto');
          ga('require', 'displayfeatures');
          ga('set', 'campaignSource', 'Facebook');
          ga('set', 'campaignMedium', 'Social Instant Article');
          ga('send', 'pageview', {title: ia_document.title});

Analytics Custom Post Dimensions

As of v1.3.4 you can now use certain post placeholders in your Analytics code.

For example, if you wanted to associated posts with your authors in Google Analytics and you'd set it up as dimension, you could add the following code to your Google Analytics.

          ga('set', 'dimension1', '{post_author_id}');

Analytics Placeholders