Flutter: How to write campaign (UTM) parameters in Flutter
Asked Answered
V

1

6

How do I write campaign parameters in Flutter? I have push notification enabled. So when a user comes to my app from notification I want to write some UTM information to google analytics e.g source, medium, campaign

I am using "usage 3.4.1" plugin for Flutter but I don't see any option/API to write UTM parameters to GA

Need some help on how to accomplish this...

Thanks for your help

Vasculum answered 31/10, 2019 at 12:44 Comment(0)
G
0

You track the UTM parameters with the logCampaignDetails method

await Firebase.initializeApp(options: DefaultFirebaseOptions(flavor).currentPlatform);

analytics = FirebaseAnalytics.instance;

analytics?.logCampaignDetails(
          source: "utm_source", medium: "utm_medium", campaign: "utm_campaign"); // Your information here
Geoid answered 13/12, 2023 at 14:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.