Anonymous questionnaires are frequently used in research with adolescents in order to obtain sincere answers about sensitive topics. Most longitudinal studies include self-generated identification codes (SGICs) to match information. Typical elements include a combination of letters and digits from personal data. However, these data may make the participant feel that their answers are not truly anonymous, and some studies using these types of SGICs have been perceived as not entirely anonymous by some participants. Furthermore, data protection laws could place limits on research carried out with these codes. The objective of our article is to test an SGIC with a higher degree of anonymity. We conducted two studies. In Study 1, we tested the perceived anonymity of this new SGIC code. Adolescents aged 12 to 18 years (N = 601) completed an anonymous questionnaire about lifestyles and risk behaviors, which also included the SGIC. Adolescents with and without risk behaviors were compared regarding whether or not they answered to the SGIC questions. We did not find any differences to suggest that participants felt identifiable. In Study 2, we assessed the efficiency of the new SGIC. At baseline, 123 students from two high schools (eighth grade) filled in questionnaires consisting of the new SGIC and their full names. Two years later, these same students (then in the 10th grade) were invited to fill in the same information again (116 students responded to this second call). A total of 97 students were present in both waves. The SGIC showed a moderate performance, with good enough indices of recall and precision. Evidence suggests that the new SGIC is a suitable tool for the anonymous matching of adolescents in follow-ups of school cohorts.