Hello Drupal World,

To enable cross domain tracking with Google Analytics, I need to add an onclick attribute to the Add to Cart button link. This link is in the Rewrite Results for a field in a view. So far it looks like Views is filtering out this attribute, so:

<a href="URL?sku=[field_isbn13_print_1]&qty=1" onclick="_gaq.push(['_link','URL?sku=[field_isbn13_print_1]&qty=1']); return false;">Add to Cart</a>

becomes:

<a href="URL?sku=[field_isbn13_print_1]&qty=1">Add to Cart</a>

Is filtering out Javascript from Views Rewrite Results a standard feature? Any ideas of how to work around this would be greatly appreciated.

Best Wishes.
Ray

www.wisdompubs.org

Comments

mattman’s picture