Sanitize the Google Analytics Tracking Code
Is it a safe practice to let users copy and paste any kind of Javascript, assuming they’ll just use a tracking code? How can you validate such a code and keep it safe from malicious scripts? I decided to take a different approach, I accept (and validate) only an ID. The last day I had a thought, perhaps naive, but [...more]





2 Comments