Properties
url
#
The image URL to record a virtual view for
Properties:
| Type | Description |
|---|---|
| string |
The image URL to record a virtual view for
viewDuration
#
How long the user has been looking at the current image
Properties:
| Type | Description |
|---|---|
| number |
How long the user has been looking at the current image
viewStartTime
#
Record when the user started looking at the current image
Properties:
| Type | Description |
|---|---|
| number |
Record when the user started looking at the current image
wasLastViewLogged
#
Was the last image view logged or was logging skipped?
Properties:
| Type | Description |
|---|---|
| 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