time on site with web sdk | Community
Skip to main content
Michael_Soprano
Level 10
October 21, 2025
Solved

time on site with web sdk

  • October 21, 2025
  • 2 replies
  • 406 views

How would you do such a use-case that user spent more than 10 sec on some specific site?

Best answer by kandersen-1

@kandersen-1 if I pass it with Web SDK to the profile would it be possible to use on the same visit? What is the latency from your experience?


@michael_soprano It's available on the next Target request, so you'll be able to use it immediately.

2 replies

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 22, 2025

Hi Michael,

this sounds more like a tag management task since it supports a Time on Page event type.

 

and in your case send a custom event type with whatever is needed in Target?

alloy("sendEvent", { "renderDecisions": true, "xdm": { "eventType": "web.webinteraction.timeOnPage" // whatever makes sense, there is no out of the box event name }, "data": { "__adobe": { "target": { "pageType": "Order Confirmation", "timeOnPage": 10, } } } })

  

Cheers from Switzerland!
Michael_Soprano
Level 10
October 24, 2025

My case is as below:

Session1

User spents more than 10 secs on a specific site

 

Session 2:

We personalize for that user a banner

 

How to use that attribute 

 "timeOnPage": 10,

in Audiences?

Custom?

 

 

kandersen-1
Community Advisor
Community Advisor
October 27, 2025

@michael_soprano If you want to use it on the next visit, it needs to be passed as a profile parameter, so it is saved to the profile of the user. 

When the profile parameter has been passed, then when creating the segment you'll find it under Visitor Profile. 

Test forum signature
kandersen-1
Community Advisor
Community Advisor
October 23, 2025

@michael_soprano I would achieve this through profile scripts. There's a previous thread here with an example profile script, that you can customize. If it needs to only count on a certain site/section you can include that in the logic for the profile script.

 

 

Test forum signature