web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Segmenting email clicks

(0) ShareShare
ReportReport
Posted on by

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:

  • Link friendly name
  • Link ID
  • Original Link
  • Original URL

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?

pastedimage1613576027129v1.png

I have the same question (0)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    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.

    https://docs.microsoft.com/en-us/dynamics365/marketing/developer/retrieve-interactions-contact#action-parameters

    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));

    750.JPG

  • barryjarvis Profile Picture
    on at

    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?

  • Verified answer
    Clofly Mao Profile Picture
    50 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 101 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 83

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans