Activity experience has lag using Target audience | Community
Skip to main content
New Participant
December 21, 2023
Solved

Activity experience has lag using Target audience

  • December 21, 2023
  • 1 reply
  • 2139 views

Hello,

 

I created a simple Profile Script that pulls the value of a query string and stores it.

This is only part of the script to demonstrate:
var myParam = page.param('querystring').toLowerCase() || "";
if (myParam != "") {
return myParam;

 

Then I created an audience that evaluates the query string values (myParam) and visitors that match a specific one (qs1) become part of the audience.

Visitor Profile: user.querystring equals (case sensitive) qs1

 

I created an XT activity and used the audience. I browsed a page on our site and made sure I had querystring=qs1, this is to qualify me to the audience and so I can see the personalization.

 

I tested this setup multiple times and used Incognito. Sometimes, I browsed a page w/ the query string and then I go to the page where the personalization is and I see the personalized content immediately - no lag. Sometimes, I saw the personalization but waited about an hour before it showed up. Another time, the lag is more than an hour.

 

If I browse to the page with the test query string that adds me to the audience, then to the personalized page, is it normal to have a lag? Is it also normal for that lag to be inconsistent (sometimes no lag, sometimes an hour, sometimes more)?

 

Is there a different way using Profile Script + a Target audience to have the experience show up immediately all the time? In other words, eliminate the lag.

 

Thanks!

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 Rajneesh_Gautam_

hi @m_alcantara  - since you are using same URL parameter but two different values for your audiences, I'll suggest configuring two profile-scripts instead of one, for each param-value combination. That will give you much better control on personalised experience delivery. 

 

Let me know if you have any further thoughts

 

Regards

Rajneesh

1 reply

Rajneesh_Gautam_
New Participant
December 29, 2023

hi @m_alcantara  - the lag you have mentioned is not expected. Profile attributes created through profile scripts are available for audience-qualification in real-time.

The profile-script code looks good to me and that it works for you sometimes means it does not have any issues.

While "lag" will require deeper investigation, lets find out whether there are any issues in audience-qualification. Could you please:

1. Activate the profile-attribute as response-tokens.

2. Check the value of your profile-attribute on the page where personalisation needs to be delivered. 

3. Confirm that the profile-attribute value is as expected. 

 

If results from this test are expected then you may need to look at a few scenarios:

1. Activity-check: Using response-tokens, check that you are getting qualified expected experience every time. 

2. There are no clashing activities

 

Lets connect again once you have run these tests. Looking forward to hearing back,

 

Regards

Rajneesh

 

New Participant
January 4, 2024

Hello Rajneesh,

 

Thank you for looking into this. I have two activities set up with each activity using a different audience.

 

The first activity evaluates the entire cid query string; e.g. cid=somevalue. If a visitor goes to any page and has the exact cid query string value in it's entirety, that visitor will qualify for the activity. Then on the page where the activity Delivery is set up, some personalization happens.

I added the response token as advised then purposely went to a page with the cid query string to qualify myself to the activity. It worked. I can see the response tokens and the personalizations were applied.

 

For the second activity, the audience used evaluates the cid query string and looks for something within the string. Therefore, it's set up like so: Visitor Profile: user.cid_param Contains (case insensitive) somethingincid. e.g. if the cid query string is cid=thisvalue:somethingincid:anothervalue, this should qualify because somethingincid is in the cid string.

Once again, I purposely went to a page with the cid query string to qualify myself to the activity. It didn't work, the personalization was not shown. In Console network tab, I filtered by "delivery" and went to the preview tab. The response tokens aren't there, possibly because I didn't qualify for the activity?

 

Note that I only have one profile script set up to pull the cid string. The profile script is as follows:

Profile script name: cid_param

try{
var mboxParam = page.param('cid').toLowerCase() || "";
if (mboxParam != "") {
return mboxParam;
}
}
catch(e){
// Error handling...
}

 

This is the dev console for the second activity that I did not qualify for. Now having said all this, it could be that the "lag" is happening again and I could refresh the page and all of a sudden qualify if I try later.