Let's configure the Consent Tracker, for example, to track a contact's subscription.
The data coming from the Consent acquisition form described earlier as an example will be tracked:
- First name
- Last name
- Region/province
- Consent to data processing for marketing purposes
- Consent to data processing for profiling purposes
In addition, the contact's IP address and the URL of the page where the signup form resides will be saved when they subscribe. These two data points will be obtained by configuring two post-submission Actions, whose result will be the recording of this information in specific database fields.
The Consent Tracker can capture all subscription, unsubscribe, and profile update events for each individual contact and, for each of them, add a new row to one of the tracking files it generated.
You can also save the IP and URL of the page from which the contact triggered the tracking event into fields specifically set up in the database.
Tracking IP and URL associated with a contact
In addition to the fields used to store all contact data and preferences described earlier, create the following database fields:
- IP_browser (text field)
- URL_subscription (text field)
These fields will store the URL of the page on which the event occurred and the contact's IP address that generated it.
Both fields are of type text and should not have any special checks or limitations.
Single Opt-in subscription
Since Single Opt-in provides for the immediate subscription of the contact, you will need to modify the structure of the post-submission actions linked to the signup button.
The goal is for the Consent Tracker to record the subscription event at the very moment the contact clicks the confirmation button on the page.
To allow the Consent Tracker to save the contact's information, you must configure a post-submission action that initially subscribes the contact with unconfirmed status.
Contact subscription
- Open the form's Save button settings
- Go to the list of actions
- If it doesn't exist yet, create a Subscribe contact action.
If the action is already listed, click the edit icon to configure:- the value of the Source field
- the database where to subscribe the contact
- the contact status
Make sure the option related to the contact status is Insert into the database with unconfirmed status, to allow the Consent Tracker to proceed with saving the contact's data:
- Click Save to return to the list of actions associated with the button.
Tracking IP and URL of the contact
The next step is to create two actions that record the contact's IP address as they subscribe and the URL of the page where this event occurs.
To track the contact's IP, create an action of type Assign expression result to a field.
For the Field to populate, choose the field you previously created in the database (for example IP_browser) and, in the expression window, enter browser.ip, then save the action:
For the signup page URL, create an action of the same type, select the field you previously created in the database (for example URL_iscrizione), and in the Expression field enter browser.url:
As the last action, add a Confirm subscription of the contact action, to update the contact status from unconfirmed to subscribed, so they can receive communications and the Consent Tracker can save the row for the event in the tracking log file:
Once the form configuration is complete, you can proceed to configure the Consent Tracker.
By using post-submission actions of type Values a field you can enrich the contact profile with any kind of information you consider necessary to save and track.
For example, you can save the current version of the Privacy Policy in a database field.
Consent tracker configuration
Access the Consent Tracker to configure tracking for the form.
Click the button to open the configuration page for the new tracking, then select:
-
Name
assign a name to the tracking (e.g.Newsletter subscription) -
Database
choose the database on which to track consents -
Track the event
choose the event to track, which in this case isContact subscription -
Origin
choose the source of the contacts to track.
In the post-submission action configured on the signup form described earlier, the source of these contacts isSubscribed from web
The configuration described is very specific because it tracks only one contact source.
This implies that you will need to configure additional tracking for the different sources, which can be avoided by selecting all possible sources for the database in question.
-
File name
you can have the file name match the database ID you are tracking, or customize it as you wish (for example'Subscriptions_mydatabase_'YYYY-MM-dd'.csv'); this will generate a log file named Subscriptions_mydatabase, plus the file's creation date -
Folder name
you can customize the name of the folder that will contain the tracking; otherwise, by default thetracking id namewill be assigned -
Fields to save
choose from the dropdown the list of fields you want to save and click the button
to add them, one at a time, to the list of fields that will be saved in the tracking file (for the example, the field placeholders will appear in the list):- Email address:
EMAIL - Contact first name:
NAME - Contact last name:
SURNAME - Consent to data processing for sending marketing updates:
COMMERCIAL_CONSENT - Consent to data processing for profiling purposes:
PROFILING_CONSENT - IP address of the contact who is subscribing to the database:
IP_BROWSER - URL of the page on which the subscription occurred:
SUBSCRIPTION_URL
- Email address:
If necessary, edit the parameters of the tracking file that will be generated.
When finished, click Save to store the configuration and start tracking.
Double Opt-in subscription
A Double Opt-in subscription requires the contact, after giving their consent, to receive an email with a link to click to confirm the subscription.
Form configuration
For the Double Opt-in subscription flow, magnews provides a standard flow that you can customize as needed to match your specific requirements for capturing the contact's information:
- Open the Save button properties
- Go to the list of post-submission actions
- Add the two actions described earlier to save the contact's IP address and the URL of the page from which they completed the subscription
- Add any additional post-submission actions if needed
Proceed with configuring the Consent Tracker, which will be identical to what was described earlier.