Odd website tracking issue, getting discordant results

255 views Asked by At

On one of our client sites, we track conversion using both Google Analytics events tracking and DoubleClick Floodlight tags, for a handful of reasons. The tracking tags come from the same .Net WebControl, so the numbers should sync up.

The code looks like this (where I've added line-wrapping in the script includes, the pageTracker._trackEvent line and in the iframe URL for legibility, as well as combining code from a couple of source files):

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"
    type="text/javascript"></script>
<script src="<%=
    Page.Request.IsSecureConnection ? "https://ssl." : "http://www."
    %>google-analytics.com/ga.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
    var pageTracker = _gat._getTracker("<%= GoogleAnalyticsID %>");
    pageTracker._setDomainName("<%= SiteDomain %>");
</script>
<script type="text/javascript">
    pageTracker._trackEvent('<%= CategoryID %>', '<%= BrochureName %>',
        '<%= MetaData %>');
</script>
<iframe id="floodlightIframe"
  src="https://fls.uk.doubleclick.net/activityi;src=1234567;type=XXXXX123;cat=<%=
  Server.UrlEncode(CategoryID) %>;u4=<%= Server.UrlEncode(BrochureName) %>;u5=<%=
  Server.UrlEncode(MetaData) %>;ord=<%= new Random().Next(1000000000) %>?"
  width="1" height="1" frameborder="0"></iframe>
<script type="text/javascript">
    $('#floodlightIframe').load(function () {
        document.location.replace('<%= RedirectDestination %>');
    });
</script>
<noscript><p><a href="<%= RedirectDestination %>">Please click here
  to continue</a>.</p></noscript>
</body>
</html>

What's confusing me is that Google Analytics is tracking 813 events on 31 January 2012, across all the possible combinations of BrochureName and MetaData for the one CategoryID I'm currently focussing on. DoubleClick, however are telling me they had 47 hits for that CategoryID.

Fwiw, the page is always rendered by SSL and the variables in the code (like BrochureName) will always have a value; if the correct value is not passed to the page, a default is set. We have received no complaints that users are not being redirected to RedirectDestination so, to our mind, everything should be working as expected — both the pageTracker._trackEvent should fire and the iframe HTTP request be sent, then the user should be redirected.

Now it's entirely possible that the third-party is misunderstanding what they're supposed to be sending us and are mailing over a subset of the data we want (which is their equivalent of the 813 GA events). That's what I think is the most likely outcome.

But I just want to sanity-check that I'm not missing some obvious flaw in our code that means that the Floodlight tags (the ones in the iframe) will under-report by an order of magnitude.

0

There are 0 answers