Hi Leo, thanks for your response. It is not obvious to me how I would use a hook to implement this. Let me explain what I am trying to do. GeneratePress creates the following code (I have replaced the URLs) for the GIF:
<td><a href="[AMAZON URL]/dp/xxxxxxxxx"><img class=" wp-image-298 alignright" src="[WEBSITE URL]/wp-content/uploads/2018/05/buy2.gif" alt="" width="225" height="37" /></a></td>
I would this:
<td><a href=[AMAZON URL]//dp/xxxxxxxxxx"><img class=" wp-image-298 alignright" src="="[WEBSITE URL]/wp-content/uploads/2018/05/buy2.gif" alt="" width="225" height="37" onclick="return gtag_report_conversion('[AMAZON URL]//dp/xxxxxxxx')" /></a></td>
Is there some way to configure a hook that will inset this code (beginning onclick…)?