NOTE: The JavaScript must come from a consent form that is in Published state.
-
From the left side of the page, hover the mouse over the Consent & Preferences icon, and then navigate to Setup (1) > Consent Forms (2).
-
From the Consent Forms page, open the published consent form, and then go to the form’s Publish page (3).
-
Below the box (4) that contains the JavaScript, click Copy Code (5) to copy the script that you will use to embed on the customer’s website.
- Go to the customer website and embed the copied code. You can add different parameters to this code if need be. These parameters can add default value to fields and make fields read-only, editable, hidden, etc., as described in the following sections.
You can also do the following configurations to your form:
- Set up Global Privacy Control (GPC). For more information, see Recognizing GPC in CPM.
-
Secure your form using JWT (JSON Web Token). This can also be used to create magic links while sending customized unsubscribe links in outgoing emails to consumers. Click the Secure Form button for more details.
- Add other parameters to the script. For more information, see Adding Parameters to the Consent Form URL.
Embedded Forms with Google reCAPTCHA
Google reCAPTCHA does not function on embedded forms by default. Without proper configuration, the form returns an error on every submission attempt.
To enable reCAPTCHA on your embedded form, register your domain through TrustArc Support or DevOps. Contact your support team before deploying any embedded form that uses reCAPTCHA validation. If you are using TrustArc CAPTCHA, no additional configuration is needed as it works out of the box for embedded forms.