Expand my Community achievements bar.

SOLVED

Profile script for visit on multiple pages

Avatar

Level 1

We are currently using profile scripts to track the visitor's frequency on our webpages. However, we have to create a profile script for each page which means most of the code is similar in these scripts barring the first line where we set which page to track for (attaching screenshot of the script). Is there any way by which we can do this in just few scripts where we can tell all the pages to track?

profilescript.jpg

Additionally, the response token only shows the integer count for number of visits. Can the script be made to show the names of the pages as well as the count of visit? This way we will be able to create an audience in audience builder using the script where we can set the number of visits required at a certain page to qualify for audience.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @lakshyakan,

your ProfileScript always returns only a value / string. No object.

It is possible to write from objects as strings - but probably too complex here. In addition, the UserProfile also has limits.

 

Maybe it makes more sense for you to divide the website into categories. In pages write directly attributes to the category - which you can read out via an activity and fill your profile with it accordingly.

 

I don't know for what you need such an exact count exactly. Maybe this is for example the Affinity Model which could fit for you: https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/category-affinity.ht...

 

Personally, I would rather recommend to collect such data in Adobe Analytics and / or via DataLayer Pushes. But less directly in Target - if that has a large scale.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @lakshyakan,

your ProfileScript always returns only a value / string. No object.

It is possible to write from objects as strings - but probably too complex here. In addition, the UserProfile also has limits.

 

Maybe it makes more sense for you to divide the website into categories. In pages write directly attributes to the category - which you can read out via an activity and fill your profile with it accordingly.

 

I don't know for what you need such an exact count exactly. Maybe this is for example the Affinity Model which could fit for you: https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/category-affinity.ht...

 

Personally, I would rather recommend to collect such data in Adobe Analytics and / or via DataLayer Pushes. But less directly in Target - if that has a large scale.