OLD | NEW |
| (Empty) |
1 // Copyright 2011 Google Inc. All Rights Reserved. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 | |
15 package com.google.android.apps.analytics.easytracking; | |
16 | |
17 import com.google.android.apps.analytics.Item; | |
18 import com.google.android.apps.analytics.Transaction; | |
19 | |
20 import android.content.Context; | |
21 | |
22 /** | |
23 * Delegate for GoogleAnalyticsTracker. This interface allows for mocking | |
24 * GoogleAnalyticsTracker. GoogleAnalyticsTracker is a singleton with a | |
25 * private constructor, so cannot be extended. Note that this delegate will | |
26 * only expose those public methods of GoogleAnalyticsTracker that are used | |
27 * by EasyTracker. | |
28 */ | |
29 public interface GoogleAnalyticsTrackerDelegate { | |
30 | |
31 public void startNewSession(String accountId, int dispatchPeriod, Context ctx)
; | |
32 ·· | |
33 public void trackEvent(String category, String action, String label, int value
); | |
34 ·· | |
35 public void trackPageView(String pageUrl); | |
36 ·· | |
37 public boolean dispatch(); | |
38 ·· | |
39 public void stopSession(); | |
40 ·· | |
41 public boolean setCustomVar(int index, String name, String value, int scope); | |
42 ·· | |
43 public boolean setCustomVar(int index, String name, String value); | |
44 ·· | |
45 public void addTransaction(Transaction transaction); | |
46 ·· | |
47 public void addItem(Item item); | |
48 ·· | |
49 public void trackTransactions(); | |
50 ·· | |
51 public void clearTransactions(); | |
52 ·· | |
53 public void setAnonymizeIp(boolean anonymizeIp); | |
54 ·· | |
55 public void setSampleRate(int sampleRate); | |
56 ·· | |
57 public boolean setReferrer(String referrer); | |
58 ·· | |
59 public void setDebug(boolean debug); | |
60 ·· | |
61 public void setDryRun(boolean dryRun); | |
62 } | |
OLD | NEW |