Reputation: 5
Can someone look at my syntax? I think I have something wrong here:
html += '<center><a class="customerReviews" href="'+data[x].url+'#customerReviews" onClick="ga('['_trackEvent', 'marv1', 'cardv1', 'customerReviews']');"><hr/>Click to Read card reviews</a></center>';
This is being inserted in a JS file.
Upvotes: 0
Views: 56
Reputation: 1638
You have an extra set of single quotes around the parameters.
onClick="ga(['_trackEvent', 'marv1', 'cardv1', 'customerReviews'])">
Upvotes: 1