In my Swiftui app I’m using a share link like this
<code>ShareLink(item: URL(string: url)!){
SomeShareImage()
}
</code>
<code>ShareLink(item: URL(string: url)!){
SomeShareImage()
}
</code>
ShareLink(item: URL(string: url)!){
SomeShareImage()
}
and would like to use Firebase to get the information whether that link is being clicked by calling Analytics.logEvent(…)
But how do I have to implement the Analytics.logEvent() so it gets fired if the share link is being used?
I tried onTapGesture
<code>.onTapGesture{
Analytics.logEvent(...)
}
</code>
<code>.onTapGesture{
Analytics.logEvent(...)
}
</code>
.onTapGesture{
Analytics.logEvent(...)
}
but then the sharelink doesn’t work on click any more
Thank you in advance