Title: Instant Articles google analytics article title
Last modified: October 26, 2016

---

# Instant Articles google analytics article title

 *  [therethere](https://wordpress.org/support/users/emotionaltrash/)
 * (@emotionaltrash)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/instant-articles-google-analytics-article-title/)
 * Hello there,
 * we have some issues on setting title on google analytics tracker so we can get
   the instant article title on google analytics.
 * Here what’s the code we are using:
 *  <!– START Google Analytics –>
    <script> (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]
   =r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
   a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.
   insertBefore(a,m) })(window,document,’script’,’[https://www.google-analytics.com/analytics.js&#8217](https://www.google-analytics.com/analytics.js&#8217);,’
   ga’);
 *  ga(‘create’, ‘UA-XXXXXXXX’, ‘auto’);
    ga(‘require’, ‘displayfeatures’); ga(‘
   set’, ‘campaignSource’, ‘Facebook’); ga(‘set’, ‘campaignMedium’, ‘Instant Articles’);
   var titleIA = ia_document.title; ga(‘send’, ‘pageview’, {title: ‘+titleIA+’});
 *  </script>
 * For some reason the variable titleIA is not working, any tips?
 * many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [wbinder](https://wordpress.org/support/users/wbinder/)
 * (@wbinder)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/instant-articles-google-analytics-article-title/#post-8363791)
 * The code I’m using:
 * <script>
    (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){(
   i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,
   m) })(window,document,’script’,’[https://www.google-analytics.com/analytics.js&#8217](https://www.google-analytics.com/analytics.js&#8217);,’
   ga’);
 *  var title = ia_document.title;
 *  ga(‘create’, ‘UA-xxx-x’, ‘auto’);
    ga(‘require’, ‘displayfeatures’); ga(‘set’,‘
   campaignSource’, ‘Facebook’); ga(‘set’, ‘campaignMedium’, ‘Social Instant Article’);
   ga(‘set’, ‘title’, title); ga(‘send’, ‘pageview’); </script>
 *  Thread Starter [therethere](https://wordpress.org/support/users/emotionaltrash/)
 * (@emotionaltrash)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/instant-articles-google-analytics-article-title/#post-8368906)
 * i’d set up that way but on publishing tools on facebook the instant articles 
   code still shows
 * ga(‘set’, ‘title’, title);
 * The title of the article don’t show up on the title variable 🙁
 *  [Jer Clarke](https://wordpress.org/support/users/jeremyclarke/)
 * (@jeremyclarke)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/instant-articles-google-analytics-article-title/#post-8871711)
 * I just added my own fresh solution to stack overflow and the github for this 
   plugin:
 * [https://github.com/Automattic/facebook-instant-articles-wp/issues/321](https://github.com/Automattic/facebook-instant-articles-wp/issues/321)
 * Unfortunately I don’t think it’s something they can fix on the plugin side, you
   need to look at those solutions and create your own code to paste in the plugin
   setting for analytics code.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Instant Articles google analytics article title’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/fb-instant-articles_8fa0a4.svg)
 * [Instant Articles for WP](https://wordpress.org/plugins/fb-instant-articles/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fb-instant-articles/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fb-instant-articles/)
 * [Active Topics](https://wordpress.org/support/plugin/fb-instant-articles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fb-instant-articles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fb-instant-articles/reviews/)

## Tags

 * [title](https://wordpress.org/support/topic-tag/title/)

 * 3 replies
 * 3 participants
 * Last reply from: [Jer Clarke](https://wordpress.org/support/users/jeremyclarke/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/instant-articles-google-analytics-article-title/#post-8871711)
 * Status: not resolved