jay28lee
asked on
How do I add/replace Google Analytics code using regular expression?
Google Analytics code contains special symbol such as quotation and semicolon marks.
I'm using Perl to dynamically update and replace certain content of my html template to generate static page. For specific purpose, I can't simply just add the tracking code to the html page.
I would like to use regular expression to match for </head>
and then append the Google Analytics code before the closing </head>
How can this be done?
I'm using Perl to dynamically update and replace certain content of my html template to generate static page. For specific purpose, I can't simply just add the tracking code to the html page.
I would like to use regular expression to match for </head>
and then append the Google Analytics code before the closing </head>
How can this be done?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER