Rocket Loader appends onclick attribute

I’ve seen a couple similar questions posted in the community but no clear answer. I want capture events for Google Analytics via onclick attributes on a handful of links.

Cloudflare, through Rocket Loader, appends the attributes -
(e.g. —
onclick="ga(‘send’, ‘event’, ‘EventCategory’, ‘EventAction’, ‘EventLabel’);"
is changed to
onclick="if (!window.__cfRLUnblockHandlers) return false; gaga(‘send’, ‘event’, ‘EventCategory’, ‘EventAction’, ‘EventLabel’);"

I don’t necessarily want to disable Rocket Loader (Dashboard > Speed > Optimization) just want to prevent it from adding to the onclick attribute.

Is there a script I can add to prevent cfRLUnblockHandlers in the onclick attributes or must I disable Rocket Loader?

Thanks for any help.

Well, no response.

Here’s what I found as an answer…there’s no way to just place an onclick attribute or two, Rocket Loader is always going to disable it. What you CAN do is go through the tedium of setting up your Event through Google Tag Manager if you’ve set it up.