Sitecore Personalization - Change your landing page based on different channels (i.e. facebook, google)
Arif Uzzaman
Ex-Sitecorean | Ex Solution Architect at Sitecore | XM Cloud | OrderCloud | ContentHub | Solution Architect | Lead Developer | Tech youtuber
Hi There
Today I am going to show you how easy it is to personalize your landing page based on a different channel or different campaign.
Real-Life Scenario: You want to serve different content (ex: you might change the banner of your page to a different one based on the different channel, i.e facebook, google, email etc) based on the different channel. So, you posted facebook adverts and you want a different content of your landing page to be served whoever click that link on the facebook. Similarly, you might want another type of content based on people coming from clicking the link from their email or from google search. This can be done by just a couple of clicks in Sitecore. Let's do implement that feature.
Create a Campaign: Goto Sitecore Launchpad and click "Campaign Creator". Create a campaign by clicking "Create Campaign Activity".
I named this campaign as "facebook-source". Now fill the start, end date and go to the bottom of this form and fillup channel. You will find a lot of predefined channels out of the box. Here I have selected "Online/Social sponsored posts/Facebook sponsored posts". Till this point, you are not gonna see any "Campaign Link". Now save this campaign and once it is saved "Campaign link" will be populated. This link is really important for Sitecore to know which campaign are you from and a triggering point for it.
Personalize your landing page: Now Simply Personalize your landing page to use the different component as below:
Here I have selected the rule that says: "where at least one of campaigns was triggered during the current visit." and select "facebook-source" campaign that we have created earlier. If that above rule satisfied, we are going to change some contents as below:
So, we simply are going to show Page2 content. Now if we look at the personalization we are going to see below:
So we have two variation of the content as shown above. If we expand that we are going to see below image
In this case, if we try selecting the 1st condition, we are going to get below:
It means, our personalization is working. Now the most important part, create a Facebook post and share your landing page. Make sure you going to add your campaign link with the landing page as below:
"https://[server]/landingpage?sc_camp=8AF37B2FEB6C46A3EEE572D1940BD4EB&fbclid=IwAR3JJtHi2OH4cHbGKp8JVExGP6XhqfkU3DDKkesab34DCg_B4slBwY42axA"
Now if you click that link, you are going to land our landing page with the personalized content as below:
Cool right. It's so easy way to personalize your landing page for a channel like Facebook. Similarly, you can personalize your landing page for other channels as required. You might not get everything out of the box sometimes. You might need to write some custom code to handle some scenarios but everything is so easy in Sitecore.
See you soon with another article.
Arif