Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Increment counter for page views

Avatar

Avatar
Validate 1
Level 1
lalitd49698287
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
lalitd49698287
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
lalitd49698287
Level 1

01-10-2016

Hi All,

I have to create an activity which displays user different offer based on user's visit to the particular page. For instance,

Page View Count 1 to 3 - Offer 1

Page View Count 4-7 - Offer 2 and so on.

Is there any way to achieve this using profile scripting?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct Reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct Reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

03-10-2016

Hi Lalit,

Yes, We can definitely achieve this using Target profile scripting. Please find below the sample code for same which increments the page view count in the profile itself :

var nameofvar = user.getLocal("nameOfProfile") || 0; if(mbox.name =='target-global-mbox') { if (page.url.indexOf("pageURLorDomain") != -1) { nameofvar = nameofvar + 1; user.setLocal("nameOfProfile", nameofvar); } } return nameofvar;

Thanks & Regards

Parit Mittal

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
lalitd49698287
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
lalitd49698287
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
lalitd49698287
Level 1

07-10-2016

Thank You Parit. This is helpful.

Also, I am trying to create a segment in Adobe Analytics using visit number & use that as market cloud audience. I created an experience using the segment as targeted audience. For example: if visit number is between 1 to 3 , user should see the experience. But I am not able to see personalized content. Could you please advise if there is anything that I am doing wrong? Also, the correct way to achieve this? My problem statement is basically to serve different content to user depending upon number of user visit.