All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.brsanthu.googleanalytics.request.TimingHit Maven / Gradle / Ivy

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.brsanthu.googleanalytics.request;

import static com.brsanthu.googleanalytics.internal.Constants.HIT_TIMING;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.DNS_TIME;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.PAGE_DOWNLOAD_TIME;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.PAGE_LOAD_TIME;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.REDIRECT_RESPONSE_TIME;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.SERVER_RESPONSE_TIME;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.TCP_CONNECT_TIME;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.USER_TIMING_CATEGORY;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.USER_TIMING_LABEL;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.USER_TIMING_TIME;
import static com.brsanthu.googleanalytics.request.GoogleAnalyticsParameter.USER_TIMING_VARIABLE_NAME;

/**
 * GA request to track performance timings like page load time, server response time etc.
 *
 * 

* For more information, see * GA Parameters * Reference *

* * @author Santhosh Kumar */ public class TimingHit extends GoogleAnalyticsRequest { public TimingHit() { super(HIT_TIMING); } /** *
*

* Optional. *

*

* Specifies the user timing category. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
utctextNone150 Bytestiming
*
Example value: category
* Example usage: utc=category
*/ public TimingHit userTimingCategory(String value) { setString(USER_TIMING_CATEGORY, value); return this; } public String userTimingCategory() { return getString(USER_TIMING_CATEGORY); } /** *
*

* Optional. *

*

* Specifies the user timing variable. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
utvtextNone500 Bytestiming
*
Example value: lookup
* Example usage: utv=lookup
*/ public TimingHit userTimingVariableName(String value) { setString(USER_TIMING_VARIABLE_NAME, value); return this; } public String userTimingVariableName() { return getString(USER_TIMING_VARIABLE_NAME); } /** *
*

* Optional. *

*

* Specifies the user timing value. The value is in milliseconds. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
uttintegerNoneNonetiming
*
Example value: 123
* Example usage: utt=123
*/ public TimingHit userTimingTime(Integer value) { setInteger(USER_TIMING_TIME, value); return this; } public Integer userTimingTime() { return getInteger(USER_TIMING_TIME); } /** *
*

* Optional. *

*

* Specifies the user timing label. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
utltextNone500 Bytestiming
*
Example value: label
* Example usage: utl=label
*/ public TimingHit userTimingLabel(String value) { setString(USER_TIMING_LABEL, value); return this; } public String userTimingLabel() { return getString(USER_TIMING_LABEL); } /** *
*

* Optional. *

*

* Specifies the time it took for a page to load. The value is in milliseconds. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
pltintegerNoneNonetiming
*
Example value: 3554
* Example usage: plt=3554
*/ public TimingHit pageLoadTime(Integer value) { setInteger(PAGE_LOAD_TIME, value); return this; } public Integer pageLoadTime() { return getInteger(PAGE_LOAD_TIME); } /** *
*

* Optional. *

*

* Specifies the time it took to do a DNS lookup.The value is in milliseconds. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
dnsintegerNoneNonetiming
*
Example value: 43
* Example usage: dns=43
*/ public TimingHit dnsTime(Integer value) { setInteger(DNS_TIME, value); return this; } public Integer dnsTime() { return getInteger(DNS_TIME); } /** *
*

* Optional. *

*

* Specifies the time it took for the page to be downloaded. The value is in milliseconds. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
pdtintegerNoneNonetiming
*
Example value: 500
* Example usage: pdt=500
*/ public TimingHit pageDownloadTime(Integer value) { setInteger(PAGE_DOWNLOAD_TIME, value); return this; } public Integer pageDownloadTime() { return getInteger(PAGE_DOWNLOAD_TIME); } /** *
*

* Optional. *

*

* Specifies the time it took for any redirects to happen. The value is in milliseconds. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
rrtintegerNoneNonetiming
*
Example value: 500
* Example usage: rrt=500
*/ public TimingHit redirectResponseTime(Integer value) { setInteger(REDIRECT_RESPONSE_TIME, value); return this; } public Integer redirectResponseTime() { return getInteger(REDIRECT_RESPONSE_TIME); } /** *
*

* Optional. *

*

* Specifies the time it took for a TCP connection to be made. The value is in milliseconds. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
tcpintegerNoneNonetiming
*
Example value: 500
* Example usage: tcp=500
*/ public TimingHit tcpConnectTime(Integer value) { setInteger(TCP_CONNECT_TIME, value); return this; } public Integer tcpConnectTime() { return getInteger(TCP_CONNECT_TIME); } /** *
*

* Optional. *

*

* Specifies the time it took for the server to respond after the connect time. The value is in milliseconds. *

* * * * * * * * * * * * * * * * * *
ParameterValue TypeDefault ValueMax LengthSupported Hit Types
srtintegerNoneNonetiming
*
Example value: 500
* Example usage: srt=500
*/ public TimingHit serverResponseTime(Integer value) { setInteger(SERVER_RESPONSE_TIME, value); return this; } public Integer serverResponseTime() { return getInteger(SERVER_RESPONSE_TIME); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy