dw.web
Class ClickStream
Object
dw.web.ClickStream
Represents the click stream in the session. A maximum number of 50 clicks is recorded per session. After the maximum is reached, each time the customer clicks on a new link, the oldest click stream entry is purged. The ClickStream always remembers the first click.

The click stream is consulted when the GetLastVisitedProducts pipelet is called to retrieve the products that the customer has recently visited.

Properties
clicks  :  List  (Read Only)
A collection with all clicks. The first entry is the oldest entry. The last entry is the latest entry. The method returns a copy of the click stream, which makes it safe to work with the click stream, while it might be modified.
enabled  :  boolean  (Read Only)
Identifies if the clickstream recording is enabled or not. It is considered enabled if either:
  • the method Session.isTrackingAllowed() returns true
  • or if the above method returns false but the preference 'ClickstreamHonorDNT' is set to false.
When clickstream tracking is not enabled the getFirst method still operates as expected but the rest of the clicks are not collected.
first  :  ClickStreamEntry  (Read Only)
The first click within this session. This first click is stored independent of whether entries are purged.
last  :  ClickStreamEntry  (Read Only)
The last recorded click stream, which is also typically the current click. In where rare cases (e.g. RedirectURL pipeline) this is not the current click, but instead the last recorded click.
partial  :  boolean  (Read Only)
Identifies if this is only a partial click stream. If the maximum number of clicks (50) is recorded, the oldest entry is automatically purged with each additional click. In this case, this flag indicates that the click stream is only partial.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getClicks() : List
Returns a collection with all clicks.
getFirst() : ClickStreamEntry
Returns the first click within this session.
getLast() : ClickStreamEntry
Returns the last recorded click stream, which is also typically the current click.
isEnabled() : boolean
Identifies if the clickstream recording is enabled or not.
isPartial() : boolean
Identifies if this is only a partial click stream.
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.

Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβ€”passing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβ€”this is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?

This isn't just another prep courseβ€”it's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.

The Salesforce B2C Commerce Architect certification is a whole different gameβ€”complex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
getClicks
getClicks() : List
Returns a collection with all clicks. The first entry is the oldest entry. The last entry is the latest entry. The method returns a copy of the click stream, which makes it safe to work with the click stream, while it might be modified.
Returns:
a collection of ClickStreamEntry instances, sorted chronologically.

getFirst
getFirst() : ClickStreamEntry
Returns the first click within this session. This first click is stored independent of whether entries are purged.
Returns:
the first click within this session.

getLast
getLast() : ClickStreamEntry
Returns the last recorded click stream, which is also typically the current click. In where rare cases (e.g. RedirectURL pipeline) this is not the current click, but instead the last recorded click.
Returns:
the last recorded click stream, which is also typically the current click.

isEnabled
isEnabled() : boolean
Identifies if the clickstream recording is enabled or not. It is considered enabled if either:
  • the method Session.isTrackingAllowed() returns true
  • or if the above method returns false but the preference 'ClickstreamHonorDNT' is set to false.
When clickstream tracking is not enabled the getFirst method still operates as expected but the rest of the clicks are not collected.
Returns:
whether clickstream tracking is enabled

isPartial
isPartial() : boolean
Identifies if this is only a partial click stream. If the maximum number of clicks (50) is recorded, the oldest entry is automatically purged with each additional click. In this case, this flag indicates that the click stream is only partial.
Returns:
true if this click stream is partial, false otherwise.

β™₯
Notifications pending to read