Title: Tracking visitor with google analytics
Last modified: September 1, 2016

---

# Tracking visitor with google analytics

 *  [pocornet](https://wordpress.org/support/users/pocornet/)
 * (@pocornet)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/tracking-visitor-with-google-analytics/)
 * In my website, the language is set “from different domains” and I would like 
   to track visitors of each language/domain in separate google analytics account.
   
   i find in polylang support this code to put in footer.php of my template but 
   it does not work
 *     ```
       if ('en_US' == get_locale()) {
       // tracking code for English
       }
       else {
       // tracking code for another language
       }
       ```
   
 * This shows results of the first code only
 * Do you have an other idea to track visitors of each language/domain
    Thanks for
   your help
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

Viewing 1 replies (of 1 total)

 *  [hugodebe](https://wordpress.org/support/users/hugodebe/)
 * (@hugodebe)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/tracking-visitor-with-google-analytics/#post-8178196)
 * Hi, I’m also looking for to set different properties in Google Analytics for 
   each language.
 * Do you have any progress with this conditional syntax to set a GA tracking code
   by language/domain?

Viewing 1 replies (of 1 total)

The topic ‘Tracking visitor with google analytics’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [hugodebe](https://wordpress.org/support/users/hugodebe/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/tracking-visitor-with-google-analytics/#post-8178196)
 * Status: not resolved