public class PiwikRequest extends Object
PiwikTracker.| Modifier and Type | Field and Description |
|---|---|
static int |
AUTH_TOKEN_LENGTH |
static int |
ID_LENGTH |
| Constructor and Description |
|---|
PiwikRequest(Integer siteId,
URL actionUrl)
Create a new request from the id of the site being tracked and the full
url for the current action.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomTrackingParameter(String key,
Object value)
Add a custom tracking parameter to the specified key.
|
void |
addEcommerceItem(EcommerceItem item)
Add an
EcommerceItem to this order. |
void |
clearCustomTrackingParameter()
Removes all custom tracking parameters
|
void |
clearEcommerceItems()
Clears all
EcommerceItem from this order. |
void |
enableEcommerce()
Sets idgoal=0 in the request to track an ecommerce interaction:
cart update or an ecommerce order.
|
String |
getActionName()
Get the title of the action being tracked
|
Long |
getActionTime()
Get the amount of time it took the server to generate this action, in milliseconds.
|
URL |
getActionUrl()
Get the full URL for the current action.
|
String |
getActionUrlAsString()
Get the full URL for the current action.
|
String |
getApiVersion()
Get the api version
|
String |
getAuthToken()
Get the authorization key.
|
String |
getCampaignKeyword()
Get the campaign keyword
|
String |
getCampaignName()
Get the campaign name
|
Charset |
getCharacterSet()
Get the charset of the page being tracked
|
String |
getContentInteraction()
Get the name of the interaction with the content
|
String |
getContentName()
Get the name of the content
|
String |
getContentPiece()
Get the content piece.
|
URL |
getContentTarget()
Get the content target
|
String |
getContentTargetAsString()
Get the content target
|
Integer |
getCurrentHour()
Get the current hour.
|
Integer |
getCurrentMinute()
Get the current minute.
|
Integer |
getCurrentSecond()
Get the current second
|
List |
getCustomTrackingParameter(String key)
Gets the list of objects currently stored at the specified custom tracking
parameter.
|
String |
getDeviceResolution()
Get the resolution of the device
|
URL |
getDownloadUrl()
Get the url of a file the user had downloaded
|
String |
getDownloadUrlAsString()
Get the url of a file the user had downloaded
|
Double |
getEcommerceDiscount()
Get the discount offered.
|
String |
getEcommerceId()
Get the id of this order.
|
EcommerceItem |
getEcommerceItem(int index)
Get the
EcommerceItem at the specified index |
Long |
getEcommerceLastOrderTimestamp()
Get the timestamp of the customer's last ecommerce order
|
Double |
getEcommerceRevenue()
Get the grand total of the ecommerce order.
|
Double |
getEcommerceShippingCost()
Get the shipping cost of the ecommerce order.
|
Double |
getEcommerceSubtotal()
Get the subtotal of the ecommerce order; excludes shipping.
|
Double |
getEcommerceTax()
Get the tax amount of the ecommerce order.
|
String |
getEventAction()
Get the event action.
|
String |
getEventCategory()
Get the event category.
|
String |
getEventName()
Get the event name.
|
Number |
getEventValue()
Get the event value.
|
Integer |
getGoalId()
Get the goal id
|
Double |
getGoalRevenue()
Get the goal revenue.
|
String |
getHeaderAcceptLanguage()
Get the Accept-Language HTTP header
|
String |
getHeaderUserAgent()
Get the User-Agent HTTP header
|
Boolean |
getNewVisit()
Get if this request will force a new visit.
|
URL |
getOutlinkUrl()
Get the outlink url
|
String |
getOutlinkUrlAsString()
Get the outlink url
|
CustomVariable |
getPageCustomVariable(int index)
Get the page custom variable at the specified index.
|
String |
getPageCustomVariable(String key)
Deprecated.
Use the
getPageCustomVariable(int) method instead. |
Boolean |
getPluginDirector()
Check if the visitor has the Director plugin.
|
Boolean |
getPluginFlash()
Check if the visitor has the Flash plugin.
|
Boolean |
getPluginGears()
Check if the visitor has the Gears plugin.
|
Boolean |
getPluginJava()
Check if the visitor has the Java plugin.
|
Boolean |
getPluginPDF()
Check if the visitor has the PDF plugin.
|
Boolean |
getPluginQuicktime()
Check if the visitor has the Quicktime plugin.
|
Boolean |
getPluginRealPlayer()
Check if the visitor has the RealPlayer plugin.
|
Boolean |
getPluginSilverlight()
Check if the visitor has the Silverlight plugin.
|
Boolean |
getPluginWindowsMedia()
Check if the visitor has the Windows Media plugin.
|
String |
getQueryString()
Get the query string represented by this object.
|
static String |
getRandomHexString(int length)
Get a random hexadecimal string of a specified length.
|
String |
getRandomValue()
Get the random value for this request
|
URL |
getReferrerUrl()
Get the referrer url
|
String |
getReferrerUrlAsString()
Get the referrer url
|
PiwikDate |
getRequestDatetime()
Get the datetime of the request
|
Boolean |
getRequired()
Get if this request will be tracked.
|
Boolean |
getResponseAsImage()
Get if the response will be an image.
|
String |
getSearchCategory()
Get the search category
|
String |
getSearchQuery()
Get the search query.
|
Long |
getSearchResultsCount()
Get the search results count.
|
Integer |
getSiteId()
Get the id of the website we're tracking.
|
Boolean |
getTrackBotRequests()
Set if bot requests should be tracked
|
String |
getUrlEncodedQueryString()
Get the url encoded query string represented by this object.
|
String |
getUserCustomVariable(String key)
Deprecated.
Use the
getVisitCustomVariable(int) method instead. |
String |
getUserId()
Get the user id for this request.
|
CustomVariable |
getVisitCustomVariable(int index)
Get the visit custom variable at the specified index.
|
String |
getVisitorCity()
Get the visitor's city.
|
PiwikLocale |
getVisitorCountry()
Get the visitor's country.
|
String |
getVisitorCustomId()
Get the visitor's custom id.
|
Long |
getVisitorFirstVisitTimestamp()
Get the timestamp of the visitor's first visit.
|
String |
getVisitorId()
Get the visitor's id.
|
String |
getVisitorIp()
Get the visitor's ip.
|
Double |
getVisitorLatitude()
Get the visitor's latitude.
|
Double |
getVisitorLongitude()
Get the visitor's longitude.
|
Long |
getVisitorPreviousVisitTimestamp()
Get the timestamp of the visitor's previous visit.
|
String |
getVisitorRegion()
Get the visitor's region.
|
Integer |
getVisitorVisitCount()
Get the count of visits for this visitor.
|
void |
setActionName(String actionName)
Set the title of the action being tracked.
|
void |
setActionTime(Long actionTime)
Set the amount of time it took the server to generate this action, in milliseconds.
|
void |
setActionUrl(URL actionUrl)
Set the full URL for the current action.
|
void |
setActionUrlWithString(String actionUrl)
Set the full URL for the current action.
|
void |
setApiVersion(String apiVersion)
Set the api version to use (currently always set to 1)
|
void |
setAuthToken(String authToken)
Set the 32 character authorization key used to authenticate the API request.
|
void |
setCampaignKeyword(String campaignKeyword)
Set the Campaign Keyword (see
Tracking Campaigns).
|
void |
setCampaignName(String campaignName)
Set the Campaign Name (see
Tracking Campaigns).
|
void |
setCharacterSet(Charset characterSet)
The charset of the page being tracked.
|
void |
setContentInteraction(String contentInteraction)
Set the name of the interaction with the content.
|
void |
setContentName(String contentName)
Set the name of the content.
|
void |
setContentPiece(String contentPiece)
Set the actual content piece.
|
void |
setContentTarget(URL contentTarget)
Set the target of the content.
|
void |
setContentTargetWithString(String contentTarget)
Set the target of the content.
|
void |
setCurrentHour(Integer currentHour)
Set the current hour (local time).
|
void |
setCurrentMinute(Integer currentMinute)
Set the current minute (local time).
|
void |
setCurrentSecond(Integer currentSecond)
Set the current second (local time).
|
void |
setCustomTrackingParameter(String key,
Object value)
Set a custom tracking parameter whose toString() value will be sent to
the Piwik server.
|
void |
setDeviceResolution(String deviceResolution)
Set the resolution of the device the visitor is using, eg 1280x1024.
|
void |
setDownloadUrl(URL downloadUrl)
Set the url of a file the user has downloaded.
|
void |
setDownloadUrlWithString(String downloadUrl)
Set the url of a file the user has downloaded.
|
void |
setEcommerceDiscount(Double discount)
Set the discount offered.
|
void |
setEcommerceId(String id)
Set the unique string identifier for the ecommerce order (required when
tracking an ecommerce order).
|
void |
setEcommerceLastOrderTimestamp(Long timestamp)
Set the UNUX timestamp of this customer's last ecommerce order.
|
void |
setEcommerceRevenue(Double revenue)
Set the grand total of the ecommerce order (required when tracking an
ecommerce order).
|
void |
setEcommerceShippingCost(Double shippingCost)
Set the shipping cost of the ecommerce order.
|
void |
setEcommerceSubtotal(Double subtotal)
Set the subtotal of the ecommerce order; excludes shipping.
|
void |
setEcommerceTax(Double tax)
Set the tax amount of the ecommerce order.
|
void |
setEventAction(String eventAction)
Set the event action.
|
void |
setEventCategory(String eventCategory)
Set the event category.
|
void |
setEventName(String eventName)
Set the event name.
|
void |
setEventValue(Number eventValue)
Set the event value.
|
void |
setGoalId(Integer goalId)
Set the goal id.
|
void |
setGoalRevenue(Double goalRevenue)
Set a monetary value that was generated as revenue by this goal conversion.
|
void |
setHeaderAcceptLanguage(String acceptLangage)
Set an override value for the Accept-Language HTTP header
field.
|
void |
setHeaderUserAgent(String userAgent)
Set an override value for the User-Agent HTTP header field.
|
void |
setNewVisit(Boolean newVisit)
If set to true, will force a new visit to be created for this action.
|
void |
setOutlinkUrl(URL outlinkUrl)
Set an external URL the user has opened.
|
void |
setOutlinkUrlWithString(String outlinkUrl)
Set an external URL the user has opened.
|
void |
setPageCustomVariable(CustomVariable customVariable,
int index)
Set a page custom variable at the specified index.
|
void |
setPageCustomVariable(String key,
String value)
Deprecated.
Use the
setPageCustomVariable(CustomVariable, int) method instead. |
void |
setPluginDirector(Boolean director)
Set if the visitor has the Director plugin.
|
void |
setPluginFlash(Boolean flash)
Set if the visitor has the Flash plugin.
|
void |
setPluginGears(Boolean gears)
Set if the visitor has the Gears plugin.
|
void |
setPluginJava(Boolean java)
Set if the visitor has the Java plugin.
|
void |
setPluginPDF(Boolean pdf)
Set if the visitor has the PDF plugin.
|
void |
setPluginQuicktime(Boolean quicktime)
Set if the visitor has the Quicktime plugin.
|
void |
setPluginRealPlayer(Boolean realPlayer)
Set if the visitor has the RealPlayer plugin.
|
void |
setPluginSilverlight(Boolean silverlight)
Set if the visitor has the Silverlight plugin.
|
void |
setPluginWindowsMedia(Boolean windowsMedia)
Set if the visitor has the Windows Media plugin.
|
void |
setRandomValue(String randomValue)
Set a random value that is generated before each request.
|
void |
setReferrerUrl(URL referrerUrl)
Set the full HTTP Referrer URL.
|
void |
setReferrerUrlWithString(String referrerUrl)
Set the full HTTP Referrer URL.
|
void |
setRequestDatetime(PiwikDate datetime)
Set the datetime of the request (normally the current time is used).
|
void |
setRequired(Boolean required)
Set if this request will be tracked by the Piwik server.
|
void |
setResponseAsImage(Boolean responseAsImage)
Set if the response will be an image.
|
void |
setSearchCategory(String searchCategory)
Specify a search category with this parameter.
|
void |
setSearchQuery(String searchQuery)
Set the search query.
|
void |
setSearchResultsCount(Long searchResultsCount)
We recommend to set the
search count to the number of search results displayed on the results page.
|
void |
setSiteId(Integer siteId)
Set the ID of the website we're tracking a visit/action for.
|
void |
setTrackBotRequests(Boolean trackBotRequests)
By default Piwik does not track bots.
|
void |
setUserCustomVariable(String key,
String value)
Deprecated.
Use the
setVisitCustomVariable(CustomVariable, int) method instead. |
void |
setUserId(String userId)
Set the user id for this request.
|
void |
setVisitCustomVariable(CustomVariable customVariable,
int index)
Set a user custom variable at the specified key.
|
void |
setVisitorCity(String city)
Set an override value for the city.
|
void |
setVisitorCountry(PiwikLocale country)
Set an override value for the country.
|
void |
setVisitorCustomId(String visitorCustomId)
Set a custom visitor ID for this request.
|
void |
setVisitorFirstVisitTimestamp(Long timestamp)
Set the UNIX timestamp of this visitor's first visit.
|
void |
setVisitorId(String visitorId)
Set the unique visitor ID, must be a 16 characters hexadecimal string.
|
void |
setVisitorIp(String visitorIp)
Set the override value for the visitor IP (both IPv4 and IPv6 notations
supported).
|
void |
setVisitorLatitude(Double latitude)
Set an override value for the visitor's latitude, eg 22.456.
|
void |
setVisitorLongitude(Double longitude)
Set an override value for the visitor's longitude, eg 22.456.
|
void |
setVisitorPreviousVisitTimestamp(Long timestamp)
Set the UNIX timestamp of this visitor's previous visit.
|
void |
setVisitorRegion(String region)
Set an override value for the region.
|
void |
setVisitorVisitCount(Integer visitorVisitCount)
Set the current count of visits for this visitor.
|
void |
verifyAuthTokenSet()
Verifies that AuthToken has been set for this request.
|
void |
verifyEcommerceEnabled()
Verifies that Ecommerce has been enabled for the request.
|
void |
verifyEcommerceState()
Verifies that Ecommerce has been enabled and that Ecommerce Id and
Ecommerce Revenue have been set for the request.
|
public static final int ID_LENGTH
public static final int AUTH_TOKEN_LENGTH
public PiwikRequest(Integer siteId, URL actionUrl)
Required = true
Visior Id = random 16 character hex string
Random Value = random 20 character hex string
API version = 1
Response as Image = false
Overwrite these values yourself as desired.siteId - the id of the website we're tracking a visit/action foractionUrl - the full URL for the current actionpublic String getActionName()
public void setActionName(String actionName)
actionName - the title of the action to set. A null value will remove this parameterpublic Long getActionTime()
public void setActionTime(Long actionTime)
actionTime - the amount of time to set. A null value will remove this parameterpublic URL getActionUrl()
TypeConstraintException - if the stored Action URL is a stringpublic String getActionUrlAsString()
TypeConstraintException - if the stored Action URL is a URLpublic void setActionUrl(URL actionUrl)
actionUrl - the full URL to set. A null value will remove this parameterpublic void setActionUrlWithString(String actionUrl)
actionUrl - the full URL to set. A null value will remove this parameterpublic String getApiVersion()
public void setApiVersion(String apiVersion)
apiVersion - the api version to set. A null value will remove this parameterpublic String getAuthToken()
public void setAuthToken(String authToken)
authToken - the authorization key to set. A null value will remove this parameterpublic void verifyAuthTokenSet()
IllegalStateException if not.public String getCampaignKeyword()
public void setCampaignKeyword(String campaignKeyword)
campaignKeyword - the campaign keyword to set. A null value will remove this parameterpublic String getCampaignName()
public void setCampaignName(String campaignName)
campaignName - the campaign name to set. A null value will remove this parameterpublic Charset getCharacterSet()
public void setCharacterSet(Charset characterSet)
characterSet - the charset to set. A null value will remove this parameterpublic String getContentInteraction()
public void setContentInteraction(String contentInteraction)
contentInteraction - the name of the interaction to set. A null value will remove this parameterpublic String getContentName()
public void setContentName(String contentName)
contentName - the name to set. A null value will remove this parameterpublic String getContentPiece()
public void setContentPiece(String contentPiece)
contentPiece - the content piece to set. A null value will remove this parameterpublic URL getContentTarget()
TypeConstraintException - if the stored Content Target is a stringpublic String getContentTargetAsString()
TypeConstraintException - if the stored Content Target is a URLpublic void setContentTarget(URL contentTarget)
contentTarget - the target to set. A null value will remove this parameterpublic void setContentTargetWithString(String contentTarget)
contentTarget - the target to set. A null value will remove this parameterpublic Integer getCurrentHour()
public void setCurrentHour(Integer currentHour)
currentHour - the hour to set. A null value will remove this parameterpublic Integer getCurrentMinute()
public void setCurrentMinute(Integer currentMinute)
currentMinute - the minute to set. A null value will remove this parameterpublic Integer getCurrentSecond()
public void setCurrentSecond(Integer currentSecond)
currentSecond - the second to set. A null value will remove this parameterpublic List getCustomTrackingParameter(String key)
key - the key of the parameter whose list of objects to get. Cannot be nullpublic void setCustomTrackingParameter(String key, Object value)
key - the parameter's key. Cannot be nullvalue - the parameter's value. Removes the parameter if nullpublic void addCustomTrackingParameter(String key, Object value)
key - the parameter's key. Cannot be nullvalue - the parameter's value. Cannot be nullpublic void clearCustomTrackingParameter()
public String getDeviceResolution()
public void setDeviceResolution(String deviceResolution)
deviceResolution - the resolution to set. A null value will remove this parameterpublic URL getDownloadUrl()
TypeConstraintException - if the stored Download URL is a Stringpublic String getDownloadUrlAsString()
TypeConstraintException - if the stored Download URL is a URLpublic void setDownloadUrl(URL downloadUrl)
downloadUrl - the url to set. A null value will remove this parameterpublic void setDownloadUrlWithString(String downloadUrl)
downloadUrl - the url to set. A null value will remove this parameterpublic void enableEcommerce()
public void verifyEcommerceEnabled()
IllegalStateException if not.public void verifyEcommerceState()
IllegalStateException if not.public Double getEcommerceDiscount()
public void setEcommerceDiscount(Double discount)
discount - the discount to set. A null value will remove this parameterpublic String getEcommerceId()
public void setEcommerceId(String id)
id - the id to set. A null value will remove this parameterpublic EcommerceItem getEcommerceItem(int index)
EcommerceItem at the specified indexindex - the index of the EcommerceItem to returnEcommerceItem at the specified indexpublic void addEcommerceItem(EcommerceItem item)
EcommerceItem to this order. Ecommerce must be enabled,
and EcommerceId and EcommerceRevenue must first be set.item - the EcommerceItem to add. Cannot be nullpublic void clearEcommerceItems()
EcommerceItem from this order.public Long getEcommerceLastOrderTimestamp()
public void setEcommerceLastOrderTimestamp(Long timestamp)
timestamp - the timestamp to set. A null value will remove this parameterpublic Double getEcommerceRevenue()
public void setEcommerceRevenue(Double revenue)
revenue - the grand total to set. A null value will remove this parameterpublic Double getEcommerceShippingCost()
public void setEcommerceShippingCost(Double shippingCost)
shippingCost - the shipping cost to set. A null value will remove this parameterpublic Double getEcommerceSubtotal()
public void setEcommerceSubtotal(Double subtotal)
subtotal - the subtotal to set. A null value will remove this parameterpublic Double getEcommerceTax()
public void setEcommerceTax(Double tax)
tax - the tax amount to set. A null value will remove this parameterpublic String getEventAction()
public void setEventAction(String eventAction)
eventAction - the event action to set. A null value will remove this parameterpublic String getEventCategory()
public void setEventCategory(String eventCategory)
eventCategory - the event category to set. A null value will remove this parameterpublic String getEventName()
public void setEventName(String eventName)
eventName - the event name to set. A null value will remove this parameterpublic Number getEventValue()
public void setEventValue(Number eventValue)
eventValue - the event value to set. A null value will remove this parameterpublic Integer getGoalId()
public void setGoalId(Integer goalId)
goalId - the goal id to set. A null value will remove this parameterpublic Double getGoalRevenue()
public void setGoalRevenue(Double goalRevenue)
goalRevenue - the goal revenue to set. A null value will remove this parameterpublic String getHeaderAcceptLanguage()
public void setHeaderAcceptLanguage(String acceptLangage)
acceptLangage - the Accept-Language HTTP header to set. A null value will remove this parameterpublic String getHeaderUserAgent()
public void setHeaderUserAgent(String userAgent)
userAgent - the User-Agent HTTP header tos etpublic Boolean getNewVisit()
public void setNewVisit(Boolean newVisit)
newVisit - if this request will force a new visitpublic URL getOutlinkUrl()
TypeConstraintException - if the stored Outlink URL is a Stringpublic String getOutlinkUrlAsString()
TypeConstraintException - if the stored Outlink URL is a URLpublic void setOutlinkUrl(URL outlinkUrl)
outlinkUrl - the outlink url to set. A null value will remove this parameterpublic void setOutlinkUrlWithString(String outlinkUrl)
outlinkUrl - the outlink url to set. A null value will remove this parameter@Deprecated public String getPageCustomVariable(String key)
getPageCustomVariable(int) method instead.key - the key of the variable to getpublic CustomVariable getPageCustomVariable(int index)
index - the index of the variable to get. Must be greater than 0@Deprecated public void setPageCustomVariable(String key, String value)
setPageCustomVariable(CustomVariable, int) method instead.key - the key of the variable to setvalue - the value of the variable to set at the specified key. A null value will remove this custom variablepublic void setPageCustomVariable(CustomVariable customVariable, int index)
customVariable - the CustomVariable to set. A null value will remove the CustomVariable at the specified indexindex - the index of he CustomVariable to setpublic Boolean getPluginDirector()
public void setPluginDirector(Boolean director)
director - true if the visitor has the Director pluginpublic Boolean getPluginFlash()
public void setPluginFlash(Boolean flash)
flash - true if the visitor has the Flash pluginpublic Boolean getPluginGears()
public void setPluginGears(Boolean gears)
gears - true if the visitor has the Gears pluginpublic Boolean getPluginJava()
public void setPluginJava(Boolean java)
java - true if the visitor has the Java pluginpublic Boolean getPluginPDF()
public void setPluginPDF(Boolean pdf)
pdf - true if the visitor has the PDF pluginpublic Boolean getPluginQuicktime()
public void setPluginQuicktime(Boolean quicktime)
quicktime - true if the visitor has the Quicktime pluginpublic Boolean getPluginRealPlayer()
public void setPluginRealPlayer(Boolean realPlayer)
realPlayer - true if the visitor has the RealPlayer pluginpublic Boolean getPluginSilverlight()
public void setPluginSilverlight(Boolean silverlight)
silverlight - true if the visitor has the Silverlight pluginpublic Boolean getPluginWindowsMedia()
public void setPluginWindowsMedia(Boolean windowsMedia)
windowsMedia - true if the visitor has the Windows Media pluginpublic String getRandomValue()
public void setRandomValue(String randomValue)
randomValue - the random value to set. A null value will remove this parameterpublic URL getReferrerUrl()
TypeConstraintException - if the stored Referrer URL is a Stringpublic String getReferrerUrlAsString()
TypeConstraintException - if the stored Referrer URL is a URLpublic void setReferrerUrl(URL referrerUrl)
referrerUrl - the referrer url to set. A null value will remove this parameterpublic void setReferrerUrlWithString(String referrerUrl)
referrerUrl - the referrer url to set. A null value will remove this parameterpublic PiwikDate getRequestDatetime()
public void setRequestDatetime(PiwikDate datetime)
datetime - the datetime of the request to set. A null value will remove this parameterpublic Boolean getRequired()
public void setRequired(Boolean required)
required - true if request will be trackedpublic Boolean getResponseAsImage()
public void setResponseAsImage(Boolean responseAsImage)
responseAsImage - true if the response will be an imagepublic String getSearchCategory()
public void setSearchCategory(String searchCategory)
searchCategory - the search category to set. A null value will remove this parameterpublic String getSearchQuery()
public void setSearchQuery(String searchQuery)
searchQuery - the search query to set. A null value will remove this parameterpublic Long getSearchResultsCount()
public void setSearchResultsCount(Long searchResultsCount)
Search Results Count=0 they will appear in
the "No Result Search Keyword" report. SearchQuery must first be set.searchResultsCount - the search results count to set. A null value will remove this parameterpublic Integer getSiteId()
public void setSiteId(Integer siteId)
siteId - the id of the website to set. A null value will remove this parameterpublic Boolean getTrackBotRequests()
public void setTrackBotRequests(Boolean trackBotRequests)
trackBotRequests - true if bot requests should be tracked@Deprecated public String getUserCustomVariable(String key)
getVisitCustomVariable(int) method instead.key - the key of the variable to getpublic CustomVariable getVisitCustomVariable(int index)
index - the index of the variable to get@Deprecated public void setUserCustomVariable(String key, String value)
setVisitCustomVariable(CustomVariable, int) method instead.key - the key of the variable to setvalue - the value of the variable to set at the specified key. A null value will remove this parameterpublic void setVisitCustomVariable(CustomVariable customVariable, int index)
customVariable - the CustomVariable to set. A null value will remove the custom variable at the specified indexindex - the index to set the customVariable at.public String getUserId()
public void setUserId(String userId)
userId - the user id to set. A null value will remove this parameterpublic String getVisitorCity()
public void setVisitorCity(String city)
city - the visitor's city to set. A null value will remove this parameterpublic PiwikLocale getVisitorCountry()
public void setVisitorCountry(PiwikLocale country)
country - the visitor's country to set. A null value will remove this parameterpublic String getVisitorCustomId()
public void setVisitorCustomId(String visitorCustomId)
visitorCustomId - the visitor's custom id to set. A null value will remove this parameterpublic Long getVisitorFirstVisitTimestamp()
public void setVisitorFirstVisitTimestamp(Long timestamp)
timestamp - the timestamp of the visitor's first visit to set. A null value will remove this parameterpublic String getVisitorId()
public void setVisitorId(String visitorId)
visitorId - the visitor id to set. A null value will remove this parameterpublic String getVisitorIp()
public void setVisitorIp(String visitorIp)
visitorIp - the visitor's ip to set. A null value will remove this parameterpublic Double getVisitorLatitude()
public void setVisitorLatitude(Double latitude)
latitude - the visitor's latitude to set. A null value will remove this parameterpublic Double getVisitorLongitude()
public void setVisitorLongitude(Double longitude)
longitude - the visitor's longitude to set. A null value will remove this parameterpublic Long getVisitorPreviousVisitTimestamp()
public void setVisitorPreviousVisitTimestamp(Long timestamp)
timestamp - the timestamp of the visitor's previous visit to set. A null value will remove this parameterpublic String getVisitorRegion()
public void setVisitorRegion(String region)
region - the visitor's region to set. A null value will remove this parameterpublic Integer getVisitorVisitCount()
public void setVisitorVisitCount(Integer visitorVisitCount)
visitorVisitCount - the count of visits for this visitor to set. A null value will remove this parameterpublic String getQueryString()
public String getUrlEncodedQueryString()
public static String getRandomHexString(int length)
length - length of the string to produceCopyright © 2016. All rights reserved.