Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Segmenting email clicks

(0) ShareShare
ReportReport
Posted on by 99

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

  • Verified answer
    Clofly Mao Profile Picture
    Clofly Mao 50 on at
    RE: Segmenting email clicks

    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.

  • barryjarvis Profile Picture
    barryjarvis 99 on at
    RE: Segmenting email clicks

    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
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Segmenting email clicks

    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

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans