Web
To track an event using the web package, you can use the corresponding method on the tracker instance. For example:
Example
Codevoorbeeld
val properties = WebPageViewedProperties(
path = path
)
bird.tracker.web.pageViewed(properties)Codevoorbeeld
let properties = WebPageViewedProperties(
path: path
)
bird.tracker.web.pageViewed(properties)Codevoorbeeld
const properties: WebPageViewedProperties = {
path: path
};
Bird.tracker.web.pageViewed(properties, event_opts);Methods
pageViewed()
Codevoorbeeld
val properties = WebPageViewedProperties(
path = path
)
bird.tracker.web.pageViewed(properties)Codevoorbeeld
let properties = WebPageViewedProperties(
path: path
)
bird.tracker.web.pageViewed(properties)Codevoorbeeld
const properties: WebPageViewedProperties = {
path: path
};
Bird.tracker.web.pageViewed(properties, event_opts);WebPageViewedProperties
| Property | Type |
|---|---|
| path? | String |
| referrer? | String |
| search? | String |
| title? | String |
| url? | String |
pageLostFocus()
Codevoorbeeld
val properties = WebPageLostFocusProperties(
path = path
)
bird.tracker.web.pageLostFocus(properties)Codevoorbeeld
let properties = WebPageLostFocusProperties(
path: path
)
bird.tracker.web.pageLostFocus(properties)Codevoorbeeld
const properties: WebPageLostFocusProperties = {
path: path
};
Bird.tracker.web.pageLostFocus(properties, event_opts);WebPageLostFocusProperties
| Property | Type |
|---|---|
| path? | String |
| referrer? | String |
| search? | String |
| title? | String |
| url? | String |
formViewed()
Codevoorbeeld
val properties = WebFormViewedProperties(
formId = formId
)
bird.tracker.web.formViewed(properties)Codevoorbeeld
let properties = WebFormViewedProperties(
formId: formId
)
bird.tracker.web.formViewed(properties)Codevoorbeeld
const properties: WebFormViewedProperties = {
form_id: form_id
};
Bird.tracker.web.formViewed(properties, event_opts);WebFormViewedProperties
| Property | Type |
|---|---|
| form_id? | String |
| step_id? | String |
formSubmitted()
Codevoorbeeld
val properties = WebFormSubmittedProperties(
formId = formId
)
bird.tracker.web.formSubmitted(properties)Codevoorbeeld
let properties = WebFormSubmittedProperties(
formId: formId
)
bird.tracker.web.formSubmitted(properties)Codevoorbeeld
const properties: WebFormSubmittedProperties = {
form_id: form_id
};
Bird.tracker.web.formSubmitted(properties, event_opts);WebFormSubmittedProperties
| Property | Type |
|---|---|
| form_id? | String |
| step_id? | String |
searchSubmitted()
Codevoorbeeld
val properties = WebSearchSubmittedProperties(
searchQuery = searchQuery
)
bird.tracker.web.searchSubmitted(properties)Codevoorbeeld
let properties = WebSearchSubmittedProperties(
searchQuery: searchQuery
)
bird.tracker.web.searchSubmitted(properties)Codevoorbeeld
const properties: WebSearchSubmittedProperties = {
search_query: search_query
};
Bird.tracker.web.searchSubmitted(properties, event_opts);WebSearchSubmittedProperties
| Property | Type |
|---|---|
| search_query? | String |
| search_results_count? | Number |