Skip to main content

Notifications

Announcements

No record found.

Customer Insights - Journeys forum
Answered

Segmenting email clicks

Posted on by 95

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

Categories:
  • 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 95 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,196 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans