Unknown contact in Survey

As the title suggests, the problem is that when I send a survey by email, the response that returns appears with “unknown contact”.
I checked the SurveySubmit.php file and $ _REQUEST [‘contact’] is empty, as is $ _REQUEST [‘tracker’].
In the Survey.php file, $ _REQUEST [‘tracker’] is also empty.
And finally in the SurveyResponse.php file $ this-> contact_id is empty.

Can anyone tell me how to get the contact information when I send the survey so that I can fix the “unknown contact” problem? Thanks


How have you set up/sent out surveys?

I think, if you send out a Survey Campaign, using a template that contains “$surveys_survey_url_display”,

It should generate a Link to the Survey that contains the Contact’s ID,
Which would then be passed to the CRM when the Survey is submitted

ie, it will look something like:
[CRM location]/index.php?entryPoint=survey&id=d3a179f6-507f-fe81-2f3b-5f9171f7daa3&contact=496c4b81-f400-17c6-ca9a-5f490e06f4bf&tracker=5740b88f-7bae-6acb-3ea5-5f9ae80ba491

Are you perhaps doing something different, or sending through a different method?

I first created an email template, inside I inserted the link to the survey, but the link looks like this:

[CRM location] /index.php?entryPoint=survey&id=d3a179f6-507f-fe81-2f3b-5f9171f7daa3

you say that I have to add to the link too


when do i create the template? How? where do i get contac_id and tracker_id? In the email template I can select, under “insert variable”, in Contact / Leads / Objective, $ contact_tracker_key, but in any case it arrives empty


For your Email template, are you using the Survey URL generated here?:

If so, I don’t believe you’d need this in the template.
The Survey Email Template should just need the “$surveys_survey_url_display” variable in it

Then, when sent through a Survey Campaign, it will automatically parse this and build the full URL in the Email, including both Contact and Tracker ID:

I believe both of the Contact/Tracker ID are grabbed when it is sent through Campaigns

Although, if you don’t plan to send through Campaigns, I’m not sure how well it would work

What I would like is to send a simple email, taken from my contacts in which there is the survey. Everything ok, but the answer that arrives is anonymous, with “unknown contact”

I don’t know if it’s the correct way but I solved it like this:
I entered next to the string
[CRM location]/index.php?entryPoint=survey&id=d3a179f6-507f-fe81-2f3b-5f9171f7daa3


&contact = $contact_id

and now the name of whoever answers the survey