checkMembershipWithAudienceID
Deprecated
This method is no longer recommended. Audience Manager is no longer available in the latest product version.
The checkMembershipWithAudienceID() method checks if the user belongs to a given audience.
Syntax
[[PiwikTracker sharedInstance] checkMembershipWithAudienceID:@"audienceId" completionBlock:^(BOOL isMember, NSError * _Nullable errorData) {
if (isMember) {
// Do something if the user is a member
} else if (errorData) {
// Handle error
}
}];
Parameters
audienceId (string, required)
The ID of the audience you want to check. You can find it in Audience Manager > Audiences.
isMember (boolean, output)
Whether the user belongs to a specific audience. True: Belongs. False: Doesn't belong.
errorData (output)
The error string. If an error occurs, only this method will be called.
Examples
To track a confirmed order:
[[PiwikTracker sharedInstance]
checkMembershipWithAudienceID:@"ABC123"
completionBlock:^(BOOL isMember, NSError * _Nullable errorData) {
// do something if is member or handle error
}];
Related methods
- sendProfileAttributeWithName() (deprecated)
- audienceManagerGetProfileAttributes() (deprecated)
Updated 2 days ago