Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Google Analytics visitor drop-off after upgrading to Universal Analytics

Posted on 2014-03-16
7
Medium Priority
?
685 Views
Last Modified: 2016-02-24
My average daily visits reported by Google Analytics has been around 70/day. I implemented the Universal Analytics upgrade tracking code on Mar. 11.  That day, the visits dropped to ~50% of normal, and since then, it has been less than 10 per day.  In my account, Analytics reports that data is being received.  I'll include the code below.
There is a <script> tag which seems redundant.  However, if I  omit that tag, or change it to include the script type, the page freezes.  If I don't include an extra tag which specifies the script type, the code doesn't validate.  So I enclosed the tracking code as CData.Image1.jpg
<!-- Google Analytics -->
<script type="text/javascript">
//<![CDATA[
  <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', 'UA-10865704-2', 'mauitradewinds.com');
  ga('send', 'pageview');
//]]>  
</script>
<!-- End Google Analytics -->
0
Comment
Question by:ddantes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39933306
What happens when you try just script tags.  Otherwise you have
<script type="text/javascript"><script> and that does not look right.
  <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', 'UA-10865704-2', 'mauitradewinds.com');
  ga('send', 'pageview');

</script>

Open in new window

0
 

Author Comment

by:ddantes
ID: 39933311
Thank you for your comment. With just <script> tags, W3C validates the code, but Expression Web objects that a script type attribute is required.

In any case, how would you explain the drop-off in visitor count, immediately after implementing the Universal Tracking code?  If the visitor count had dropped to zero, I would say "it isn't tracking".   But it's a finite number, just very low.
0
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 1000 total points
ID: 39933333
Then don't worry about expression web.  You only need to make sure it is valid and counting.

I thought Expression Web was no longer as of 2012?  Things change fast.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:ddantes
ID: 39933335
OK, I'll change the code and see if it affects the tracking data.  Thanks for your input.

I'm using Expression Web, although it may no longer be supported.  It's difficult for me to learn a new program every few years, once I'm comfortable and competent with something!

I neglected to say that W3C only validates the code if it is surrounded by CData.
0
 

Author Comment

by:ddantes
ID: 39933507
This issue was resolved by removing the tracking code from html, and placing it in a separate js file.  Analytics is actively tracking, and the web pages being tracked are validated by W3C.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39933531
That solves one problem as a workaround for expression web but creates another issue in you are making another call to webserver.  If you are loading other js files, you can simply place your analytics code with another js file.

Since you are having to create workarounds in your code to accommodate an outdated web authoring tool, take a look at http://www.jetbrains.com/webstorm/ or http://www.sublimetext.com.  If you want to stick with something that has a lot of drag and drop features, dreamweaver is probably the best way to go.   If you can get used to previewing your html in an actual browser, I think you will see using sublimetext or webstorm is really easy to use.  I used to use dreamweaver, then sublime and now phpstorm (same has webstorm with php support).
0
 

Author Comment

by:ddantes
ID: 39933563
Thank you for those recommendations!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question