Google Analytics Process Update Required - [RESOLVED]

edited March 2013 in Developers
I've reviewed the instructions here: http://www.checkfront.com/support/google-analytics/

and I've found what I believe is an error that results in erroneous Google Analytics (GA) tracking when the WordPress plugin widget is used.

Essentially, the issue breaks down like this:

- Visitor hits the main site (banjobilly.com) and begins a GA session

- The main site must have _setAllowLinker set to true, and _setDomainName can be set to anything (setting it to 'none' is pointless as far as I can tell, as GA sets the domain name to something regardless...it's not as if the cookie can be used by any domain just b/c we choose 'none')

- When the user views the checkfront booking widget, the content is loaded in an iframe. However, this iframe isn't loaded using GA's recommended procedure, so the current GA session data isn't transferred to the iframe

- What's more, because the iframe doesn't load any Google analytics tracking code, no session can continue inside the frame

- Because no session can continue inside the frame, completion of "step 1" in our checkout process - i.e. clicking on "continue" after filling out the booking form - isn't something we can track

- Since clicking on "continue" takes the user to a branded sub-domain page on checkfront.com that ALSO doesn't have Google analytics tracking code (and why would there be when the iframed content doesn't have GA tracking, right?), whatever GA session data we have on the user (i.e. medium, source, conversion funnel, etc.) is officially closed on our site as soon as they click "continue"

At this point, the usefulness of our ecommerce data falls off quite a bit

- If/when the user begins a new GA session on the thank you page (aka payment completed page), the new session shows that the traffic source is "direct", then associates the ecommerce data with a direct visitor that only looked at one page

Basically, we end up with a Google Analytics account that tells us the only traffic that converts is "direct" traffic, that we have a landing page that converts at 100%, and we have no conversion/ecommerce data specific to the proper session that began just a few moments earlier.

While I'm no expert on cross-domain tracking, in the last few months I've worked on this for a few clients. Quite frankly, I'm amazed at the lack of emphasis on this problem with most 3rd party cart providers. They simply don't seem to care that their users can not collect highly actionable ecommerce data in GA because of a lack of compatibility on their system.

However, I know that Checkfront is different, as you guys have attacked problems people have brought up in the past.

I hope you can come up with a solution for this one too. 

