in AJO dynamic URLs not getting tracked | Community
Skip to main content
mohit_khare
Level 3
August 14, 2026
Question

in AJO dynamic URLs not getting tracked

  • August 14, 2026
  • 10 replies
  • 97 views

Hi Team,

We have a AJO journey where we are fetching some data like Text and URL using a API call in a custom action and then using the variable fields like: {{{offerCard.offerCardImage.body}}} and {{{offerCard.offerCardImage.url}}} to populate the details in the HTML email.
Its working fine but for the URL part we had to use <a href="{{{offerCard.offerCardImage.url}}}">Click Here</a> due to which AJo is not able to track the URL in reporting as well as its not able to encode the URL with the UTM parameters like it does for the hardcoded URLs.

I have tried using <a href="https://{{{offerCard.offerCardImage.url}}}">Click Here</a> but it gives me an error saying: Personalisation not allowed in domain.

Also if I do like this: <a href="https://{%= (replace(offerCard.offerCardImage.url, "https://", "")) }">Click Here</a> the double quotes get converted into the code " breaking the HTML while saving.
same happens with: <a href='https://{%= (replace(offerCard.offerCardImage.url, "https://", "")) }'>Click Here</a> using single quot in the href part

Has anyone faced the issue before and if yes how do i get around this so that the URL is populated dynamically and also is tracked
 

Please let mek nwo if any further details are needed. Also, Please let me know if anyone has any workaround or a solution to this. It would be very helpful.

Thanks,
Mohit

10 replies

Level 3
August 14, 2026

Hi ​@mohit_khare Yes, I’ve encountered this problem with tracking. Could you try either of the below solutions?

 

{% let offerURL = offerCard.offerCardImage.url %}

{% let offerURL = substr(offerURL, indexOf(offerURL, "//")+2, length(offerURL)) %}

 <a href="https://{{{offerURL}}}">Click Here</a>

(or)
 

{% let offerURL = offerCard.offerCardImage.url %}

{% let offerURL = replace(offerURL, "https://", "") %}

 <a href="https://{{{offerURL}}}">Click Here</a>

Hope this helps!

Regards,
Ganesh Kumar

mohit_khare
Level 3
August 14, 2026

Hi ​@IamCGK ,

Thanks for the reply. I tried some thing like that before.

but while trying the above code:

the code view gets validated properly without any errors.
But then I save and come out of the email editor in the alerts on the top of the canvas I g et an error: “Personalization not allowed in domain name. https://{{{ctaURL}}}” type: “CJMTL-010018-422”

SatheeskannaK
Community Advisor
Community Advisor
August 14, 2026

@mohit_khare You mentioned getting a response from a custom action and using that in the email HTML personalization. We ran into a similar issue and found that using an HTML component with the code below helped us track the action at the CTA level. Ignore the stylings.


{{#each context.journey.actions.1234.results as |test|}}
<a href="https://www.example.com/test/{{test.name}}?campaign=test" class="arc-link" style="text-decoration:none;">
<span style="color:rgb(233, 233, 233);line-height:23px;font-size:12px;font-weight:normal;font-style:normal;" contenteditable="true>Clicl Here</span></div>
</a>
{{/each}}
  • I noticed you’re trying to personalize the entire URL, including the domain. If that’s the goal, you might want to check out this documentation.

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/channels/email/design-email/add-content/url-personalization

 

Thanks, Sathees
mohit_khare
Level 3
August 14, 2026

Hi ​@SatheeskannaK,

We are using the first code to get the individual components into the email, including the URL.

Our URL could be anything ranging from https://www.youtube.com/<page1> to our internal URLs like https://www.abobe.com/page1?UTM1 

So in this case dowe need to add just https://www.youtube.com and https://www.abobe.com or all the complete URLs like: https://www.youtube.com/page1 and https://www.abobe.com/page1?UTM1 

mohit_khare
Level 3
August 14, 2026

Hi ​@SatheeskannaK,

Sorry, read the whole document and it seems that i have allow base domain like www.youtube.com.

Do you know how much time does it take to get it allowed, or is it instant.

Also, if this works, will we be able to track the URL used like 

<a href="{{test.name}}" class="arc-link" style="text-decoration:none;">

not <a

<a href="https://www.example.com/test/{{test.name}}?campaign=test" class="arc-link" style="text-decoration:none;">