forked from chrisntr/monotouch-bindings
/
GoogleAnalytics.cs
67 lines (47 loc) · 2.14 KB
/
GoogleAnalytics.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using System;
using System.Drawing;
using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;
using MonoTouch.UIKit;
using MonoTouch.CoreLocation;
namespace GoogleAnalytics
{
[BaseType (typeof (NSObject))]
interface GANTracker {
[Export ("debug")]
bool Debug { get; set; }
[Export ("dryRun")]
bool DryRun { get; set; }
[Static] [Export ("sharedTracker")]
GANTracker SharedTracker { get; }
[Export ("startTrackerWithAccountID:dispatchPeriod:delegate:")]
void StartTracker (string accountId, int dispatchPeriod, [NullAllowed] GANTrackerDelegate ganDelegate);
[Export ("stopTracker")]
void StopTracker ();
[Export ("trackPageview:withError:")]
bool TrackPageview (string pageURL, out NSError error);
[Export ("trackEvent:action:label:value:withError:")]
bool TrackEvent (string category, string action, string label, int value, out NSError error);
[Export ("setCustomVariableAtIndex:name:value:scope:withError:")]
bool SetCustomVariableWithScope (int index, string name, string value, int scope, out NSError error);
[Export ("setCustomVariableAtIndex:name:value:withError:")]
bool SetCustomVariable (int index, string name, string value, out NSError error);
[Export ("getVisitorCustomVarAtIndex:")]
string GetVisitorCustomVar(int index);
[Export ("addTransaction:totalPrice:storeName:totalTax:shippingCost:withError:")]
bool AddTransaction (string orderId, double totalPrice, string storeName, double totalTax, double shippingCost, out NSError error);
[Export ("addItem:itemSKU:itemPrice:itemCount:itemName:itemCategory:withError:")]
bool AddItem (string orderID, string itemSKU, double itemPrice, double itemCount, string itemName, string itemCategory, out NSError error);
[Export ("trackTransactions:")]
bool TrackTransactions (out NSError error);
[Export ("clearTransactions:")]
bool ClearTransactions (out NSError error);
[Export ("dispatch")]
bool Dispatch ();
}
[BaseType (typeof (NSObject))]
interface GANTrackerDelegate {
[Export ("trackerDispatchDidComplete:eventsDispatched:eventsFailedDispatch:")]
void DispatchCompleted (GANTracker tracker, int eventsDispatched, int eventsFailedDispatch);
}
}