コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

How to build a dynamic URL in a delivery

Avatar

Level 1

I am using a content manager URL to pull content into an email. A hard-coded URL works like a charm. I want to change that URL based on a field in my workflow and I cannot get it to work. For example:

 

The delivery html looks like this:
<HTML><HEAD>
</HEAD>
<BODY>
<P><%@ include file='https://www.google.com/coolstuff' %></P>

</BODY></HTML>

 

This works fine. But lets say I want the end of that URL to take you to a different page the html would look like this:

<HTML><HEAD>
</HEAD>
<BODY>
<P><%@ include file='https://www.google.com/targetData.variables' %></P>

</BODY></HTML>

 

This breaks the URL and renders nothing. 

 

What is the syntax I am missing? or is it even possible?

トピック

トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hi,

 

@include can't be set dynamically.

 

Thanks,

-Jon

元の投稿で解決策を見る

5 返信

Avatar

正解者
Community Advisor

Hi,

 

@include can't be set dynamically.

 

Thanks,

-Jon

Avatar

Level 1
What can I use then for dynamic urls?

Avatar

Community Advisor

Good question. You can diy with the libcurl wrapper in the jsapi:

 

<%
var hcr = new HttpClientRequest('https://marketing.adobe.com');
hcr.url = 'https://www.google.com/' + targetData.variables;
hcr.execute();
%><%= hcr.response.body.toString(hcr.response.codePage) %>

 

Note the constructor arg here is 'https://marketing.adobe.com'.
This is to mitigate a broken feature that was recently added to the already buggy implementation, 'urlPermission'.

Avatar

Level 1

I have a similar issue, however I'm hardcoding the start of the link in the html and using a personalisation block if statement to append the URl e.g https://www.google.com/<%@ include view="blockName" %>.

 

When this is sent as a proof, it appends the link with every value from the if and remaining else if statements. In the proof preview screen, it work when I select a user who falls into the if statement, but not when sending a proof.

 

@Jonathon_wodnicki are you saying this method shouldn't work either?

Avatar

Level 2

Hi,

Can you please share what error you received on browser?

 

In delivery, you need to pass targetData from your Campaign's workflow, if looks like either the target data is not defined correctly or the null value is getting passed as the target data. 

 

You can also debug your code, try to print tagetDate variable both in workflow and delivery and see what result you re getting. 

Hope this helps

 

Regards