Add A Manage Preferences Webform To Your Site

Sometimes you might want to provide the ability for contacts to update their preferences from your site instead of sending them a manage preference webform link via email.

About this task

Bronto has provided a way for you to allow a contact to securely access their manage preferences webform from a link on your site.
Note: This task requires some coding knowledge.

To add manage preference webform access to your site:


  1. Set up a shared secret in Bronto:
    1. Go to Settings > Platform Settings > Data Exchange.
    2. Scroll to the Webform Shared Secret section and enter a secret key in the Secret box.
      Webform Shared Secret
    3. Click Save.
  2. Preview the manage preferences webform you want to use on your site:
    1. Go to Contacts > Grow > Webforms and locate the webform in the grid.
    2. Click the preview icon.

    The preview for the webform opens and the Subscriber Lookup For This Webform information is below the webform preview.

    If you preview a webform from the Edit Webform page, you will not see the Subscriber Lookup For This Webform.

  3. Use the information in the Subscriber Lookup link to create a SHA256 HMAC (encoded as lowercase hexits) for each contact you want to be able to use this webform.
    This will be used to replace the {VALIDATION_HASH} in the Subscriber Lookup link. The SHA256 HMAC is a combination of
    • Site ID: the site ID is the URL segment that appears before /manpref/ in the Subscriber Lookup link.
    • Webform ID: the webform ID is the URL segment that comes after /lookup/ in the Subscriber Lookup link.
    • Contact ID: the email address or API ID for the contact
    • Webform Shared Secret: the shared secret you created in step 1.

    The Site ID, Webform ID, and Webform Shared Secret will always be the same for a webform. (But is unique to that webform.) The Contact ID is unique to a contact. Therefore, if you have 100 contacts you want to access this webform, you will need to generate a unique SHA256 HMAC for each contact.

    PHP example:

    // Define hmac variables and encryption
    // Use values from the Manage Preferences URL to populate $siteID and $webformId
    // $contactId is the email address or API ID for your contact
    // $sharedSecret is set within Data Exchange
    $siteId = '';
    $webformId = '';
    $contactId = '';
    $sharedSecret = '';
    // generate hmac token
    $token = hash_hmac('sha256', $siteId . $webformId . $contactId, $sharedSecret);
    // print hmac token
    print $token;

    Your SHA256 HMAC will be created outside of Bronto. If you need help with this step, contact one of the developers at your company.

  4. Format the manage preferences webform links and add each link to your site.

    A link is the provided Subscriber Lookup link appended with a specific contact ID (instead of {CONTACT}) and the SHA256 HMAC you made for that ID (instead of {VALIDATION_HASH}).

    For example:

What to do next

After you make a link and make it accessible to the contact on your site, the contact will be able to securely access the manage preferences webform from your site and update the information included in the form. Remember, each contact will need a link specific to that contact in order for the webform to work properly.