Skip to main content
added 42 characters in body
Source Link
battery.cord
  • 8.9k
  • 8
  • 32
  • 59

Are you testing this with a Data Extension and do you have a field in it named 'SubscriberKey'? If not, you will need to use '_SubscriberKey' to pull in the system defined SubscriberKey value, like noted here:

https://help.salesforce.com/articleView?id=mc_es_available_personalization_strings.htm&type=5like noted here.

Additionally, it doesn't appear that for your use case you should be using URLEncode()URLEncode(), and should be using Base64Encode().

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/Base64Encode.htmBase64Encode().

Something similar to the following:

%%[ var @clientkey, @clientkeyencoded, @URLunsubscribe,@enc64 SET @clientkey = _SubscriberKey SET @clientkeyencoded = Base64Encode(@clientkey) SET @URLunsubscribe = Concat("http://example.com/unsubscribe/?sk=",@clientkeyencoded) ]%%

%%=v(@URLunsubscribe)=%%

%%[ 
var @clientkey, @clientkeyencoded, @URLunsubscribe,@enc64
SET @clientkey = _SubscriberKey
SET @clientkeyencoded = Base64Encode(@clientkey)
SET @URLunsubscribe = Concat("http://example.com/unsubscribe/?sk=",@clientkeyencoded)
]%%

%%=v(@URLunsubscribe)=%%

Are you testing this with a Data Extension and do you have a field in it named 'SubscriberKey'? If not, you will need to use '_SubscriberKey' to pull in the system defined SubscriberKey value, like noted here:

https://help.salesforce.com/articleView?id=mc_es_available_personalization_strings.htm&type=5

Additionally, it doesn't appear that for your use case you should be using URLEncode(), and should be using Base64Encode().

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/Base64Encode.htm

Something similar to the following:

%%[ var @clientkey, @clientkeyencoded, @URLunsubscribe,@enc64 SET @clientkey = _SubscriberKey SET @clientkeyencoded = Base64Encode(@clientkey) SET @URLunsubscribe = Concat("http://example.com/unsubscribe/?sk=",@clientkeyencoded) ]%%

%%=v(@URLunsubscribe)=%%

Are you testing this with a Data Extension and do you have a field in it named 'SubscriberKey'? If not, you will need to use '_SubscriberKey' to pull in the system defined SubscriberKey value, like noted here.

Additionally, it doesn't appear that for your use case you should be using URLEncode(), and should be using Base64Encode().

Something similar to the following:

%%[ 
var @clientkey, @clientkeyencoded, @URLunsubscribe,@enc64
SET @clientkey = _SubscriberKey
SET @clientkeyencoded = Base64Encode(@clientkey)
SET @URLunsubscribe = Concat("http://example.com/unsubscribe/?sk=",@clientkeyencoded)
]%%

%%=v(@URLunsubscribe)=%%
Source Link

Are you testing this with a Data Extension and do you have a field in it named 'SubscriberKey'? If not, you will need to use '_SubscriberKey' to pull in the system defined SubscriberKey value, like noted here:

https://help.salesforce.com/articleView?id=mc_es_available_personalization_strings.htm&type=5

Additionally, it doesn't appear that for your use case you should be using URLEncode(), and should be using Base64Encode().

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/Base64Encode.htm

Something similar to the following:

%%[ var @clientkey, @clientkeyencoded, @URLunsubscribe,@enc64 SET @clientkey = _SubscriberKey SET @clientkeyencoded = Base64Encode(@clientkey) SET @URLunsubscribe = Concat("http://example.com/unsubscribe/?sk=",@clientkeyencoded) ]%%

%%=v(@URLunsubscribe)=%%