Triggering an Event on click

I’ve seen the help docs and API docs, but I’m just not getting it. These docs assume slightly more knowledge than the minimum knowledge I suspect is necessary to trigger Events.

I have site tracking set up, and I can now track when a user visits a page.

Now, I just want to track if they click on a particular link on that page. (This link goes to my payment processor, so I believe I can’t track it with a simple javascript tag on the checkout page, as the user’s info wouldn’t transfer).

Can anyone please provide (or point to) a step-by-step summary of the exact code to use for this?

Hey @kadavy,

That is an excellent question, and you are right about the docs – we are working on getting those better updated, right now they assume that you are firing the event tracking serverside.

I personally prefer to use a point and click tag management system like the Big Picture (through Segment), or you can use our Segment directly.

If you would prefer to handle everything with vanilla JavaScript you can do so as well. You need to make an AJAX call to the event tracking endpoint, with the correct properties.

Here is an example I put together that shows how to accomplish something similar: How to Log ActiveCampaign Event When Audio Ends.

1 Like

@jskole

I’m going through the exact same thing as @kadavy. I’ve read your article on setting up an event for audio ending, but unfortunately I am still lost. Are you able to show a step by step guide for onclick event tracking here? We’d prefer to go “vanilla” and not use a third party tag management system.

We specifically want to track how many times and who is downloading our catalog pdf.
Please help!

Hey @Murphy,

I have written this long post here: https://www.activecampaign.com/blog/how-to-setup-activecampaign-event-tracking/