Constants
The following constants are available globally.
-
Enables storage (such as device identifiers) related to advertising.
Declaration
Swift
static let adStorage: ConsentType
-
Enables storage (such as app identifiers) related to analytics, e.g. visit duration.
Declaration
Swift
static let analyticsStorage: ConsentType
-
Sets consent for sending user data to Google for advertising purposes.
Declaration
Swift
static let adUserData: ConsentType
-
Sets consent for personalized advertising.
Declaration
Swift
static let adPersonalization: ConsentType
-
Consent status indicating consent is denied. For an overview of which data is sent when consent is denied, see SDK behavior with consent mode.
Declaration
Swift
static let denied: ConsentStatus
-
Consent status indicating consent is granted.
Declaration
Swift
static let granted: ConsentStatus
-
Ad Impression event. This event signifies when a user sees an ad impression. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterAdPlatform
(String) (optional)AnalyticsParameterAdFormat
(String) (optional)AnalyticsParameterAdSource
(String) (optional)AnalyticsParameterAdUnitName
(String) (optional)AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventAdImpression: String
-
Add Payment Info event. This event signifies that a user has submitted their payment information. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCoupon
(String) (optional)AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterPaymentType
(String) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventAddPaymentInfo: String
-
Add Shipping Info event. This event signifies that a user has submitted their shipping information. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCoupon
(String) (optional)AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterShippingTier
(String) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventAddShippingInfo: String
-
E-Commerce Add To Cart event. This event signifies that an item(s) was added to a cart for purchase. Add this event to a funnel with
AnalyticsEventPurchase
to gauge the effectiveness of your checkout process. Note: If you supply theAnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventAddToCart: String
-
E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist. Use this event to identify popular gift items. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventAddToWishlist: String
-
App Open event. By logging this event when an App becomes active, developers can understand how often users leave and return during the course of a Session. Although Sessions are automatically reported, this event can provide further clarification around the continuous engagement of app-users.
Declaration
Swift
let AnalyticsEventAppOpen: String
-
E-Commerce Begin Checkout event. This event signifies that a user has begun the process of checking out. Add this event to a funnel with your
AnalyticsEventPurchase
event to gauge the effectiveness of your checkout process. Note: If you supply theAnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCoupon
(String) (optional)AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventBeginCheckout: String
-
Campaign Detail event. Log this event to supply the referral details of a re-engagement campaign. Note: you must supply at least one of the required parameters AnalyticsParameterSource, AnalyticsParameterMedium or AnalyticsParameterCampaign. Params:
AnalyticsParameterSource
(String)AnalyticsParameterMedium
(String)AnalyticsParameterCampaign
(String)AnalyticsParameterTerm
(String) (optional)AnalyticsParameterContent
(String) (optional)AnalyticsParameterAdNetworkClickID
(String) (optional)AnalyticsParameterCP1
(String) (optional)AnalyticsParameterCampaignID
(String) (optional)AnalyticsParameterCreativeFormat
(String) (optional)AnalyticsParameterMarketingTactic
(String) (optional)AnalyticsParameterSourcePlatform
(String) (optional)
Declaration
Swift
let AnalyticsEventCampaignDetails: String
-
Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log this along with
AnalyticsEventSpendVirtualCurrency
to better understand your virtual economy. Params:AnalyticsParameterVirtualCurrencyName
(String)AnalyticsParameterValue
(Int or Double)
Declaration
Swift
let AnalyticsEventEarnVirtualCurrency: String
-
Generate Lead event. Log this event when a lead has been generated in the app to understand the efficacy of your install and re-engagement campaigns. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventGenerateLead: String
-
Join Group event. Log this event when a user joins a group such as a guild, team or family. Use this event to analyze how popular certain groups or social features are in your app. Params:
AnalyticsParameterGroupID
(String)
Declaration
Swift
let AnalyticsEventJoinGroup: String
-
Level End event. Log this event when the user finishes a level. Params:
AnalyticsParameterLevelName
(String)AnalyticsParameterSuccess
(String)
Declaration
Swift
let AnalyticsEventLevelEnd: String
-
Level Start event. Log this event when the user starts a new level. Params:
AnalyticsParameterLevelName
(String)
Declaration
Swift
let AnalyticsEventLevelStart: String
-
Level Up event. This event signifies that a player has leveled up in your gaming app. It can help you gauge the level distribution of your userbase and help you identify certain levels that are difficult to pass. Params:
AnalyticsParameterLevel
(Int)AnalyticsParameterCharacter
(String) (optional)
Declaration
Swift
let AnalyticsEventLevelUp: String
-
Login event. Apps with a login feature can report this event to signify that a user has logged in.
Declaration
Swift
let AnalyticsEventLogin: String
-
Post Score event. Log this event when the user posts a score in your gaming app. This event can help you understand how users are actually performing in your game and it can help you correlate high scores with certain audiences or behaviors. Params:
AnalyticsParameterScore
(Int)AnalyticsParameterLevel
(Int) (optional)AnalyticsParameterCharacter
(String) (optional)
Declaration
Swift
let AnalyticsEventPostScore: String
-
E-Commerce Purchase event. This event signifies that an item(s) was purchased by a user. Note: This is different from the in-app purchase event, which is reported automatically for App Store-based apps. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterAffiliation
(String) (optional)AnalyticsParameterCoupon
(String) (optional)AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterEndDate
(String) (optional)AnalyticsParameterItemID
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterShipping
(Double) (optional)AnalyticsParameterStartDate
(String) (optional)AnalyticsParameterTax
(Double) (optional)AnalyticsParameterTransactionID
(String) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventPurchase: String
-
E-Commerce Refund event. This event signifies that a refund was issued. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterAffiliation
(String) (optional)AnalyticsParameterCoupon
(String) (optional)AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterShipping
(Double) (optional)AnalyticsParameterTax
(Double) (optional)AnalyticsParameterTransactionID
(String) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventRefund: String
-
E-Commerce Remove from Cart event. This event signifies that an item(s) was removed from a cart. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventRemoveFromCart: String
-
Screen View event. This event signifies a screen view. Use this when a screen transition occurs. This event can be logged irrespective of whether automatic screen tracking is enabled. Params:
AnalyticsParameterScreenClass
(String) (optional)AnalyticsParameterScreenName
(String) (optional)
Declaration
Swift
let AnalyticsEventScreenView: String
-
Search event. Apps that support search features can use this event to contextualize search operations by supplying the appropriate, corresponding parameters. This event can help you identify the most popular content in your app. Params:
AnalyticsParameterSearchTerm
(String)AnalyticsParameterStartDate
(String) (optional)AnalyticsParameterEndDate
(String) (optional)AnalyticsParameterNumberOfNights
(Int) (optional) for hotel bookingsAnalyticsParameterNumberOfRooms
(Int) (optional) for hotel bookingsAnalyticsParameterNumberOfPassengers
(Int) (optional) for travel bookingsAnalyticsParameterOrigin
(String) (optional)AnalyticsParameterDestination
(String) (optional)AnalyticsParameterTravelClass
(String) (optional) for travel bookings
Declaration
Swift
let AnalyticsEventSearch: String
-
Select Content event. This general purpose event signifies that a user has selected some content of a certain type in an app. The content can be any object in your app. This event can help you identify popular content and categories of content in your app. Params:
AnalyticsParameterContentType
(String)AnalyticsParameterItemID
(String)
Declaration
Swift
let AnalyticsEventSelectContent: String
-
Select Item event. This event signifies that an item was selected by a user from a list. Use the appropriate parameters to contextualize the event. Use this event to discover the most popular items selected. Params:
AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterItemListID
(String) (optional)AnalyticsParameterItemListName
(String) (optional)
Declaration
Swift
let AnalyticsEventSelectItem: String
-
Select promotion event. This event signifies that a user has selected a promotion offer. Use the appropriate parameters to contextualize the event, such as the item(s) for which the promotion applies. Params:
AnalyticsParameterCreativeName
(String) (optional)AnalyticsParameterCreativeSlot
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterLocationID
(String) (optional)AnalyticsParameterPromotionID
(String) (optional)AnalyticsParameterPromotionName
(String) (optional)
Declaration
Swift
let AnalyticsEventSelectPromotion: String
-
Share event. Apps with social features can log the Share event to identify the most viral content. Params:
AnalyticsParameterContentType
(String)AnalyticsParameterItemID
(String)
Declaration
Swift
let AnalyticsEventShare: String
-
Sign Up event. This event indicates that a user has signed up for an account in your app. The parameter signifies the method by which the user signed up. Use this event to understand the different behaviors between logged in and logged out users. Params:
AnalyticsParameterMethod
(String)
Declaration
Swift
let AnalyticsEventSignUp: String
-
Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can help you identify which virtual goods are the most popular objects of purchase. Params:
AnalyticsParameterItemName
(String)AnalyticsParameterVirtualCurrencyName
(String)AnalyticsParameterValue
(Int or Double)
Declaration
Swift
let AnalyticsEventSpendVirtualCurrency: String
-
Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use this in a funnel with
AnalyticsEventTutorialComplete
to understand how many users complete this process and move on to the full app experience.Declaration
Swift
let AnalyticsEventTutorialBegin: String
-
Tutorial End event. Use this event to signify the user’s completion of your app’s on-boarding process. Add this to a funnel with
AnalyticsEventTutorialBegin
to gauge the completion rate of your on-boarding process.Declaration
Swift
let AnalyticsEventTutorialComplete: String
-
Unlock Achievement event. Log this event when the user has unlocked an achievement in your game. Since achievements generally represent the breadth of a gaming experience, this event can help you understand how many users are experiencing all that your game has to offer. Params:
AnalyticsParameterAchievementID
(String)
Declaration
Swift
let AnalyticsEventUnlockAchievement: String
-
E-commerce View Cart event. This event signifies that a user has viewed their cart. Use this to analyze your purchase funnel. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventViewCart: String
-
View Item event. This event signifies that a user has viewed an item. Use the appropriate parameters to contextualize the event. Use this event to discover the most popular items viewed in your app. Note: If you supply the
AnalyticsParameterValue
parameter, you must also supply theAnalyticsParameterCurrency
parameter so that revenue metrics can be computed accurately. Params:AnalyticsParameterCurrency
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterValue
(Double) (optional)
Declaration
Swift
let AnalyticsEventViewItem: String
-
View Item List event. Log this event when a user sees a list of items or offerings. Params:
AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterItemListID
(String) (optional)AnalyticsParameterItemListName
(String) (optional)
Declaration
Swift
let AnalyticsEventViewItemList: String
-
View Promotion event. This event signifies that a promotion was shown to a user. Add this event to a funnel with the
AnalyticsEventAddToCart
andAnalyticsEventPurchase
to gauge your conversion process. Params:AnalyticsParameterCreativeName
(String) (optional)AnalyticsParameterCreativeSlot
(String) (optional)AnalyticsParameterItems
([[String: Any]]) (optional)AnalyticsParameterLocationID
(String) (optional)AnalyticsParameterPromotionID
(String) (optional)AnalyticsParameterPromotionName
(String) (optional)
Declaration
Swift
let AnalyticsEventViewPromotion: String
-
View Search Results event. Log this event when the user has been presented with the results of a search. Params:
AnalyticsParameterSearchTerm
(String)
Declaration
Swift
let AnalyticsEventViewSearchResults: String
-
Game achievement ID (String).
let params = [ AnalyticsParameterAchievementID : "10_matches_won", // ... ]
Declaration
Swift
let AnalyticsParameterAchievementID: String
-
The ad format (e.g. Banner, Interstitial, Rewarded, Native, Rewarded Interstitial, Instream). (String).
let params = [ AnalyticsParameterAdFormat : "Banner", // ... ]
Declaration
Swift
let AnalyticsParameterAdFormat: String
-
Ad Network Click ID (String). Used for network-specific click IDs which vary in format.
let params = [ AnalyticsParameterAdNetworkClickID : "1234567", // ... ]
Declaration
Swift
let AnalyticsParameterAdNetworkClickID: String
-
The ad platform (e.g. MoPub, IronSource) (String).
let params = [ AnalyticsParameterAdPlatform : "MoPub", // ... ]
Declaration
Swift
let AnalyticsParameterAdPlatform: String
-
The ad source (e.g. AdColony) (String).
let params = [ AnalyticsParameterAdSource : "AdColony", // ... ]
Declaration
Swift
let AnalyticsParameterAdSource: String
-
The ad unit name (e.g. Banner_03) (String).
let params = [ AnalyticsParameterAdUnitName : "Banner_03", // ... ]
Declaration
Swift
let AnalyticsParameterAdUnitName: String
-
A product affiliation to designate a supplying company or brick and mortar store location (String).
let params = [ AnalyticsParameterAffiliation : "Google Store", // ... ]
Declaration
Swift
let AnalyticsParameterAffiliation: String
-
Campaign custom parameter (String). Used as a method of capturing custom data in a campaign. Use varies by network.
let params = [ AnalyticsParameterCP1 : "custom_data", // ... ]
Declaration
Swift
let AnalyticsParameterCP1: String
-
The individual campaign name, slogan, promo code, etc. Some networks have pre-defined macro to capture campaign information, otherwise can be populated by developer. Highly Recommended (String).
let params = [ AnalyticsParameterCampaign : "winter_promotion", // ... ]
Declaration
Swift
let AnalyticsParameterCampaign: String
-
Campaign ID (String). Used for keyword analysis to identify a specific product promotion or strategic campaign. This is a required key for GA4 data import.
let params = [ AnalyticsParameterCampaignID : "7877652710", // ... ]
Declaration
Swift
let AnalyticsParameterCampaignID: String
-
Character used in game (String).
let params = [ AnalyticsParameterCharacter : "beat_boss", // ... ]
Declaration
Swift
let AnalyticsParameterCharacter: String
-
Campaign content (String).
Declaration
Swift
let AnalyticsParameterContent: String
-
Type of content selected (String).
let params = [ AnalyticsParameterContentType : "news article", // ... ]
Declaration
Swift
let AnalyticsParameterContentType: String
-
Coupon code used for a purchase (String).
let params = [ AnalyticsParameterCoupon : "SUMMER_FUN", // ... ]
Declaration
Swift
let AnalyticsParameterCoupon: String
-
Creative Format (String). Used to identify the high-level classification of the type of ad served by a specific campaign.
let params = [ AnalyticsParameterCreativeFormat : "display", // ... ]
Declaration
Swift
let AnalyticsParameterCreativeFormat: String
-
The name of a creative used in a promotional spot (String).
let params = [ AnalyticsParameterCreativeName : "Summer Sale", // ... ]
Declaration
Swift
let AnalyticsParameterCreativeName: String
-
The name of a creative slot (String).
let params = [ AnalyticsParameterCreativeSlot : "summer_banner2", // ... ]
Declaration
Swift
let AnalyticsParameterCreativeSlot: String
-
Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format (String).
let params = [ AnalyticsParameterCurrency : "USD", // ... ]
Declaration
Swift
let AnalyticsParameterCurrency: String
-
Flight or Travel destination (String).
let params = [ AnalyticsParameterDestination : "Mountain View, CA", // ... ]
Declaration
Swift
let AnalyticsParameterDestination: String
-
Monetary value of discount associated with a purchase (Double).
let params = [ AnalyticsParameterDiscount : 2.0, AnalyticsParameterCurrency : "USD", // e.g. $2.00 USD // ... ]
Declaration
Swift
let AnalyticsParameterDiscount: String
-
The arrival date, check-out date or rental end date for the item. This should be in YYYY-MM-DD format (String).
let params = [ AnalyticsParameterEndDate : "2015-09-14", // ... ]
Declaration
Swift
let AnalyticsParameterEndDate: String
-
Indicates that the associated event should either extend the current session or start a new session if no session was active when the event was logged. Specify 1 to extend the current session or to start a new session; any other value will not extend or start a session.
let params = [ AnalyticsParameterExtendSession : 1, // ... ]
Declaration
Swift
let AnalyticsParameterExtendSession: String
-
Flight number for travel events (String).
let params = [ AnalyticsParameterFlightNumber : "ZZ800", // ... ]
Declaration
Swift
let AnalyticsParameterFlightNumber: String
-
Group/clan/guild ID (String).
let params = [ AnalyticsParameterGroupID : "g1", // ... ]
Declaration
Swift
let AnalyticsParameterGroupID: String
-
The index of the item in a list (Int).
let params = [ AnalyticsParameterIndex : 5, // ... ]
Declaration
Swift
let AnalyticsParameterIndex: String
-
Item brand (String).
let params = [ AnalyticsParameterItemBrand : "Google", // ... ]
Declaration
Swift
let AnalyticsParameterItemBrand: String
-
Item category (context-specific) (String).
let params = [ AnalyticsParameterItemCategory : "pants", // ... ]
Declaration
Swift
let AnalyticsParameterItemCategory: String
-
Item Category (context-specific) (String).
let params = [ AnalyticsParameterItemCategory2 : "pants", // ... ]
Declaration
Swift
let AnalyticsParameterItemCategory2: String
-
Item Category (context-specific) (String).
let params = [ AnalyticsParameterItemCategory3 : "pants", // ... ]
Declaration
Swift
let AnalyticsParameterItemCategory3: String
-
Item Category (context-specific) (String).
let params = [ AnalyticsParameterItemCategory4 : "pants", // ... ]
Declaration
Swift
let AnalyticsParameterItemCategory4: String
-
Item Category (context-specific) (String).
let params = [ AnalyticsParameterItemCategory5 : "pants", // ... ]
Declaration
Swift
let AnalyticsParameterItemCategory5: String
-
Item ID (context-specific) (String).
let params = [ AnalyticsParameterItemID : "SKU_12345", // ... ]
Declaration
Swift
let AnalyticsParameterItemID: String
-
The ID of the list in which the item was presented to the user (String).
let params = [ AnalyticsParameterItemListID : "ABC123", // ... ]
Declaration
Swift
let AnalyticsParameterItemListID: String
-
The name of the list in which the item was presented to the user (String).
let params = [ AnalyticsParameterItemListName : "Related products", // ... ]
Declaration
Swift
let AnalyticsParameterItemListName: String
-
Item Name (context-specific) (String).
let params = [ AnalyticsParameterItemName : "jeggings", // ... ]
Declaration
Swift
let AnalyticsParameterItemName: String
-
Item variant (String).
let params = [ AnalyticsParameterItemVariant : "Black", // ... ]
Declaration
Swift
let AnalyticsParameterItemVariant: String
-
The list of items involved in the transaction expressed as
[[String: Any]]
.let params = [ AnalyticsParameterItems : [ [AnalyticsParameterItemName : "jeggings", AnalyticsParameterItemCategory : "pants"], [AnalyticsParameterItemName : "boots", AnalyticsParameterItemCategory : "shoes"], ], ]
Declaration
Swift
let AnalyticsParameterItems: String
-
Level in game (Int).
let params = [ AnalyticsParameterLevel : 42, // ... ]
Declaration
Swift
let AnalyticsParameterLevel: String
-
The name of a level in a game (String).
let params = [ AnalyticsParameterLevelName : "room_1", // ... ]
Declaration
Swift
let AnalyticsParameterLevelName: String
-
Location (String). The Google Place ID that corresponds to the associated event. Alternatively, you can supply your own custom Location ID.
let params = [ AnalyticsParameterLocation : "ChIJiyj437sx3YAR9kUWC8QkLzQ", // ... ]
Declaration
Swift
let AnalyticsParameterLocation: String
-
The location associated with the event. Preferred to be the Google Place ID that corresponds to the associated item but could be overridden to a custom location ID string.(String).
let params = [ AnalyticsParameterLocationID : "ChIJiyj437sx3YAR9kUWC8QkLzQ", // ... ]
Declaration
Swift
let AnalyticsParameterLocationID: String
-
Marketing Tactic (String). Used to identify the targeting criteria applied to a specific campaign.
let params = [ AnalyticsParameterMarketingTactic : "Remarketing", // ... ]
Declaration
Swift
let AnalyticsParameterMarketingTactic: String
-
The advertising or marketing medium, for example: cpc, banner, email, push. Highly recommended (String).
let params = [ AnalyticsParameterMedium : "email", // ... ]
Declaration
Swift
let AnalyticsParameterMedium: String
-
A particular approach used in an operation; for example, “facebook” or “email” in the context of a sign_up or login event. (String).
let params = [ AnalyticsParameterMethod : "google", // ... ]
Declaration
Swift
let AnalyticsParameterMethod: String
-
Number of nights staying at hotel (Int).
let params = [ AnalyticsParameterNumberOfNights : 3, // ... ]
Declaration
Swift
let AnalyticsParameterNumberOfNights: String
-
Number of passengers traveling (Int).
let params = [ AnalyticsParameterNumberOfPassengers : 11, // ... ]
Declaration
Swift
let AnalyticsParameterNumberOfPassengers: String
-
Number of rooms for travel events (Int).
let params = [ AnalyticsParameterNumberOfRooms : 2, // ... ]
Declaration
Swift
let AnalyticsParameterNumberOfRooms: String
-
Flight or Travel origin (String).
let params = [ AnalyticsParameterOrigin : "Mountain View, CA", // ... ]
Declaration
Swift
let AnalyticsParameterOrigin: String
-
The chosen method of payment (String).
let params = [ AnalyticsParameterPaymentType : "Visa", // ... ]
Declaration
Swift
let AnalyticsParameterPaymentType: String
-
Purchase price (Double).
let params = [ AnalyticsParameterPrice : 1.0, AnalyticsParameterCurrency : "USD", // e.g. $1.00 USD // ... ]
Declaration
Swift
let AnalyticsParameterPrice: String
-
The ID of a product promotion (String).
let params = [ AnalyticsParameterPromotionID : "ABC123", // ... ]
Declaration
Swift
let AnalyticsParameterPromotionID: String
-
The name of a product promotion (String).
let params = [ AnalyticsParameterPromotionName : "Summer Sale", // ... ]
Declaration
Swift
let AnalyticsParameterPromotionName: String
-
Purchase quantity (Int).
let params = [ AnalyticsParameterQuantity : 1, // ... ]
Declaration
Swift
let AnalyticsParameterQuantity: String
-
Score in game (Int).
let params = [ AnalyticsParameterScore : 4200, // ... ]
Declaration
Swift
let AnalyticsParameterScore: String
-
Current screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String).
let params = [ AnalyticsParameterScreenClass : "LoginViewController", // ... ]
Declaration
Swift
let AnalyticsParameterScreenClass: String
-
Current screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String).
let params = [ AnalyticsParameterScreenName : "LoginView", // ... ]
Declaration
Swift
let AnalyticsParameterScreenName: String
-
The search string/keywords used (String).
let params = [ AnalyticsParameterSearchTerm : "periodic table", // ... ]
Declaration
Swift
let AnalyticsParameterSearchTerm: String
-
Shipping cost associated with a transaction (Double).
let params = [ AnalyticsParameterShipping : 5.99, AnalyticsParameterCurrency : "USD", // e.g. $5.99 USD // ... ]
Declaration
Swift
let AnalyticsParameterShipping: String
-
The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item (String).
let params = [ AnalyticsParameterShippingTier : "Ground", // ... ]
Declaration
Swift
let AnalyticsParameterShippingTier: String
-
The origin of your traffic, such as an Ad network (for example, google) or partner (urban airship). Identify the advertiser, site, publication, etc. that is sending traffic to your property. Highly recommended (String).
let params = [ AnalyticsParameterSource : "InMobi", // ... ]
Declaration
Swift
let AnalyticsParameterSource: String
-
Source Platform (String). Used to identify the platform responsible for directing traffic to a given Analytics property (e.g., a buying platform where budgets, targeting criteria, etc. are set, a platform for managing organic traffic data, etc.).
let params = [ AnalyticsParameterSourcePlatform : "sa360", // ... ]
Declaration
Swift
let AnalyticsParameterSourcePlatform: String
-
The departure date, check-in date or rental start date for the item. This should be in YYYY-MM-DD format (String).
let params = [ AnalyticsParameterStartDate : "2015-09-14", // ... ]
Declaration
Swift
let AnalyticsParameterStartDate: String
-
The result of an operation. Specify 1 to indicate success and 0 to indicate failure (Int).
let params = [ AnalyticsParameterSuccess : 1, // ... ]
Declaration
Swift
let AnalyticsParameterSuccess: String
-
Tax cost associated with a transaction (Double).
let params = [ AnalyticsParameterTax : 2.43, AnalyticsParameterCurrency : "USD", // e.g. $2.43 USD // ... ]
Declaration
Swift
let AnalyticsParameterTax: String
-
If you’re manually tagging keyword campaigns, you should use utm_term to specify the keyword (String).
let params = [ AnalyticsParameterTerm : "game", // ... ]
Declaration
Swift
let AnalyticsParameterTerm: String
-
The unique identifier of a transaction (String).
let params = [ AnalyticsParameterTransactionID : "T12345", // ... ]
Declaration
Swift
let AnalyticsParameterTransactionID: String
-
Travel class (String).
let params = [ AnalyticsParameterTravelClass : "business", // ... ]
Declaration
Swift
let AnalyticsParameterTravelClass: String
-
A context-specific numeric value which is accumulated automatically for each event type. This is a general purpose parameter that is useful for accumulating a key metric that pertains to an event. Examples include revenue, distance, time and points. Value should be specified as Int or Double. Notes: Values for pre-defined currency-related events (such as
AnalyticsEventAddToCart
) should be supplied using Double and must be accompanied by aAnalyticsParameterCurrency
parameter. The valid range of accumulated values is [-9,223,372,036,854.77, 9,223,372,036,854.77]. Supplying a non-numeric value, omitting the correspondingAnalyticsParameterCurrency
parameter, or supplying an invalid currency code for conversion events will cause that conversion to be omitted from reporting.let params = [ AnalyticsParameterValue : 3.99, AnalyticsParameterCurrency : "USD", // e.g. $3.99 USD // ... ]
Declaration
Swift
let AnalyticsParameterValue: String
-
Name of virtual currency type (String).
let params = [ AnalyticsParameterVirtualCurrencyName : "virtual_currency_name", // ... ]
Declaration
Swift
let AnalyticsParameterVirtualCurrencyName: String
-
Indicates whether events logged by Google Analytics can be used to personalize ads for the user. Set to “YES” to enable, or “NO” to disable. Default is enabled. See the documentation for more details and information about related settings.
Analytics.setUserProperty("NO", forName: AnalyticsUserPropertyAllowAdPersonalizationSignals)
Declaration
Swift
let AnalyticsUserPropertyAllowAdPersonalizationSignals: String
-
The method used to sign in. For example, “google”, “facebook” or “twitter”.
Declaration
Swift
let AnalyticsUserPropertySignUpMethod: String