getNewRepeat plugin web sdk extension | Community
Skip to main content
Level 3
February 11, 2025
Solved

getNewRepeat plugin web sdk extension

  • February 11, 2025
  • 1 reply
  • 579 views

Hi, I am trying to get the 'getNewRepeat' plugin to work. 

 

Issue: the value being set is always shown as "new" and never shows "repeat". 

 

So far I have:

  • published the Common Web SDK Plugins extension
  • created a data element for the "getNewRepeat" plugin
  • applied the data element value to an evar

 

ECID is enabled for the tag, but the value is always showing as "new". I also confirmed the cookie 's_nr' is being set, and also only ever shows as 'new'. I am perhaps missing some other configuration that assists with this plugin to determine if 'new' or 'repeat'?

Best answer by Jennifer_Dungan

I am not sure how the getNewRepeat has been updated for WebSDK, but for quite a while, I didn't find that it work well on AppMeasurement.js.

 

With AppMeasurement, client side cookies were created... but even though they are first party, they are JS set which lowers the authority on them, and with Safari ITP deleting even first party cookies after 7 days... I found I couldn't really trust the values...

 

Now, from your testing, after the initial "new" cookie was set, you did leave the site for more than 30 mins (triggering a new session), then checked that the value was updated to repeat? Basically, the cookie should only be updated to "repeat" on the next session... so all hits on the first session will be "new".

 

However, you might be more interested in creating non-overlapping segments to identify your new and repeat users at the granularity of your choice.... instead of setting a cookie for each variation you need.

 

I did a session on how to do this, you can watch it here:
https://experienceleague.adobe.com/en/docs/events/the-skill-exchange-recordings/analytics/may2023/rockstar-tips

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 11, 2025

I am not sure how the getNewRepeat has been updated for WebSDK, but for quite a while, I didn't find that it work well on AppMeasurement.js.

 

With AppMeasurement, client side cookies were created... but even though they are first party, they are JS set which lowers the authority on them, and with Safari ITP deleting even first party cookies after 7 days... I found I couldn't really trust the values...

 

Now, from your testing, after the initial "new" cookie was set, you did leave the site for more than 30 mins (triggering a new session), then checked that the value was updated to repeat? Basically, the cookie should only be updated to "repeat" on the next session... so all hits on the first session will be "new".

 

However, you might be more interested in creating non-overlapping segments to identify your new and repeat users at the granularity of your choice.... instead of setting a cookie for each variation you need.

 

I did a session on how to do this, you can watch it here:
https://experienceleague.adobe.com/en/docs/events/the-skill-exchange-recordings/analytics/may2023/rockstar-tips

mmasonWDAuthor
Level 3
February 11, 2025

Thank you for this reply! This was a complete misunderstanding of my interpretation of the plugin. I was assuming this should change from new to repeat on page load, not after 30 minutes. 

 

After waiting some time, the value is now showing as repeat. 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 11, 2025

Ahh, yes.. easy mistake to make.. I thought the same thing years ago when I first started trying to use it... but when you think about it, since it's basically a value associated to the visit, that it only changes with the new visit.

 

Glad I could help, and I'm glad the plugin is working as intended! It there was an issue there, we would half to log a bug or try to re-write the plugin ourselves.