Title: [Plugin: Google Analytics for WordPress] customcode before trackPageview?
Last modified: August 20, 2016

---

# [Plugin: Google Analytics for WordPress] customcode before trackPageview?

 *  [Ben Huson](https://wordpress.org/support/users/husobj/)
 * (@husobj)
 * [14 years ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-customcode-before-trackpageview/)
 * I need to track to multiple accounts. The examples I have found say to do that
   like this:
 * _gaq.push([‘_setAccount’,’UA-XXXXXX-1′]);
    _gaq.push([‘_trackPageview’]); _gaq.
   push([‘b._setAccount’,’UA-XXXXXX-2′]); _gaq.push([‘b._trackPageview’]);
 * I can input the second bit of tracking code in the ‘customcode’ field but it 
   then outputs it in this order:
 * _gaq.push([‘_setAccount’,’UA-XXXXXX-1′]);
    _gaq.push([‘b._setAccount’,’UA-XXXXXX-
   2′]); _gaq.push([‘b._trackPageview’]); _gaq.push([‘_trackPageview’]);
 * Does anyone know wether this works or wether it would cause any issues?
 * [http://wordpress.org/extend/plugins/google-analytics-for-wordpress/](http://wordpress.org/extend/plugins/google-analytics-for-wordpress/)

The topic ‘[Plugin: Google Analytics for WordPress] customcode before trackPageview?’
is closed to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Ben Huson](https://wordpress.org/support/users/husobj/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-customcode-before-trackpageview/)
 * Status: not resolved