You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-19Lines changed: 6 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,18 +70,18 @@ provider changes, simply update your `run()` call with the providers and that's
70
70
71
71
To facilitate debugging when using multiple providers, Simcoe contains a few options for updating the information logged in the console:
72
72
73
-
*Verbose
74
-
*Simple
75
-
*None
73
+
*verbose
74
+
*simple
75
+
*none
76
76
77
-
By default, Simcoe will log all console outputs in detail (*Verbose*) providing one line per item for **each** provider that was specified. *Simple* will output one line per item regardless of how many providers were specified while *None* will disable all console logging. To update the *outputOption,* simply call (update this property after the `run()` command):
77
+
By default, Simcoe will log all console outputs in detail (*verbose*) providing one line per item for **each** provider that was specified. *simple* will output one line per item regardless of how many providers were specified while *none* will disable all console logging. To update the *outputOption,* simply call (update this property after the `run()` command):
78
78
79
-
`Simcoe.engine.tracker.outputOption = .Simple`
79
+
`Simcoe.engine.tracker.outputOption = .simple`
80
80
81
81
Simcoe providers a base function call for each major analytics action right out of the gate, giving a consistent API to all of your analytics tracking. For instance, to track page views:
82
82
83
83
``
84
-
Simcoe.trackPageView("Home Screen")
84
+
Simcoe.track(pageView: "Home Screen")
85
85
``
86
86
87
87
That's it! Simcoe will automatically call all of your analytics providers and request that they log that page view. This same method is uniform and consistent, no matter what providers you are using.
@@ -110,19 +110,6 @@ While simply implementing this protocol is all you need for your object to be a
110
110
111
111
So for your analytics provider to be able to handle page views in the Simcoe framework, your provider should implement the `PageViewTracking` protocol. This plug-and-play API allows you to define what you want your provider to handle at a very granular level. If your provider only needs to implement location tracking and nothing else, then you need only implement the `LocationTracking` protocol (as well as the `AnalyticsTracking` protocol, of course); all other protocols are optional. This allows you full customization as to how your objects respond to Simcoe.
112
112
113
-
Each provider type defined above maps directly to a Simcoe function that will call that method. These are, respectively:
114
-
115
-
*`logAddToCart`, `logRemoveFromCart`
116
-
*`trackCheckoutEvent`
117
-
*`logError`
118
-
*`trackEvent`
119
-
*`increaseLifetimeValue`
120
-
*`trackLocation`
121
-
*`trackPageView`
122
-
*`trackPurchaseEvent`
123
-
*`setUserAttribute`
124
-
*`logViewDetail`
125
-
126
113
#### Additional Tracking
127
114
128
115
Each analytics implementation is different, and Simcoe doesn't expect to be the be-all, end-all of analytics implementations. What if you need to track something that is not included in the base SDK?
0 commit comments