Reloading charts and out-of-sequence reqId

33 views
Skip to first unread message

Nick Wei

unread,
May 20, 2015, 1:53:58 PM5/20/15
to google-analyti...@googlegroups.com
I'm using the Super Proxy to feed a dashboard with 5 widgets on it.  The dashboard has a time frame selector that allows the user to view the trend over 7 days, 30 days, 90 days.
I'm trying to get the dashboard to refresh without reloading so I've tried two methods with partial success.
  1. I tried using ChartWrapper.setDataSourceUrl() with the corresponding URL for the new time frame followed by ChartWrapper.draw() to redraw the chart, this worked for some of the widgets but one or two didn't work correctly
  2. I tried emptying the chart divs then instantiating fresh ChartWrappers from scratch with the new URLs.  This actually worked better, I can get through the three time frames in order to redraw but if I jump from 7 days (the default loaded) to 90 days, or after the third, try to go back to one of the other two, I see the problem below.
However at some point, regardless of the method, it seems the reqId returned by the Super Proxy for a given response no longer matches the reqId sent in the original request and the widgets break with 
"Uncaught Error: Missing query for request id: X" where sometimes X is the last digit of the actual reqId (ie. 17 is returned as 7) or at other times, a sequence number gets "lost" (ie. 4 is returned as 3).

My next step will be to break down the Super Proxy code to figure out why this is happening but I'm not a Python expert so I was wondering if anyone out there has had a similar experience and what that fix might be.
I'd love to share some code but I can't right now because my queries are pointed at confidential data.  If anybody is even reading this and has some interest, I can certainly look at sanitizing the code for sharing.

Thanks

Research shows that organizations with high online analytics maturity get better ROI from their digital marketing and analytics investments. Not sure what your organization's analytics maturity is? Do you want to see how you compare to over 900 companies worldwide? Take the Online Analytics Maturity Assessment (OAMA) and find out now!


This email, including any attachments, is for the sole use of the intended recipient and may contain confidential information. If you are not the intended recipient, please immediately notify us by reply email or by telephone, delete this email and destroy any copies. Thank you

bakablah

unread,
May 20, 2015, 8:19:36 PM5/20/15
to Nick Wei, google-analyti...@googlegroups.com
Hey Nick,

I've had a similar issue as you encountered last year.
I'd posted a solution for this previously:

Give this solution a try and see if it works for you.

Regards,
Wilfrid

-------------------------------
The Request Time Out error was caused by the Google Charts API sending out a specific reqId to Super Proxy, and Super Proxy have cached the previous ReqId and returned the old ReqId instead.
This caused Google Charts API to 'Timeout'.
I've fixed this in my own version of Super Proxy and I've commented on the issue in the original bug tracker link. https://github.com/googleanalytics/google-analytics-super-proxy/issues/17

------------------------------

--
You received this message because you are subscribed to the Google Groups "Google Analytics superProxy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-sup...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nick Wei

unread,
May 21, 2015, 12:36:02 PM5/21/15
to bakablah, google-analyti...@googlegroups.com
This is awesome, thanks Wilfrid, works like a charm.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics superProxy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-super-proxy/iXbus_sxMbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-sup...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Nick Wei
Implementation Consultant
Reply all
Reply to author
Forward
0 new messages