Select to view content in your preferred language

Google Analytics for Intranet Flex Viewer Site?

2698
5
06-21-2014 04:15 PM
TimHayes
Frequent Contributor
Any idea how to use Google Analytics for an Intranet-based Flex Viewer site?

I would like to know of a good way to track how many hits our map viewer page receives and when the hits occur (time of day, etc...).  I heard Google Analytics is a good idea.
Tags (2)
0 Kudos
5 Replies
BjornSvensson
Esri Regular Contributor
You could add the Google Analytics snippet to the index.html and default.htm files in the flex viewer folder.
0 Kudos
TimHayes
Frequent Contributor
I followed the instructions, added my internal website (intranet) address.

I inserted the snippet in my default.htm.

Says Tracking is not installed when I log into my Google Acct.

I inserted the snippet ---
4.Paste your snippet (unaltered, in it�??s entirety) into every web page you want to track. Paste it immediately before the closing </head> tag.

I have attached a screenshot of where I inserted it.

Not sure why it is not installed.

I cannot seem to get it installed.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tim,

   This is what I have in my index.html (not sure why you have a default.htm as the viewer does not normally have a default.htm).

        ...
        </script>
        <script type="text/javascript">
            var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
            document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
        </script>
        <script type="text/javascript">
            try {
                var pageTracker = _gat._getTracker("UA-XXXXXXX-X");
                pageTracker._trackPageview();
            } catch(err) {}
        </script>
    </head>
0 Kudos
TimHayes
Frequent Contributor
I have 4 Properties for 4 different map viewers each with a different url.

I am able to track on the 1st property I set, but seems the other 3 I am not able to track. Is it possible to track on more than one site at the same time?

In other words, I can use Google Analytics on the 1st website I set up, but even with a Tracking ID says no tracking in use for the other 3 sites.

I have less than 20 users per day for all these sites total.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tim,

   Sounds like you need to read up on the Google Analytics documentation. When you setup a new property you should receive a new tracking ID. Did you add the distinct tracking ID code to each viewer site? It takes some time for Google to report on your sites activity. You can not setup your analytics and have it report traffic immediately.
0 Kudos