How to campaign clicks?

Regular Participant

How to campaign clicks?



I was just just doing reporting work of campaigns and I just fount that there is not any function to fetch the click events in the code.





like this there is not any function available for clicks.

And I tried this too

function getEvents()


but this gives me:

Constant Contact HTTP Request Exception: 403 SiteOwner directivedev does not have access to EventSpot product


this exception.

can i get any solution for this?? how we can get clicks for campaigns?

emailAddress and the clicked url???




We actually do provide you with the number of clicks any given email generated when you get the campaign details XML from us.  This link shows how to retrieve campaign information.  The XML tag you want is called "clicks."


I hope that helps!


Best Regards,

Shannon W.

API Support Specialist

Regular Participant

I was also trying to find detailed click events for a Campaign. The documentation for the Campaign Events Resource suggests that click events are included but they do not appear to be.


Campaign Events Resource link


This looks like an ommission. Can you clarify if detailed (not summary number of clicks) click events should be available for a Campaign?



Hey Gary,


The detailed clicks can be found by accessing the specific URL's ID from the Campaign resource, using the "Url" node inside of the "Urls" field. The detailed information from this URI will list the time of each click, and the contact that clicked.


Let me know if you have any other questions on this. Thanks!

Nick Galbraith
Support Engineer
Regular Participant

Thanks Nick yeh I see it now.



I'm trying to access the click events for some campaigns as well. When I try the following URL, I get a 404 even though I know for this campaign there are click events. What am I doing wrong?{username}/campaigns/{campaign_id}/events/clicks?access...


Also when I try:{username}/campaigns/{campaign_id}/events/opens?access_...


I get a 200 and the opens are there, so it seems to be click specific.

Hey Andrew,


Clicks act a little differently than other campaign events. We're planning on having an easier endpoint with the next version of our API, but the current version requires clicks to be accessed through the urls inside of the events. You will also need the ID of the URL that you want to gather clicks from, which can be obtained from the campaign resource.


For example, if the campaign ID is "123" and the URL ID is "456", the URI would be built like this:


 Hope this helps - let me know if you have any questions.

Nick Galbraith
Support Engineer
Occasional Participant

Thanks, that's what I was looking for. Is there a way to get all the recipients of a particular campaign? I have a situation where the email was sent to an email that has since been deleted. So if there some sort of "campaign member" API?

That's not a problem. You'll want to use the "sends" events from the campaign. If you have preformed any resends to existing contacts, you will need to de-dup the results, but you can access a full list of the recipients from this URI:



 This will return the contact's email, a link to the contact, and a timestamp. Hope that helps!

Nick Galbraith
Support Engineer
Occasional Participant

Just what I needed, thanks!

Developer Portal

View API documentation, code samples, get your API key.

Visit Page