profile script includes method not working | Community
Skip to main content
Gaureshk_Kodag
Adobe Employee
Adobe Employee
January 7, 2021
Solved

profile script includes method not working

  • January 7, 2021
  • 3 replies
  • 1418 views

Hi community,

I tried using 

.includes()

.indexOf()

.endsWith()

To check if string contains certain word in profile script but none of above is working in profile script..

Can anyone suggest alternative method to check if string contains particular word in profile script??

 

Thanks

Gauresh

 

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 ambikaTewari_ATCI

Hi @gaureshk_kodag  includes() works for me

3 replies

zach_shearer
January 11, 2021

What errors are you seeing? I have the following profile script saved and it was working last I checked. 

 

var viewedPageGroup_pageGroupName = user.get('viewedPageGroup_pageNameGroup') || 0; if (page.url.toLowerCase().indexOf('www.domain.com/page-name/') > -1) { return true; }
surebee
Adobe Employee
Adobe Employee
January 15, 2021

Hey @gaureshk_kodag, how is it going on this issue? Were you able to get it working? Let us know!

ambikaTewari_ATCI
Community Advisor
ambikaTewari_ATCICommunity AdvisorAccepted solution
Community Advisor
January 19, 2021

Hi @gaureshk_kodag  includes() works for me