public class PageView extends java.lang.Object
This is the representation of a view.
After creation of a new PageView, you can add several properties.
Afterwards you should add the pageView to a Session and perhaps submit the collected data of the session.
Modifier and Type | Field and Description |
---|---|
protected org.json.JSONObject |
properties |
Constructor and Description |
---|
PageView() |
PageView(org.json.JSONObject properties) |
Modifier and Type | Method and Description |
---|---|
PageView |
addBill(java.lang.String billId,
java.lang.String customerId,
java.lang.Double total,
java.lang.String country,
java.lang.String cip,
java.lang.String city)
Adds a billing property
|
PageView |
addCampaign(java.lang.String campaign)
Adds a campaign property
campaign is only stored on first page view of a session.
|
PageView |
addContact(java.lang.String contactType)
Adds a contact property
|
PageView |
addContent(java.lang.String content)
Adds a content property
|
PageView |
addCountryId(java.lang.String countryId)
Adds a country property.
|
PageView |
addDownload(java.lang.String label)
Adds a download property
|
PageView |
addIntern(java.lang.String intern)
Adds a intern property.
|
PageView |
addLangId(java.lang.String langId)
Adds a language property.
|
PageView |
addLogin(java.lang.String userId,
int resultCode)
Adds a login property.
This method always scramble the userId with a MD5 Hash for you. |
PageView |
addLogin(java.lang.String userId,
int resultCode,
boolean scramble)
Adds a login property.
Set Parameter scramble to true, if you want that this library is hashing the userId for you. |
PageView |
addMarker(java.lang.String marker)
Adds a marker property.
|
PageView |
addMarketingChannel(java.lang.String source)
Adds a property for marketing channel ('source').
Default value is 'mobile'. So your traffic is displayed in chapter 'Mobile' in econda Monitor. Please send additional information with the appropriate property. For the newsletter channel 'nl' please use property 'newsletter' for submitting additional information pageView.addMarketingChannel('nl'); pageView.addProperty('newsletter','newsletter name'); For the keyword channel 'kw' please use property 'adword' for submitting additional information. pageView.addMarketingChannel('kw'); pageView.addProperty('adword','keyword campaign name'); For the campaign channel 'cp' and all other channels please use property 'campaign' for submitting additional information. pageView.addMarketingChannel('cp'); pageView.addProperty('campaign','campaign name'); MarketingChannel is only stored on first page view of a session. All subsequent page views in same session inherit the channel of the first page view. Marketingchannel 'mobile' is not configured by default in econda Analytics. Please contact support, if you want to use the mobile channel. |
PageView |
addOrderProcess(java.lang.String processStep)
Adds a orderProcess property.
|
PageView |
addProductAddToBasket(BasketItem item)
adds a addToBasket - Event to this page
|
PageView |
addProductBuy(BasketItem item)
Adds a ec_Event property.
|
PageView |
addProductCustomEvent(BasketItem item,
java.lang.String eventType)
Adds a ec_Event property with custom eventType.
|
PageView |
addProductRemoveFromBasket(BasketItem item)
adds a removeFromBasket - Event to this page
|
PageView |
addProductView(BasketItem item)
Adds a ec_Event property.
|
PageView |
addProperty(java.lang.String key,
java.lang.Boolean value)
Adds a custom Boolean to the properties
|
PageView |
addProperty(java.lang.String key,
org.json.JSONArray jsonArray)
Adds a custom jsonArray to the properties
|
PageView |
addProperty(java.lang.String key,
org.json.JSONObject jsonObject)
Adds a custom jsonObject to the properties
|
PageView |
addProperty(java.lang.String key,
java.lang.Number value)
Adds a custom Number to the properties
|
PageView |
addProperty(java.lang.String key,
java.lang.String value)
Adds a custom String to the properties
|
PageView |
addRegister(java.lang.String userId,
int resultCode)
Adds a register property.
This method always scramble the userId with a MD5 Hash for you. |
PageView |
addRegister(java.lang.String userId,
int resultCode,
boolean scramble)
Adds a register property.
Set Parameter scramble to true, if you want that this library is hashing the userId for you. |
PageView |
addSearch(java.lang.String queryString,
int numberOfHits)
Adds a search property
|
PageView |
addSiteId(java.lang.String siteId)
Adds a siteid property.
|
PageView |
addTarget(java.lang.String target,
java.lang.String additionalInfo,
double score,
TargetRule rule)
Adds a target property.
|
protected final org.json.JSONObject properties
public PageView()
public PageView(org.json.JSONObject properties)
public PageView addProperty(java.lang.String key, java.lang.String value)
key
- value
- public PageView addProperty(java.lang.String key, java.lang.Number value)
key
- value
- public PageView addProperty(java.lang.String key, java.lang.Boolean value)
key
- value
- public PageView addProperty(java.lang.String key, org.json.JSONArray jsonArray)
key
- jsonArray
- public PageView addProperty(java.lang.String key, org.json.JSONObject jsonObject)
key
- jsonObject
- public PageView addContact(java.lang.String contactType)
contactType
- type of the contact-form usedpublic PageView addContent(java.lang.String content)
content
- A content-label for this pagepublic PageView addMarketingChannel(java.lang.String source)
source
- A marketing channelpublic PageView addCampaign(java.lang.String campaign)
campaign
- A campaign namepublic PageView addDownload(java.lang.String label)
label
- a download-label for this pagepublic PageView addBill(java.lang.String billId, java.lang.String customerId, java.lang.Double total, java.lang.String country, java.lang.String cip, java.lang.String city)
billId
- unique identifier for this billcustomerId
- unique identifier for this customertotal
- the total sum of this bill!country
- the country of the customercip
- the cip of the customercity
- the city of the customerpublic PageView addLogin(java.lang.String userId, int resultCode)
userId
- UserID or email - must be a unique identifierresultCode
- 0 if success, positive int for error numberspublic PageView addLogin(java.lang.String userId, int resultCode, boolean scramble)
userId
- UserID or email - must be a unique identifierresultCode
- 0 if success, positive int for error numbersscramble
- whether to use hashed userId or plain userIdpublic PageView addTarget(java.lang.String target, java.lang.String additionalInfo, double score, TargetRule rule)
target
- Name for this Target, e.g. download, lotteryadditionalInfo
- additional Information, e.g. the Name of the downloaded Documentscore
- Your value of this target (used for calculation of conversationrate)rule
- Method to use. Only first of session, all or usage of default value configured in econda-monitorpublic PageView addOrderProcess(java.lang.String processStep)
processStep
- A Label to identify the step in the order-process by
convention this is a positive int followed by an underscore and
the label e.g. "1_Kundendaten", "2_Zahlungsoptionen", ..public PageView addRegister(java.lang.String userId, int resultCode)
userId
- UserID or email - must be a unique identifierresultCode
- 0 if success, positive int for error numberspublic PageView addRegister(java.lang.String userId, int resultCode, boolean scramble)
userId
- UserID or email - must be a unique identifierresultCode
- 0 if success, positive int for error numbersscramble
- whether to hash userId or use given userIdpublic PageView addSearch(java.lang.String queryString, int numberOfHits)
queryString
- the search stringnumberOfHits
- the number of hits foundpublic PageView addSiteId(java.lang.String siteId)
siteId
- unique identifier for this sitepublic PageView addIntern(java.lang.String intern)
intern
- public PageView addMarker(java.lang.String marker)
marker
- public PageView addCountryId(java.lang.String countryId)
countryId
- unique identifier for this countrypublic PageView addLangId(java.lang.String langId)
langId
- unique identifier for this languagepublic PageView addProductAddToBasket(BasketItem item)
item
- the BasketItem this Event belongs topublic PageView addProductRemoveFromBasket(BasketItem item)
item
- the BasketItem this Event belongs topublic PageView addProductBuy(BasketItem item)
item
- BasketItempublic PageView addProductView(BasketItem item)
item
- BasketItem this detail View belongs topublic PageView addProductCustomEvent(BasketItem item, java.lang.String eventType)
item
- the item the EC-Event belongs toeventType
- type of the event like c_add, c_rmv, view, buy