Append member IDs or profile variables to the ActivityLink pipe

In a distribution email, you can append profile variables to an activity link. Use this workflow to pass member information to a hidden question or to an external application or resource.

Prerequisites:
  • You know the exact name of the hidden question, field, or external resource the information will be passed into.
  • You know the exact name of the profile variable.
Note:
  • The profile variables you plan to use must have names that only contain the following:
    • Letters
    • Numbers
    • Underscores
    • Single spaces between words

    This functionality does not work with profile variable names that contain special characters or multiple spaces between words.

    Number values that contain special characters, such as commas, should be encoded before appending them to an activity a link.

    Additionally, you should avoid any combination of characters that is reserved HTML code. For example, if you try to append &ethnicity=value, &eth will be interpreted as HTML code and will render as a symbol.

  • You can append either profile variables or answer values to the [%ActivityLink%] pipe, but not both at the same time.
  • When members access an activity from the portal or the member hub, the link does not display appended profile values.
  • Members may experience issues while accessing an external activity from the portal or the member hub, if the external activity is configured to expect the appended values.
  • Create an activity link with one appended variable.
    1. In the distribution email, on the email editor toolbar, click Insert Variable > Activity Link with Variables.
      Result: The following code phrase is inserted in your email:

      [%ActivityLink%]&[%url(QuestionName,TypeProfileVariableHere)%]

    2. Replace QuestionName with the exact name of the external question or field.
      Note: Avoid using these reserved system variables or keywords:
      • communityid
      • panelid
      • datasettype
      • forumrespondertype
      • joindate
      • lastlogindate
      • memberid
      • memberstatus
      • recruitmentcommunicationid
      • recruitmentmethod
      • recruitmentsource
      • recruitmentstatus
      • statusupdatedby
      • statusupdateddate
      • surveyrespondertype
      • uploadid
      • mid
      • cid
      • scid
      • event
      • rurl
      • autk
      • datatype

      For more information, see System variables.

    3. Replace TypeProfileVariableHere with the exact profile variable name as it appears.
  • Append an additional variable.
    Tip: You can also use these steps to append profile variables to the end of any URL, not just activity links.
    1. In the distribution email, place your cursor at the end of the link.
    2. On the email editor toolbar, click Insert Variable > Append Variable to URL.
      Result: The following code phrase is inserted at the end of the link:

      &[%url(QuestionName,TypeProfileVariableHere)%]

    3. Replace QuestionName with the exact name of the external question or field.
      Note: Avoid using reserved system variables or keywords. For more information, see System variables.
    4. Replace TypeProfileVariableHere with the exact profile variable name as it appears.
    5. Repeat steps a to d for any additional variables.
Example: Pass memberid to a third-party application

The memberid is automatically appended to a link when you pipe the Activity Link variable into an invitation. For more information, see Insert variables in your distribution email.

To capture this value in your reports, ensure the external activity contains a hidden question called "MemberId".

Example: Activity link with two appended profile variables

You have a Region and a Gender profile variable that you want to pass to an external database. To do this, you:

  1. In your survey invitation, you use Insert Variable > Activity Link with Variables to append the first variable:

    [%ActivityLink%]&[%url(QuestionName,TypeProfileVariableHere)%]

  2. You replace QuestionName with Region, and TypeProfileVariableHere with the exact profile variable name in the application:

    [%ActivityLink%]&[%url(Region,MemberRegion)%]

  3. You place your cursor at the end of the link, and click Insert Variable > Append Variables to URL. Your activity link now looks like this:

    [%ActivityLink%]&[%url(Region,MemberRegion)%]&[%url(QuestionName,TypeProfileVariableHere)%]

  4. You replace QuestionName with Gender, and TypeProfileVariableHere with the exact profile variable name in the application:

    [%ActivityLink%]&[%url(Region,MemberRegion)%]&[%url(Gender,MemberGender)%]

When the member clicks the activity link in the email, the activity URL is automatically pre-populated with their profile data, for example:

http://CommunityURL/start/SurveyID?Region=Vancouver&Gender=male