A better way to get contact tracking data?

Occasional Participant

A better way to get contact tracking data?

I have about 40k contacts in a customer's account that they want to be able to review and perform queries on the tracking data provided by the "/contacts/{contactId}/tracking" endpoint. My initial idea, based on the operation of other APIs, was to perform an initial dump and then use the "modified_since" filter to allow us to update the local copy of data.


However there seem to be two issues with this:

  1. The only way I see to get this data is to run a query for every contact, which is very inneficient and would take four days (based on stated call limits) just to get the initial data.
  2. I don't see anyway to query all contacts for new records without bumping into the above problem.

So I really only seem to have the one issue: Is there away to get tracking data for all contacts without querying for it one contact at a time?




Thank you for reaching out to the API Support team here at Constant Contact.

Unfortunately we don't have a way to bulk export or access all contact tracking in a single call. However I do have a suggestion for a possible workaround. Rather than calling each contact individually, you could instead query the tracking information for each email campaign.

The documentation for making a call for each of a campaign's tracking information can be found here: https://developer.constantcontact.com/docs/campaign-tracking/email-campaign-tracking-.html

You can also get a list of all email campaigns and restrict the status to Sent and a modified since date (https://developer.constantcontact.com/docs/email-campaigns/email-campaigns-collection.html). So once you have your inital data you can make this call to determine which emails have been sent since you last pulled data, and then get the data on only those campaigns. This should drastically reduce the required number of calls to gather and maintain tracking information.

Please let me know if you have any other questions!

David B.
API Support Specialist

Occasional Participant

Thank you for the info. I was leaning towards trying that... One thing that your documents lack is identifying what causes what. I seldom like to assume as I don't like to be those first three letters. :-) As examples:

  1. A new tracking record for a contact is created. Does that bump the contact's modified_date?
  2. A new tracking record is created in response to a campaign. Does that constitute a bump in the campaigne's modified_date?

My knee jerk reaction would be yes in both cases but all too often I invest effort on such assumptions to find out that the other developer doesn't think like me. :-) I would assume from your answer that at least #2 is a yes. But I'd sure hate to spend weeks thinking all is well only to find out that we never catch straggler events that happened after the last time I polled a specific campaign because the modified_data never got bumped.


So if #2 is a yes, this definitely sound like a much more practical and is a usable solution.


This also turns into two feature requests (ok, 3, since I'm on the topic):

  1. Seems like anyone datamining their list would wont to bulk dump tracking records, with a created/modified since filter.
  2. Docs updated with events that trigger modified_date bumps. And any other interactions, but that specifically as it determines what to expect with the related filters.
  3. Update docs to mention which fields might not exist. A contact record without a status?!?! Really? But I have proof it happens. Makes no sense to me.



Hi Jon,


Our tracking stops calculating after 33 days. You can write your program to query for the campaign tracking endpoint as David mentioned for 33 days after the campaign sent to make sure you get all the data we collect.


I will make sure to submit your three points of feedback and see what we can do for those; we are currently developing our v3 API so if we are able to make any changes they would most likely occur with the new version.


Jimmy D.
Tier II API Support Engineer
Occasional Participant

Thanks guys I think this might just be a good work around! I'll be trying it in a week or so.

Developer Portal

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

Visit Page