Katherine_G_106
Jul 08, 2009Nimbostratus
Google Analytics Injection iRules for Multiple Virtual Servers
Morning,
I have written iRules for 2 separate virtual servers that inject the GA code snippet with a different google id. When I hit the first virtual server (A) the code is injected properly. Then, without closing my browser, I connect to the next virtual server (B), the code from the irule assigned to A is getting injected into the payload for site B.
I am not testing for the existence of the GA code in the payload; the analysis people want this instantiated even if the GA script is already hardcoded on the page.
1. How can I make sure that the unique irule runs for each virtual server?
2. How can I make this more efficient, since I want it to go into every page? Would it be ok to move the setting of the variable for code injection to HTTP_RESPONSE or HTTP_RESPONSE_DATA?
Thanks!!!
-katherine