I know this a basic question, but I can't work out how to log a custom event with custom parameters using facebook analytics. For example, I would like to log the following:
- song played
- title
- artist
Please see the below code (which does not work):
let dict = AppEvent.ParametersDictionary(AppEventParameterName.Custom("title), AppEventParameterName.Custom("artist"))
AppEvent.ViewedContent(contentType: "test", contentId: "test", extraParameters: dict)
I get the error message:
"Cannot invoke value of type 'ParametersDictionary.Type' (aka 'Dictionary.Type') with argument list '(AppEventParameterName, AppEventParameterName)"
I have also tried:
let dict = AppEvent.ParametersDictionary(AppEventParameterName.Custom("title"), "test")
Any help would be greatly appreciated.