Properties
url :string
#
The image URL to record a virtual view for
Type:
- string
The image URL to record a virtual view for
viewDuration :number
#
How long the user has been looking at the current image
Type:
- number
How long the user has been looking at the current image
viewStartTime :number
#
Record when the user started looking at the current image
Type:
- number
Record when the user started looking at the current image
wasLastViewLogged :boolean
#
Was the last image view logged or was logging skipped?
Type:
- boolean
Was the last image view logged or was logging skipped?
Methods
attach(url)
#
Sets up the view tracking for the current image
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | URL of the image to record a virtual view for |
Sets up the view tracking for the current image
recordViewDuration()
#
Records the amount of time the current image has been viewed
Records the amount of time the current image has been viewed
setLastViewLogged(wasEventLogged)
#
Tracks whether or not the image view event was logged or not (i.e. was it in the logging sample)
Parameters:
| Name | Type | Description |
|---|---|---|
wasEventLogged |
boolean | Whether the image view event was logged |
Tracks whether or not the image view event was logged or not (i.e.
startViewDuration()
#
Starts recording a viewing window for the current image
Starts recording a viewing window for the current image
stopViewDuration()
#
Stops recording the viewing window for the current image
Stops recording the viewing window for the current image
unattach()
#
Stops listening to events
Stops listening to events
unview()
#
Tracks the unview event of the current image if appropriate
Tracks the unview event of the current image if appropriate