Dynamic Newsletter - content personalization

Ozgur Ozguven asked on February 17, 2016 13:02

Hi all

We like the email marketing experience with the 'dynamic newsletter' approach. We prefer this much more over the static templates. We would also like to do content personalisation based on subscribers' profile data (like Country/State/Town, previous activities etc.) on our marketing emails.

We have created a web page, as a dynamic newsletter template, and added content personalization variants to some of the widgets on the page. But, these personalizations seem to get lost when a newsletter, based on this web page, sent to subscribers.

Is it possible to send out marketing emails to subscribers based on dynamic newsletters with content personalization so that, for example, subscribers that are in different countries will receive slightly different emails?

Thanks Oz

Recent Answers


Roman Hutnyk answered on February 17, 2016 15:22

I'm afraid Kentico generates newsletter in context of public user. You may try to use macro to alter your layout. OnlineMarketingContext contains Contact object, however, I'm not sure this works for you. If it is not - try implementation of the custom macro.

0 votesVote for this answer Mark as a Correct answer

Ozgur Ozguven answered on February 17, 2016 15:40

Thanks a lot Roman. I tried using both "Contact.IsFromCountry" and "OnlineMarketingContext.CurrentContact.IsFromCountry" methods. They work on the page that acts as the dynamic template for the email newsletter, but, as you said, it seems that Kentico generates the email once as public user, and sends the same content to all subscribers.

Having said that, you can insert mini macro statements like {%FirstName|(resolver)subscriber%} and this actually works. Even though a newsletter is based on a dynamic template, these macros are replaced properly for each subscriber.

But we want from Kentico is to generate each individual newsletter email with the context of each subscriber, so, US people US-specific content, and, UK people UK-specific content.

Do you think this can be achieved with custom macros?

Thanks Oz

0 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on February 17, 2016 15:51

I can't tell you this is definitely possible, I'm just trying to provide you with an idea of what might work. Custom macro might work. You might also consider conditional layouts. But it might be easier to create separate pages for different countries and just split subscribers to appropriate groups.

0 votesVote for this answer Mark as a Correct answer

Zach Perry answered on February 17, 2016 17:35

You can create custom macros and use the subscriber resolver to get information specific to that user. But if subscribers are not registered for the site, you may have issues accessing data for them.

If they are all users on your site, then you can create a custom macro and pass in the userid to get content for that user.

0 votesVote for this answer Mark as a Correct answer

John Sharp answered on December 21, 2016 11:44 (last edited on December 10, 2019 02:30)

Hi both Zachary and Roman, I thought I'd try creating a custom macro and pass in the method for the current subscriber.

On the content page something a bit like: {% MyCustomMacro(subscriber) %}

I've also tried with no luck: {% MyCustomMacro((resolver)subscriber) %} {% MyCustomMacro(SubscriberID|(resolver)subscriber) %} {% subscriber.MyCustomMacro() |(identity)GlobalAdministrator%}

The parameter that is passed to my macro function though is always null. Any ideas what I do need to pass in?

Many thanks,

John

0 votesVote for this answer Mark as a Correct answer

Pavel Jiřík answered on February 2, 2017 10:04

Hi John,

To pass subscriber details to your custom macro, you need to write it like this:

{% MyCustomMacro(SubscriberID)|(resolver)subscriber %}

The |(resolver)subscriber part needs to be always kept at the end of the macro expression.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.