Forum Discussion
Katherine_G_106
Nimbostratus
Jul 08, 2009Google 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. ...
hoolio
Cirrostratus
Jul 09, 2009That's correct. You could either move the variable declaration to another event other than RULE_INIT or use two different names.
In theory I think there can only be one body tag in well formed HTML, so you could use a stream profile and STREAM::expression based iRule to replace with your HTML and . A stream filter would be more efficient than collecting the payload and rewriting it. You can check the STREAM::expression wiki page for some examples:
STREAM::expression
http://devcentral.f5.com/wiki/default.aspx/iRules/stream__expression
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects