Dynamics 365 Marketing Forms
Our automatic form tracking supports tracking embedded Dynamics 365 Marketing forms on your website. It triggers when a valid email is submitted as part of a form.
To enable Dynamics 365 Marketing form tracking, set the dynamics365Marketing
option to
true
in your script as done below.
dreamdata.load('<DREAMDATA_API_KEY>', {
formTracking: {
dynamics365Marketing: true,
},
})
By default, using the above script, all your form submission events are labeled
as form-submitted
. While functional, this generic naming can complicate your
analytics experience. For instance, distinguishing between events like
newsletter-downloaded
or user-signed-up
requires correlating each submission
with the page URL—a less than ideal solution.
To streamline your tracking process and enhance clarity, you can map form IDs to
more descriptive names within the dynamics365Marketing
configuration object,
as shown here:
dreamdata.load('<DREAMDATA_API_KEY>', {
formTracking: {
dynamics365Marketing: {
formIdToNameMappings: {
'g3ace55a-a22f-ed11-bba1-000d3ab1d77c': 'User logged in',
'some-other-id': 'Some event name',
},
},
},
})
How to Obtain Dynamics 365 Marketing Form IDs
To use descriptive event names effectively, you'll need to retrieve the unique form IDs from your Dynamics 365 forms. Here's how to find them:
- Edit Mode: Open your marketing form in Edit mode.
- HTML Tab: Navigate to the HTML tab.
- Search for ID: Look for the field name you are interested in and identify
the
data-form-block-id
attribute which holds the ID, for example:data-form-block-id="g3ace55a-a22f-ed11-bba1-000d3ab1d77c"
(Note: Each form has a unique ID.)
Important Consideration
One significant drawback of this approach is that you must manually locate and record the ID for each form you wish to track. This process can be time-consuming and requires access to each form's settings, potentially complicating deployment across many forms or large-scale environments.