Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : MW1+j/0D5sH45bf7PE9E0l
Customer experience | Sales, Customer Insights,...
Suggested answer

Personalized page content

Like (0) ShareShare
ReportReport
Posted on 13 Jan 2022 20:44:11 by 570

Hi Everyone,

I was following the documentation on https://docs.microsoft.com/en-gb/dynamics365/marketing/personalized-page-content and I read throught the existing thread on the subject but still can't get my head around it.

I simply want to display this message on a marketing page: Hi FirstName by calling the value of my variable. 

I copied the JavaScript in the header as specified in the documentation but I don't understand how I can retrieve the var to display in the HTML.  

Any help will be appreciated

  • Samuel Boulanger Profile Picture
    570 on 14 Jan 2022 at 14:13:34
    RE: Personalized page content

    Hi Nya 

    Thank you for your answer. I already looked at the tutorials but I still don't get how to call the variable in the html.

    The code provided in the examples is the JS we need to add in the header from my understanding.

    I only need to call the var firstname in the HTML. The example which includes the HTML is for an alert and far too complicated for what I want to achieve.

    I added this JS in the header:

    <script>window.msdyncrm_personalizedpage = {
    id:"560dd91e-a774-ec11-8943-002248210888",
    success: function(data) {
    var firstname = data.Data["firstname"];
    result.innerHTML = "Hi" + firstname;
    },
    error: function() {
    alert("failed!");
    }
    };
    </script>

    What will be the next step?

    Thank you.

  • Suggested answer
    Nya Profile Picture
    29,060 on 14 Jan 2022 at 08:12:48

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,425 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,557 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading complete