The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Advanced Analytics Integration

jlivingstonjlivingston Member
in Help edited January 2013
Hi Guys,

I've integrated the analytics code detailed here:

http://wiki.foxycart.com/integration/googleanalytics

on a clients website. I done this a few times before, and though it often requires a couple of tweaks, it usually works great.

In this case, it seems to only work when I test it or when the client tests it. We'll run a test, and analytics shows that it is recording the transaction both in a funnel, and in the ecommerce section. But then when we release it into the wild, it isn't recording any of the transactions that actual customers are placing.

Could I whisper the domain to one of you, and have you take a gander at what I've done, and see if you might have any idea why this strangeness is occurring?

Thanks,

Joey
Comments
  • fc_adamfc_adam FoxyCart Team
    @jlivingston,

    Sure thing - if you could whisper myself and @brett, we can take a look.

    Are there any differences between the set up where you're testing, and the live set up?
  • Hi Adam. Thanks for the help. I just whispered the domain to you and Brett.

    In regards to your question: the URL I sent you is the live set up.

    Best,

    Joey
  • fc_adamfc_adam FoxyCart Team
    @jlivingston,

    Awesome thanks!

    When you mentioned that works for you and the client - is that on this same set up, or is that on a test site?
  • brettbrett FoxyCart Team
    Hey Joey.
    First quick question is: Did you integrate as described in the first or second links?
    http://wiki.foxycart.com/integration/googleanalytics
    http://wiki.foxycart.com/integration/googleanalytics_async
    It looks like you're using the asynchronous GA, but you mentioned the first link. So that could be the problem there. Thoughts? (I haven't dug through all your code to check. Sorry, it's late and if I start looking at code I'll fall asleep :)
  • Hi Adam,

    The tests that I and the client did were on this same live setup.
  • Hi Brett,

    I implemented the asynchronous code. I just googled the link quickly when posting this thread, and must've grabbed the wrong link.
  • Anymore thoughts on this guys?
  • brettbrett FoxyCart Team
    edited January 2013
    Is it set up how you had it when you tested it successfully? Because as is, I don't see how it could work. The major issue is that you're not using the default modal cart, so the approach in the docs doesn't make as much sense.

    And… lame. Firebug is currently crashing Firefox. Going to post this comment now, restart, and come back to try again.

    Ok, so, it's still crashing, but I think this is what's going on:
    * The default GA code does a preprocess event to pass the GA data into the FC session so it's in the fc_json.
    * Because you're not using the modal window, this doesn't happen in time. The browser leaves the page before the request is finished, so there's no GA data in the json at all.

    The solution … let me discuss with @fc_adam :) I think I know what the solution is though. At least, _a_ solution. One of many.
Sign In or Register to comment.