Package com.eclipsesource.tabris.tracking

Examples of com.eclipsesource.tabris.tracking.TrackingInfo


    String userAgent = "Mozilla/5.0 (model; U; CPU iPhone OS 7_1 like Mac OS X; " + info.getClientLocale() + " ) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7";
    assertEquals( userAgent, configCaptor.getValue().getParameter().get( getRequestKey( RequestKeys.USER_AGENT_OVERRIDE ) ) );
  }

  private TrackingInfo createInfo() {
    TrackingInfo info = new TrackingInfo();
    info.setAppId( "appId" );
    info.setAppVersion( "appVersion" );
    info.setClientId( "clientId" );
    info.setClientLocale( Locale.CANADA );
    info.setDeviceModel( "model" );
    info.setScreenResolution( new Point( 100, 200 ) );
    info.setSearchQuery( "query" );
    info.setUserAgent( "userAgent" );
    info.setClientIp( "ip" );
    info.setPlatform( Platform.WEB );
    return info;
  }
View Full Code Here


    this.tokenAuth = tokenAuth;
  }

  @Override
  public void handleEvent( TrackingEvent event ) {
    TrackingInfo info = event.getInfo();
    AdvancedConfiguration advancedConfiguration = createAdvancedConfiguration( info );
    VisitorInformation visitorInformation = createVisitorInformation( info );
    Action action = createAction( event );
    piwik.track( action, visitorInformation, advancedConfiguration );
  }
View Full Code Here

  private void appendEvent( StringBuilder builder, TrackingEvent event ) {
    builder.append( ( String )event.getDetail() );
  }

  private void appendEventInfo( StringBuilder builder, TrackingEvent event ) {
    TrackingInfo info = event.getInfo();
    builder.append( " [" );
    builder.append( info.getAppId() + ", " );
    builder.append( info.getDeviceModel() + ", " );
    builder.append( info.getDeviceVendor() + ", " );
    builder.append( info.getDeviceOsVersion() );
    builder.append( "]" );
  }
View Full Code Here

public class TrackingInfoFactory implements Serializable {

  static final String PROPERTY_ID = "com.eclipsesource.tabris.tracking.id";

  public static TrackingInfo createInfo( Display display ) {
    TrackingInfo trackingInfo = new TrackingInfo();
    trackingInfo.setClientId( getClientId() );
    setClientDeviceInfo( trackingInfo );
    setAppInfo( trackingInfo );
    setDisplayInfo( display, trackingInfo );
    setClientIpInfo( trackingInfo );
    trackingInfo.setUserAgent( RWT.getRequest().getHeader( Constants.USER_AGENT ) );
    return trackingInfo;
  }
View Full Code Here

    return eventHit;
  }

  private AdvancedConfiguration createAdvancedConfiguration( TrackingEvent event ) {
    AdvancedConfiguration configuration = new AdvancedConfiguration();
    TrackingInfo info = event.getInfo();
    String screenResolution = info.getScreenResolution().x + "x" + info.getScreenResolution().y;
    configuration.setScreenResolution( screenResolution );
    configuration.setAppId( info.getAppId() );
    configuration.setAppVersion( info.getAppVersion() );
    configuration.setIpOverride( info.getClientIp() );
    configuration.setUserAgentOverride( UserAgentUtil.getProvider( info.getPlatform() ).getUserAgent( info ) );
    configuration.setUserLanguage( info.getClientLocale().getLanguage() + "-" + info.getClientLocale().getCountry() );
    configuration.setViewportSize( screenResolution );
    return configuration;
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.tracking.TrackingInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.