An injection rule is used to collect data related to an email or a recipient (contact) who clicks a link in the email and insert this data at the end of the clicked URL in the form of parameters. Several injection rules are configured by default in Dialog Insight and you can use them if you activate the corresponding modules. These default injection rules are configured to work with Google Analytics, Journey or Behavioral Tracking. For other use cases, you could create a custom injection rule in which you specify the destination URL and the parameters to inject (this article explains how to).
Google Analytics parameters from the default injection rule:
To use it in a message or a template, you must activate it in Link tracking (see step 3) and select the Google Analytics rule. This rule is configured for all links and destinations. However, you could add restrictions on specific websites by editing the rule if needed. |
Step 1: Create the Rule
In Communications -> Emails, go to injection rules configuration for the email channel (under the 3 dots):
Click Create a rule. Then, name the rule, indicate if you want to limit it to one communication type and add the link(s) to receive your parameters: In the URLs input, type all the domains to which you want to add parameters. An URL must begin with http:// or https://.
Step 2: Configure the Parameters
You must now add the parameters you want to inject:
Fill-in the required info:
- Parameter: Expected value at destination depending on the system in your website/platform.
- Communication type: Select the same communication type as the injection rule or select default.
- Value: Data collected at the moment of the click in the message, in this case, the message name.
- Apply only to tracked contacts: If you activated Behavioral Tracking, you will see this option. Check if you want to apply this rule only to contacts who have accepted cookies.
Examples of Dynamic Values for Message Data | |
---|---|
[[=Message.idMessage;]] | Message ID |
[[=Message.MessageName;]] | Message Name du message |
[[=Message.idCategory;]] | Message Communication Type |
Examples of Dynamic Values for Mailing Data | |
---|---|
[[=Mailing.dtMailing.ToString("yyyyMMdd");]] | Mailing Date (AAAAMMJJ format) |
[[=Mailing.idBatch;]] | Mailing batch ID |
Step 3: Activate the Rule
Once the rule is created, its name will appear in the additional options under the Link tracking section. To go to the additional options, click the 3 dots in the upper right of the email editor (in the email you want to activate the rule for):
In Link tracking, check the rule you want to apply for that message: