Title: Option for two tracking IDs?
Last modified: September 1, 2016

---

# Option for two tracking IDs?

 *  Resolved [stevenorrca](https://wordpress.org/support/users/stevenorrca/)
 * (@stevenorrca)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/option-for-two-tracking-ids/)
 * I have a normal GA property and a roll-up property, so I need to be able to include
   two (at least) Tracking IDs in the code snippet. The end result can include something
   like:
 *     ```
       _gaCustom('create', 'UA-#######-##', {
         'cookieDomain': 'auto',
         'cookieName': '_gaCustomC',
         'name': 'main'
         });
         _gaCustom('create', 'UA-#######-##', {
           'cookieDomain': 'auto',
           'cookieName': '_gaCustomC',
           'name': 'rollup'
         });
         _gaCustom('main.send', 'pageview');
         _gaFSLib('rollup.send', 'pageview');
       ```
   
 * You willing to add one more optional field to the form?
 * [https://wordpress.org/plugins/pc-google-analytics/](https://wordpress.org/plugins/pc-google-analytics/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Praveen Chauhan](https://wordpress.org/support/users/praveenchauhan1984/)
 * (@praveenchauhan1984)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/option-for-two-tracking-ids/#post-7684418)
 * Hi Steve,
 * I have not added the option of 2 tracking ids because generally people do not
   need it and it will create confusion for 99% of the users. But if you want to
   have more more than one tracking id then follow the instructions below
 * Find this
 * <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’,’//www.google-analytics.com/analytics.js’,’ga’);
 *  ga(‘create’, ‘<?php echo esc_attr( get_option(‘pcga_google_analytics_id’) );?
   >’, ‘auto’);
    ga(‘send’, ‘pageview’);
 *  </script>
 * and replace it with
 * <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’,’//www.google-analytics.com/analytics.js’,’ga’);
 *  ga(‘create’, ‘<?php echo esc_attr( get_option(‘pcga_google_analytics_id’) );?
   >’, ‘auto’);
 *  ga(‘send’, ‘pageview’);
 *  ga(‘create’, ‘UA-XXXXXXXX-X’, {‘name’:’b’});
    ga(‘b.send’, ‘pageview’);
 *  </script>
 * In this code replace UA-XXXXXXXX-X with your second tracking id .
 * You can add me on skype @ chauhansaab if you still have some problem.

Viewing 1 replies (of 1 total)

The topic ‘Option for two tracking IDs?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/pc-google-analytics_c4aa96.svg)
 * [Google Analytics](https://wordpress.org/plugins/pc-google-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pc-google-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pc-google-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/pc-google-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pc-google-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pc-google-analytics/reviews/)

## Tags

 * [Multiple IDs](https://wordpress.org/support/topic-tag/multiple-ids/)

 * 1 reply
 * 2 participants
 * Last reply from: [Praveen Chauhan](https://wordpress.org/support/users/praveenchauhan1984/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/option-for-two-tracking-ids/#post-7684418)
 * Status: resolved