Announcements
I'm trying to create a dynamic segment to capture all users who click a specific link in the email.
It's my first time doing this, so I've used the dynamic segment template for 'email clicked' but am confused with the attributes it present in the query builder.
I have selected the message = <my email>
There's the option for:
I can't find in the documentation what each of these attributes relate to?
Can somebody let me know what each of these is looking for?
Hi barryjarvis,
-- In the dynamic segment criteria (see screenshot in my original email) - if I don't specify the 'message' then does that mean the segment will capture all link clicks from any email?
Yes, it will capture all link clicks if we don't apply any filter to the segment builder.
-- example
Yes, all three emails will be captured because they all meet the criteria.
Thanks for the reply Clofly. That all makes perfect sense.
I have another question around segmenting with link clicks.
In the dynamic segment criteria (see screenshot in my original email) - if I don't specify the 'message' then does that mean the segment will capture all link clicks from any email?
example:
I have 3 emails, all emails have links to the same URL, so I set up my segment with 'Original URL = www.exampleurl.com' but do not specify the 'message'.
Will the segment capture all clicks from all three emails?
Hi barryjarvis,
For example, I received a marketing email and clicked its "Manage subscription" link to manage my subscription(let's say that the SC page URL is clofly.microsoftcrmportals.com/sc01/?msdynunsubscribeid=abc), so an Email Clicked record will be generated.
1. Link friendly name: Manage subscription
2. OriginalUrl and Original Link: They are almost same: clofly.microsoftcrmportals.com/sc01/?msdynunsubscribeid=abc
To explain Link ID and Link friendly name, I want to also introduce Link.
3. Link: Dynamics Marketing will convert every link of marketing email to special URL
If "clofly.microsoftcrmportals.com/sc01/?msdynunsubscribeid=abc" is converted to "1234567.svc.dynamics.com/t/t/abcde/fghijk",
then "1234567.svc.dynamics.com/t/t/abcde/fghijk" will be the link value.
4. Link ID: the first segment value: abcde
We can retrieve interactions of a contact using code and know what attributes mean by checking response data.
The sample code will retrieve all Email Clicked records of a contact.
var contactId = Xrm.Page.data.entity.getId().replace('{', '').replace('}', '').toLowerCase();
var data =
{
"InteractionType": "EmailClicked",
"ContactId": contactId
};
var req = new XMLHttpRequest();
req.open("POST", parent.Xrm.Page.context.getClientUrl() "/api/data/v9.1/msdyncrm_LoadInteractionsPublic", true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var results = JSON.parse(this.response);
var formatData = JSON.parse(results.Data);
for (var i = 0; i < formatData.length; i ) {
console.log(formatData[i]);
}
} else {
alert(this.response);
}
}
};
req.send(JSON.stringify(data));
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156