Putting PKEY into content block | Community
Skip to main content
Level 3
December 20, 2022
Solved

Putting PKEY into content block

  • December 20, 2022
  • 1 reply
  • 1719 views

We are having an issue with a landing page, that when using a landing page link in an email it doesn't pass through the PKEY at all, and so the landing page doesn't load. If the profile being sent to is linked to a Campaign User then it works. Support haven't been able to find a solution yet. The most recent recommendation was to use a content block instead with something like:

 

pkey=<%= escapeUrl(context.targetData.cusClient.PKey)%>

 

I've tried multiple variations of this such as:

 

pkey=<%= escapeUrl(context.profile.PKey) %>

pkey=<%= context.PKey %>

 

So far none of them have worked. Does anyone have any ideas?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by michaelwilding

Apologies, you're absolutely right. The two profile pKey's didn't work.


This has been resolved with @satheeskannak support. The issue was to do with the forms custom HTML which was breaking the functionality, it needed to be rebuild cloning elements of the pre-existing template to prevent it from happening.

1 reply

SatheeskannaK
Community Advisor
Community Advisor
December 21, 2022

Hi @michaelwilding,

 

Are you able to load landing page with test profile successfully? and did you look at through debug mode?

 

If you could elaborate on when you say it works when included in the campaign that would be helpful.

 

Thanks!

Thanks, Sathees
Level 3
December 21, 2022

Sorry, I should have said, it works perfectly with test profiles and no errors in the debug mode. If I take the URL from an email and manually add a pkey to it, then it works correctly. The issue seems to be the pkey isn't coming across. It doesn't come across if I simply use the Landing Page link in an email. I wasn't completely certain my structure for adding it to the URL in a content block (above) was correct?

Level 3
December 21, 2022

From the screenshot at least the personalization field which was working is NOT the pkey of the profile rather it's a resource pkey (/context/PKey).


Apologies, you're absolutely right. The two profile pKey's didn't work.