FIRDLScionLogging.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
  18. /**
  19. * @enum FIRDLLogEvent
  20. * @abstract Types of events that may be logged to Scion.
  21. */
  22. typedef NS_ENUM(NSInteger, FIRDLLogEvent) {
  23. /** Log event where the app is first opened with a DL. */
  24. FIRDLLogEventFirstOpen,
  25. /** Log event where the app is subsequently opened with a DL. */
  26. FIRDLLogEventAppOpen,
  27. };
  28. /**
  29. * @fn FIRDLLogEventToScion
  30. * @abstract Logs a given event to Scion
  31. * @param event The event type that occurred.
  32. * @param source The utm_source URL parameter value.
  33. * @param medium The utm_medium URL parameter value.
  34. * @param campaign The utm_campaign URL parameter value.
  35. * @param analytics The class to be used as the receiver of the logging method.
  36. */
  37. void FIRDLLogEventToScion(FIRDLLogEvent event,
  38. NSString* _Nullable source,
  39. NSString* _Nullable medium,
  40. NSString* _Nullable campaign,
  41. id<FIRAnalyticsInterop> _Nullable analytics);