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

Activity experience has lag using Target audience

  • December 21, 2023
  • 1 reply
  • 2140 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_
Community Advisor
Community Advisor
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

 

Level 4
January 4, 2024

@rajneesh_gautam_  I found out what might be causing the issue. Here's how I'm testing the two audiences and activities.

 

Audience 1:

Visitor Profile: user.cid_param equals (case sensitive) aquerystringhere

Audience 2:

Visitor Profile: user.cid_param Contains (case insensitive) anotherquerystringhere

 

As you can see, the two audiences are somewhat similar. The first one evaluates the entire string and if it matches a specific string I'm using, the visitor qualifies for this audience. The second audience is like a partial match; if part of the query string used by the visitor is found, the visitor qualifies for it.

 

To test, I followed these steps.

1) I went to a webpage and appended the cid query string on purpose to qualify for Audience 1; e.g. https://www.mysite.com/page1/?cid=aquerystringhere.

2) I opened another tab. I went to the page where Activity 1 was delivered to check if the personalization was applied. It was. So far, so good.

3) I opened another browser tab. I repeated similar steps - I went to a page and appended the specific cid string to qualify for the second activity; https://www.mysite.com/page2/?cid=anotherquerystringhere.

4) Then I went to the page where the Activity 2 was delivered. The personalization was applied. At this point, both activities appear to be working.

5) Here is where it fails. I went back to the browser tab where the Activity 1 was being applied. I refreshed the page and the personalization was gone, the page reverted back to the default experience.

6) I was wondering if the first activity stopped working because I went to another page with the second query string (step 3). So, I once again went to a page and appended the cid with the string to qualify for Activity 1 - note that this is the second time I've done this. I refreshed the page where Activity 1 was delivered. The personalization was once again applied.

 

Therefore, my observation is that the activity works fine at first but they stop working when another page view happens and the cid query string value is changed. The first activity worked immediately after I went to a page with the cid string that made me qualify for Audience 1. When I opened a new browser tab and went to a different page with the cid string that made me qualify for Audience 2, the first activity stopped working. How can I set it up so that a visitor can qualify for both activities/audiences rather than only qualifying for the audience that matches the MOST RECENT cid string used?

 

Thank you.

Michael 

Rajneesh_Gautam_
Community Advisor
Rajneesh_Gautam_Community AdvisorAccepted solution
Community Advisor
January 5, 2024

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