Title: [Plugin: Google Analytics for WordPress] W3C validation problems
Last modified: August 19, 2016

---

# [Plugin: Google Analytics for WordPress] W3C validation problems

 *  [mariusvw](https://wordpress.org/support/users/mariusvw/)
 * (@mariusvw)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-w3c-validation-problems/)
 * It seems that if you put the outbound tracking on that the code on line 467-468
   is not working probably and causing double quotes too early in the onclick argument.
 * My fix:
    //if (preg_match(‘/onclick=[\’\”](.*?)[\’\”]/i’, $matches[4]) > 0) {//
   $matches[4] = preg_replace(‘/onclick=[\’\”](.*?)[\’\”]/i’, ‘onclick=”‘ . $coolBit.’
   $1″‘, $matches[4]); if (preg_match(‘/onclick=”(.*?)”/i’, $matches[4]) > 0) { 
   $matches[4] = preg_replace(‘/onclick=”(.*?)”/i’, ‘onclick=”‘ . $coolBit .’ $1″‘,
   $matches[4]);
 * Not sure why you would allow single quotes here, couldn’t find any on my own 
   blog.

The topic ‘[Plugin: Google Analytics for WordPress] W3C validation problems’ is 
closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [mariusvw](https://wordpress.org/support/users/mariusvw/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-w3c-validation-problems/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