Ideally, we could add our GA tracking ID in the Wordpress plugin settings area, then your plugin could pass this ID to the iframed page ( along with the proper _getLinkerUrl syntax, see https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#trackingIFrames ), then the iframed page could pass the ID to the payment page, and then finally onto the booking completed page.

Questions? I'm happy to put this in a video too.

Comments

  • JasonJason CEO Checkfront
    Thanks for the detailed breakdown.  

    The payment page is using cross domain tracking as per the Google spec, but it sounds like also including in the embedded booking portal with the url linker will provide better end to end data.

    We'll have a look on our side to see what can be done based on this feedback.

    -Jason


  • Awesome - thanks for checking into it.

    BTW, the documentation on Google is a bit self-contradictory depending on which page you view.

    However, based on the work I've been doing lately, this documentation seems to be the most correct:


    Just one man's opinion... :-)
  • I could not second this more! Having complete and accurate GA tracking data is #1 on my feature request list since I'm probably losing a few hundred dollars a month in misallocated advertising funds and efforts.
  • Hey guys, did you make any headway on this? I'm spending $2000/month on Google Adwords and if i can't correlate that to sales I'm throwing darts in the dark. 

    I'm surprised more people aren't clamoring for this to be solved, as it's a crucial element of any marketing campaign - to be able to correlate revenue to the referring source.
  • I was also hoping to get more out of tracking conversions through GA. Seeing the source as "direct" is not very helpful. 

    I as well spend money on Google Adwords and SEO, I need a way to measure its performance. 

    I did follow the Adwords conversion tracking tutorial (http://www.checkfront.com/google-adwords/), but I have not had time to get a sale through to see how much detail is given on the conversion


  • JasonJason CEO Checkfront
    Hi all,

    Our latest update 2.8.3 includes a new Google Analytics tracking module re-built to better accomodate cross-domain tracking.  It also now tracks more interactions on the booking page. 

    Thanks for everyones input on this.  As Jason pointed out the particulars for cross domain tracking are somewhat vague as documented by Google, so it took some trial and error to get it right.

    You must be using the following to take advantage of the new module:

    - v2.0 version of a Checkfront booking plugin(s) or Droplet.  
    - Asynchronous tracking code from Google Analytics on your website.

    Please allow a few days of data collection from the new module, and let us know how it goes.


    Regards,
    -Jason
  • I believe there may still be an issue.  I've already submitted a support ticket but it looks like the booking source has moved from 'direct' to 'referral from my own domain'.  Some brief googling led me to believe this has something to do specifically with how visitor data is handled in iframes.


    Planning to try going from my domain directly to hosted booking page next.
  • JasonJason CEO Checkfront
    The updated code is using getLinkerURL as specified in the doc you referenced.  In our own tests we're seeing external referrers as well as same site.  We'll follow up directly with the ticket and have a look at the tracking code on your website.


  • Thank you!
  • JasonJason CEO Checkfront
    edited March 2013
    Hi all,

    After some back and forth, we've determined your Google Analytics code should look something like the following to get the most out of the tracking:

    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'XXXX']);
      _gaq.push(['_setDomainName', 'yourdomain.com']);
      _gaq.push(['_setAllowLinker', true]);
      _gaq.push(['_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>

    This is the "Multiple top-level domains" tracking code as generated in Google Analytics.

    You'll also want to make sure your site is setup in Google Analytics as a e-commerce site.

    If you are using the hosted booking page, you'll need to modify your book now button to something like:

    <a href="https://demo.checkfront.com/reserve" onclick="_gaq.push(['_link', 'https://demo.checkfront.com/reserve/']); return false;">Boo Now</a>


  • JasonJason CEO Checkfront
    edited March 2013

    FYI, if you are using Wordpress, and use the YOAST Google Analytics plugin (recommended), you can enable cross domain tracking by clicking "Show Advanced Settings" in the plugin setup area, and checking "Enable Cross Domain Tracking:", and setting your base domain in Cross-Domain Tracking, Primary Domain: to your domain (eg mycompany.com not www.mycompany.com).

    Optionally if you link out anywhere to the hosted booking page you can Cross-Domain Tracking, Other Domains: to your checkfront domain (eg demo.checkfront.com).

  • Sorry to bring this up again but I thought I'd mention my never-ending GA issues.  With a few exceptions, I haven't heard much from anyone else about this before the update or afterwards - does analytics work as everyone expects it to and it's just me or is analytics not important to most businesses?

    After the update, my transactions went from all direct to all referrals from my own domain - doesn't matter what the real source was (google keyword, facebook, etc.).  Tried a few different variations on the tracking code with no luck.  I'm now back to Jason's code suggestion listed above and holding out for a few days hoping for the best.

    I was just going through a booking process on my site while watching real time analytics.  As soon as I hit the booking page, 1 active new visitor from google search on /reserve (our booking page) turned into a bestcanoecompanyever/referral visitor after a few seconds (registered as a 2nd active visitor which explains my increased total visitors) and then appears to be on /checkfront/reserve (joomla booking plugin).  

    Moving through the booking process appears as expected in analytics (/checkfront/reserve -> .../create -> .../payment -> .../receipt).

    If the payment is completed, it stays listed as a referral from bestcanoecompanyever.  As soon as I move away from a booking page, the original visitor information comes back.  
  • My main referrals are coming from my domain as noted above and paypal (we use paypal as a payment gateway) tracking code is set up as you mention above Jason
  • JasonJason CEO Checkfront
    There still seems to be varying results with referral tracking.  It's a complex issue that depends on the type of integration.

    One work around if you are still not seeing the correct referral is to simply setup a custom thank you / receipt page and add whatever tracking code you want on that page.  This avoids any issues with cross domain tracking.

  • For what it's worth, in the last week or two analytics has been showing (sporadic) signs of life in my account.  Just over 25% of the time the expected data comes back (i.e. search result which led to completed booking).  Not great, but definitely better than no data at all!
  • Smae here actually...getting some organic results showing up from the last few days
  • JasonJason CEO Checkfront
    Very strange.  We've haven't updated the plugins since mid march as posted here. 

    Please continue to weigh-in here as to the success of the referral tracking.
  • Just had a look now and am still getting Paypal as the chief source for bookings. Am hoping to shift to Stripe in the next few weeks so will see if that makes a difference.
This discussion has been closed.