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.

Using API to send out email with survey link

Regular Participant

Using API to send out email with survey link

We are using an API to create an email campaign in CTCT to send to a list of contacts using another API and adding them to a group.  The email contains a link to a survey for those contacts to fill out.  However, when looking at the survey results - their results are showing up as anonymous.  Is there any way around this so we can link a survey with that contact? 





Survey invitations sent out through our UI create system-generated dynamic links, so that each of the invite recipients clicks and their surveys can be traced back to them. As you would have no way to use this system through the API, and must use the general survey url, there is really no way to automate tracking for this within our system. As a workaround, the most reliable option is to add a question to your survey that either allows or requires participants to enter a unique identifyer that can be traced easily back to their account. You can perhaps add these identifyers into a custom field, and insert them into an XHTML email (see here, and the same approach can be used when creating the email through the API). 


It won't make our system track them in the reports displayed within your account, but assuing the identifyer you provide is copied and pasted faithfully by your participants, you will be able to cross-reference results with contacts.


I hope this is helpful. You may be able to identify othe ways to achieve this as well.

Mark Coleman
Support Engineer
Regular Participant

Is there any consideration on CTCT development team in creating this service to allow an API to call a "send survey" service and calling a contact group for the invitees.  It is important not only for our business, but I'm sure many more, to be able to track who has filled out the survey or not.  It is also not very professional of asking the invitee to enter their e-mail address when we were the one who sent them the email in the first place.  



I'm not aware of any immediate plans to implement automatic tracking for surveys through the API, but I will make sure the team is aware that this is an important feature that our developers and customers are looking for.  I agree--you shouldn't need to have someone re-enter information that you already have.


Thank you for inquiring about this, and do know I will follow up on our side.



Shannon W.

API Support

Regular Participant

Thank you and pleasee keep me informed.  

Developer Portal

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

Visit Page