Title: Google Analytics Code breaks Mobile Site When using HTTPS
Last modified: October 25, 2017

---

# Google Analytics Code breaks Mobile Site When using HTTPS

 *  [lunarbaby](https://wordpress.org/support/users/lunarbaby/)
 * (@lunarbaby)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/)
 * Hi there,
 * I am at a loss, i’ve spent months trying to find a solution to this strange issue.
 * **Site Details**:
    WP version: WordPress 4.8.2 Theme: Econo theme. Host: SiteGround
 * ===============================
    **Issue: Google Analytics Code Breaking Mobile
   site running over HTTPS.**
 * – My client moved his website to SiteGround earlier this year. The site worked
   fine on both desktop and mobile.
    – He had SiteGround convert his site to run
   over HTTPS. – Now his site does not work on mobile (this video shows what happens
   on mobile: [https://youtu.be/Dl-H8kdUIO8](https://youtu.be/Dl-H8kdUIO8) )
 * **What I’ve Discoverd:**
    – I made sure all mix-content issues were fixed and
   confirmed that the SSL was correct. – I deactivated plugins 1 by one and found
   that Monster Insights appeared to be the culprite.
 * – I deactivated ALL plugins and reactived Monster Insights – the issue still 
   persisted.
    – The client wanted google analytics reporting, so i manually installed
   the google analytics code into the head of the wp header.php file. – This led
   me to discovering that it is the actual Google Analytics code that is causing
   the issue on mobile – I tried putting the code in the footer – this did not fix
   it.
 * I can’t imagine where the conflict is or why it works fine on http but not on
   https IT does appear to be specific to the Econos Theme Unfortunately, the theme
   has been removed from Envato and thus no support – hence my desperate call for
   help :).
 * Any insights would be greatly appreciated.
 * Thanks,
    Trish
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgoogle-analytics-code-breaks-mobile-site-when-using-https%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9620539)
 * Are you using any one of theses plugins: [https://wordpress.org/plugins/search/Google+Analytics/](https://wordpress.org/plugins/search/Google+Analytics/)
 * If so, what’s the full name of the plugin?
 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9620625)
 * Hi [@lunarbaby](https://wordpress.org/support/users/lunarbaby/),
 * I read your post and I watched the video… but I’m not sure what you’re referring
   to.
 * Does the page not open at all, or are you referring to the large margins when
   viewed on mobile?
 * Just for your information, the given link displayed on my smartphones, albeit
   with the large margins. Tested on three different Android devices and iPad — 
   all opened.
 * Here is one screenshot:
 * ![](https://i0.wp.com/i.imgur.com/EcFL5Xc.png?ssl=1)
 *  Thread Starter [lunarbaby](https://wordpress.org/support/users/lunarbaby/)
 * (@lunarbaby)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9620680)
 * [@t-p](https://wordpress.org/support/users/t-p/) – thanks for your response. 
   I’ve tried the following plugins – all produce page not loading issue in mobile
   browser:
 * – Google Analytics for WordPress by MonsterInsights
    – Google Analytics Dashboard
   for WP (GADWP) – Analytify
 * – i removed all of those and manually installed GA into head of wp header.php
   file.
 * [@gappiah](https://wordpress.org/support/users/gappiah/) Thanks for your reply.
   Thie issue is the page stops loading. If you watch the video i supplied you’ll
   see that i clear my cache, navigate to the website and then the page just gets
   stuck and wont load and you can’t click.
 * I created a test install to hack up – that is where i currently have the GA code
   installed: [http://distributiondesign.com/site2017v2/](http://distributiondesign.com/site2017v2/)–
   I’ve removed the GA code from the “real” website (distributiondesign.com).
 * Thanks again for your replies!
    Trish
    -  This reply was modified 8 years, 5 months ago by [lunarbaby](https://wordpress.org/support/users/lunarbaby/).
 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9620732)
 * > I created a test install to hack up – that is where i currently have the GA
   > code installed: [http://distributiondesign.com/site2017v2/](http://distributiondesign.com/site2017v2/)–
   > I’ve removed the GA code from the “real” website (distribution.com).
 * Yes, I visited `https://distributiondesign.com/site2017v2/` . I simply tapped
   on the link in the forum, and it opened on all my devices. I just tried again,
   reloaded multiple times, and it opened on all my devices all the time.
 * Here’s another screenshot in landscape mode, showing the full URL:
 * ![](https://i0.wp.com/i.imgur.com/W0l4Ovb.png?ssl=1)
 *  Thread Starter [lunarbaby](https://wordpress.org/support/users/lunarbaby/)
 * (@lunarbaby)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9620770)
 * [@gappiah](https://wordpress.org/support/users/gappiah/) – so crazy! I’ve tested
   this on multiple devices – my customer has tested on his phone – his daughter
   on her phone….I thought maybe it’s a cache issue with network provider vs a website
   issue. But his daughter is in CA. I’m just baffled. I’ve purged the cache, cleared
   browser cache and still the site has issues. I just tested again and it just 
   wont load. And the kicker is, when i removed the google analytics code. The mobile
   site loads perfectly for me.
 * Thanks very much for your time – truly appreciated!
 *  [Vince K-1](https://wordpress.org/support/users/vincek1/)
 * (@vincek1)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9626259)
 * I was able to replicate the loading issue only on an iPhone using both the default
   Safari browser as well as a Chrome browser. I was not able to replicate this 
   issue on a Samsung Android tablet, either on the native browser app or Chrome.
 * When I was able to replicate the issue on the iPhone, the behavior of its attempt
   to load the Contact page was similar to what happens when you have a redirect
   loop issue (though it never came up with that error message). It attempted to
   reload the page multiple times in quick succession, judging by the behavior of
   the progress bar across the top. When I stopped the behavior and reloaded the
   URL, it was able to load the page successfully without any pause or “redirect
   loop” behavior.
 * Perhaps you can check with SiteGround support to see if there are any hidden 
   errors in their HTTPS enablement that would cause an HTTPS redirect loop situation
   in limited circumstances.
 * Hope this helps!
    – Vince
 *  Thread Starter [lunarbaby](https://wordpress.org/support/users/lunarbaby/)
 * (@lunarbaby)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9652644)
 * [@vincek1](https://wordpress.org/support/users/vincek1/) – Vince – thank you 
   for taking the time to check this out. I will definitely inquire with SiteGround.
   When this issue first happened, they were quick to deny any issues on their part
   and directed me on a wild goose chase. Thanks again for your time and suggestion!!
   🙂 – Trish

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

The topic ‘Google Analytics Code breaks Mobile Site When using HTTPS’ is closed 
to new replies.

## Tags

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

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 7 replies
 * 4 participants
 * Last reply from: [lunarbaby](https://wordpress.org/support/users/lunarbaby/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/google-analytics-code-breaks-mobile-site-when-using-https/#post-9652644)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
