1.6K members online now
1.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Both urls are being output to page.

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭
The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 42.1KiB.

The code snippet I believe is causing this:


<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-43332862-1']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src=('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

Site is on wordpress. The inspector console shows

in the header and the ssl url in the footer. Also the header ga.js returns "undefined". 

1 Expert replyverified_user

Both urls are being output to page.

Top Contributor
# 2
Top Contributor



The above code is for the outdated classic analytics. I would suggest you to replace it with the Universal Analytics tracking code. You can find the Universal Analytics tracking code in Admin -> Property -> Tracking Info -> Tracking Code.


Check the document below for more details about adding analytics to a website:


For Wordpress I'd recommend using a plugin like


Make sure you remove the old tracking code in order to avoid tracking duplicate pageviews.


Hope this helps, let me know if you have questions.



Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Both urls are being output to page.

Visitor ✭ ✭ ✭
# 3