
Hello Team,
There was a great session in Microsoft Ignite last month (there were many great sessions actually!) on Experimentation for personalized engagement delivered by Shailesh Jain and Preeti Rana.
I was wondering if there is any way we can get a preview of the code snippet for achieving it. I am mainly interested in the JavaScript(?) to deliver the personalized marketing page experience changing the page as on the screenshots below.
It is a great use case to demo to customers and we have a few demos lined up, so I was hoping to get it in.
Thanks,
-DD
Hi DD,
From screenshots you provided, it seems that form/page visitor will get a specialized popup content with their name.
It would be easy to do personalized content:
1. Create a Personalized page record, whitelist fields you want to add personalization,
then copy generated code to your portal/external CMS system.
2. Below is code with my customization:
I used Bootstrap 4, added a static modal element on marketing page.
When form visitor submitted the form and refresh page,
then it will show user a modal with his/her name.
window.msdyncrm_personalizedpage = {
id: "990a78d6-5112-ea11-a811-000d3a33e312",
endpoint: "https://xxxx.svc.dynamics.com",
success: function(data) {
var lastname = data.Data["lastname"];
if (lastname != '' && lastname != null) {
$('.modal-body').html('Hi, ' lastname '
This is specialized content for you.
');
$('#myDialog').modal({
show: true
});
};
},
error: function() {
}
};
The key point is that execute your customization code in snippet below:
success: function(data) {}
3. My demo on a Landing page/form:
Remember to meet all requirements below(Landing page):
1. Contact's Allow prefilling field is set to true.
2. Form is set to Allow prefill
3. All fields are set to be prefilled.
4. Cookies is allowed in client browser.
Personalized content in your screenshot has better design,
you can also make your own's be more beautiful with complex CSS styles.
My full HTML source:
Regards,
Clofly