Hi… I use and love this plugin and automatically include it for all of my clients, however I have come across an issue that I need help with.
In some of my sites, the Function handle_link on line 297 completely screws other code. This is because you use a combination of " & ' in your string replace. If I am using code that requires only using ' in the link string, Google Analytics breaks this.
Here is an example of part of a Script JS.
content: "<p><strong><?php the_title(); ?></strong><br /><br /><?php if ( in_category( '3' )) { ?><?php } else { ?><?php $values = get_post_custom_values('Phone_No');
if (isset($values[0])) { ?><?php $key='Phone_No'; echo get_post_meta($post->ID, $key, true); ?><br /><?php } ?><?php } ?><br /><a href='<?php the_permalink() ?>' title='More details on <?php the_title(); ?>'>View Details</a></p>"
As you can see, If the Analytics code puts a (") into the permalink, the whole thing falls over.
I am wondering if this could be resolved by adding an Exclude Pages/Posts by ID in the Admin area of this plugin or even better yet… an Exclude Outgoing String Replace on Pages/Posts. This second option would still ensure that the page is being tracked by Google, AND solve the issues.
Many thanks in advance for any help you can provide on this issue
Rog