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-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,9 +157,12 @@ Since we don't monitor the device's connection state you need to tell the SDK th
157
157
contentPass.recoverFromError()
158
158
```
159
159
160
-
### Couting an impression
161
-
162
-
Counting an impression is as easy as calling the function `countImpression(completionHandler:)`. A user has to be authenticated and have an active subscription applicable to your scope for this to work.
160
+
### Counting an impression
161
+
`countImpression` method counts impressions for billing purposes. This method must be invoked whenever a user views a piece
162
+
of content, independently of authentication state. If the current user is authenticated the impression will automatically
163
+
be logged as paid ad-free impression to calculate the publisher compensation. As the total amount of impressions is required
164
+
for billing as well, this method also counts sampled impressions of non-subscribers. Counting an impression is as easy as
165
+
calling the function `countImpression(completionHandler:)`
/// The object that acts as the delegate of the contentpass sdk.
49
51
///
@@ -134,26 +136,39 @@ public class ContentPass: NSObject {
134
136
validateAuthState()
135
137
}
136
138
137
-
/// Count an impression for the logged in user.
139
+
/// Count an impression for user.
138
140
///
139
-
/// A user needs to be authenticated and have a subscription applicable to your service.
140
-
/// - Parameter completionHandler: On a successful counting of the impression, the Result is a `success`. If something went wrong, you'll be supplied with an appropriate error case. The error `ContentPassError.badHTTPStatusCode(404)` most probably means that your user has no applicable subscription.
141
+
/// If user has a valid subscription, a paid impression will be counted. Additionally a sampled impression will be
142
+
/// counted for all users, no matter if they have a valid subscription or not.
143
+
/// - Parameter completionHandler: On a successful counting of the impression, the Result is a `success`. If something went wrong,
144
+
/// you'll be supplied with an appropriate error case.
0 commit comments