Trigger an event on element id or class

Hi Guys
does anyone know how to trigger an event using element id or class?


Did you take a look at this page? Specifically under Click Listener:

@yair-dovrat Thanks for the link.
One issue I have is the lack of examples, yes we understand how this works, but providing examples in the docs would be really useful. I see other areas of Cloudflare, like Cloudflare images has this, and it really does help get things done.

So I have 2 questions. We have a trigger in tag manager which looks for a URL PARAM.
It is simply url - contains - mode=payment_confirmed

In zaraz it looks like this,
Rule Type - Match rule
Variable Name: {{ }}
Operation: contains
Match String: ??

Do we change this
{{ }}
{{ }}
and do we also add
into the Match string?

Is there a guide to to mimic Google Ads Tracking ?
Again an example would be useful?


Q1 - almost there: you can add a match rule for where {{ }} EQUALS payment_confirmed?

and then another match rule, where {{ client.__zarazTrack }} EQUALS Pageview

Q2 - Can you elaborate on what problems you faced here specifically? Have you already tried adding Google ads from the tool catalog?

@ruskin I just want to check with the screenshot below that I have the triggers correct.
First screenshot is this one which deals with the mode=payment_confirmed

Then the this screenshot is for the element id Trigger, is this setting correct.

If you would please let me know if these are ok.

With regards to Google ad conversions, here is the screenshot of the setup.
Are these settings correct - if this is correct then I can use the triggers above to trigger this correct?

Otherwise, the rest looks functional :white_check_mark:

1 Like

@ruskin Thanks for the assist, I have disabled tag manager now and fully integrated ZARAZ, now we just need to see if the payment tracking works.