We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Performance: Filter opens, clicks, sends etc based on date

frederickdhondt
Occasional Participant

Performance: Filter opens, clicks, sends etc based on date

Hello


I developed a syncronisation tool but we have a performance issue I think. Imagin a campaign with 10000 contacts, how can I filter these clicks, opens, sends, based on the eventtime (or creation time).


The problem now is that if i syncronise, I load ALL opens, clicks and sends from all Send Mails.


Can you tell me the best practise for doing this?

4 REPLIES 4
bsoder
Employee

Hello,



We do not currently have an API that will filter these specifically for events on a date range. However, it is possible to get this working on your end. Currently the best way to pull all information from a specific event, would be to do a GET call on the Campaign Events URI. This will grab all of the information you need for just that one event.



In order to sort just the campaign events from campaigns in a specific time period, you would need to run a search for all SENT campaigns from the Campaign Collection. This will list all of the sent campaigns, with the campaign sent dates in the XML. You would then compile the list of sent campaigns from a specific time frame, and only do the event campaign gets on that set of campaigns.



I apologize that this is probably the best way to do this, and I will notify our engineers that there is a desire to have functionality so that we can search for campaigns by date sent.



If you have any questions please let me know.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
bsoder
Employee

Would you mind telling me which programming language you are using? We may have an example that we can send to you, depending on which language it is.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
frederickdhondt
Occasional Participant

Im working in c# but the problem is not the campaigns, the problem is retrieving opt-outs, opens, clicks.


Now in my code I do the folowing:


For each sent campaign I retrieve all opens, opt-outs etc, but without filtering; this will be 10 000 records each time I do this and the next day, when my syncro runs again, again I will have the same records + the new ones.

bsoder
Employee

Hello,



I apologize I thought you were pulling the data for opt outs, clicks, and opens by campaign, not by contact. If you are doing it by contact, our system returns all opens, clicks, and opt outs for a particular contact within the last 90 days. There is no way to just pull a specific date range for the contact events URI unless you do it after you receive the full data from the API.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

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

Visit Page