Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have developed a small site for a client and the site has been placed inside a <iframe> at the clients site. The GA-script I'm using looks like this:

<script type="text/javascript">

        var _gaq = _gaq || [];
        _gaq.push(
  ['_setAccount', 'UA-XXXXXXXX-2'], //My company's GA-account
  ['_trackPageview'],
  ['b._setAccount', 'UA-XXXXXXXX-1'],  // Test GA-account
  ['b._trackPageview'],
  ['th._setAccount', 'UA-XXXXXXX-3'],
  ['th._setDomainName', '.clientdomain.se'], // Client GA-account
  ['th._trackPageview']
);

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

    </script>
</head>

As you can see I report the GA pageviews to the client as well. The GA script is tracking visitors and pageviews at both ends. But the problem is that on my clients side the visitor-count is more than double what they are on my end (20 000 vs 5 000). At first I thought that it was being duplicated at some point but when I checked my Crazy-Egg account I saw that it had tracked over 10 000 visits and then stopped tracking because that was my limit on the account.

The page my site is on is on a IP-address (http://XXX.XXX.XX.X/campaign/) and not on a "valid url". Could that be an issue why some of the visitors isn't beeing tracked?

Thanks in advance

share|improve this question
    
It doesn't answer the question however I think the way you have set it up is not optimal. Why not just track one UA ID and share that report with whomsoever needs it? –  joesk Oct 25 '13 at 13:39
    
@joesk That is true but I think that my client wants full control over their report. And this was the solution I found in the documentation from google –  PaperThick Oct 25 '13 at 13:51

1 Answer 1

There may be different problem which distorts the traffic:

  1. A php script will take all such visits 'robots' as google analytics does not take into account.
  2. A browser that does not accept 'cookies' will not be taken into account by google analytics
  3. Integration of iframe can disturb the traffic. According to the integration you can double the number of visitors and divide by two. You can also lose the referring sites.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.