Target activity/preview links not reflecting the changes | Community
Skip to main content
Level 4
January 24, 2022
Solved

Target activity/preview links not reflecting the changes

  • January 24, 2022
  • 1 reply
  • 2168 views

We have installed the code for target on the website - https://www.murdochuniversitydubai.com/

 

However it is not working and showing above warning. Can anyone help debug the issue please?

 

 

 

 

However it is not working

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 Gokul_Agiwal

Thanks @gokul_agiwal ,

 

Added the below code but still not working

 

$(function(){
window.targetGlobalSettings = {
cookieDomain: "ucic.ac.nz"
};
});


Hi @sarin 

Looks like this is a cloud based instance. I just checked in Public Suffix List, and found that ac.nz domain is in list so please check this guide Use cloud-based instances with Target .If you intend to use cloud-based instances with domains included on the Public Suffix List, you need to add this into cookieDomain to targetGlobalSettings()

 

I noticed that you added the code directly into page instead add this code before at.js loaded either through launch or directly into Target interface. 

window.targetGlobalSettings = { cookieDomain: "ucic.ac.nz" };

 

Hope this helps and it should work. 

1 reply

Gokul_Agiwal
Community Advisor
Community Advisor
January 24, 2022

Hi @sarin 

Looks like there is some issues with your host setting. 

A host is any domain from which a Target request is made. On a website, it is usually the location.hostname property of the URL making the Target request.

 

By default, Target does not limit a host that can make Target requests and receive Target responses. When new hosts make requests, they automatically work. This process also enables testing on different domains you don’t know or can’t anticipate. If you want to override this default behaviour, you can set up an allow list or blocklist to limit which hosts work with Target.

 

To create a allowlist: you can refer below link 

https://experienceleague.adobe.com/docs/target/using/administer/hosts.html?lang=en  

SarinAuthor
Level 4
January 24, 2022

Thanks for the quick response @gokul_agiwal 

 

I checked and this domain (website) is not showing in host list, not sure why as per my understanding it should automatically show correct?

 

This is the preview link for the activity where the changes are not reflecting: https://www.murdochuniversitydubai.com/?at_preview_token=D2K1gRGkzV-xsrQSwpdYCQ&at_preview_index=1_1&at_preview_listed_activities_only=true

 

I also clicked on Authorize host and manually added www.murdochuniversitydubai.com,  murdochuniversitydubai.com under host contains but its still not showing.. How can we fix this please?

 

 

SarinAuthor
Level 4
January 24, 2022

Hi @sarin 

You need to set your Target cookies at the domain / sub-domain level in this case.  Refer below link

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/integrations/target/load-and-fire-target.html?lang=en#why-are-my-mboxes-not-firing-on-my-web-pages%3F 

Essentially, you need to set the domain at.js uses for storing cookies. You can do that with targetGlobalSettings() function. Here's a sample of how to set the cookie domain to a subdomain:

window.targetGlobalSettings = { // Either or or from below cookieDomain: domain.com // set cookies on the domain level cookieDomain: subdomain.domain.com // set cookies on the subdomain level };

This needs to be set prior to the at.js inclusion on the page.

Hope this helps.


Thanks @gokul_agiwal ,

 

Added the below code but still not working

 

$(function(){
window.targetGlobalSettings = {
cookieDomain: "ucic.ac.nz"
};
});