4 / 4
Jul 2014

The trouble is because this part of your standard E-junkie button code:



onClick="javascript:return EJEJC_lc(this);"



...has been changed to this in your site:



onclick="javascript:gaq.push(['trackEvent','outbound-article','http://www.e-junkie.com']);"



The standard onclick event we provide in our code intercepts the button click to load the cart as an overlay, so if that event is removed, the button works like a regular link and loads the cart as a separate page.



If you didn't make that change manually, most likely some WP plugin you're using did that automatically. You may be able to use the Raw HTML plugin to prevent WP/plugins altering the button code; you can search for and install that plugin from your WP Admin panel, or read more about and download it from here:

2https://wordpress.org/plugins/raw-html/2



If you did make that change manually, you can use both onclick events by appending them together, like so:



onclick="javascript:gaq.push(['trackEvent','outbound-article','http://www.e-junkie.com']);return EJEJClc(this);"

Thanks.

Probably it is due to the Yoast GA plugin. I checked the option to track the outgoing clicks as events.

The strange thing is that I always had that option enabled and the cart always worked. I now added your code manually and now I see that both the onclick events are listed. However, the cart works.

Can you explain this? Is this because I put the onclick event at the beginning of the a tag?

The location of the onclick event within the anchor tag shouldn't matter, it's just that in this particular case the necessary part of the event wasn't in your page's code when we looked at it.



If it was working previously or while you were logged in to your site then that part of the code must have been present in those circumstances, but we couldn't guess why it was missing from your page otherwise. If the problem ever comes up again while you're working on the page that would be the first thing I recommend looking for, otherwise let us know and we can go over the code to see if anything else is missing or causing interference.