googleanalytics / google-analytics-plugin-for-unity

Google Analytics plugin for the Unity game creation system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Campaign install tracking

CarlosPerson opened this issue · comments

Hello community,

We have been trying to set up Campaign tracking in order to measure how much installs are we getting from each campaign - it is commonly called attribution. We have found how to do it with Google Analytics on native Android and iOS, but the Unity side is either hidden or incomplete. What we have found so far is how to set up an event to be tracked as a certain campaign, which is done as follows, if we are correct:

        analyticsObject.LogTiming(new TimingHitBuilder()
            .SetTimingCategory("Loading")
            .SetTimingInterval(50L)
            .SetTimingName("Main Menu")
            .SetTimingLabel("First load")
            .SetCampaignName("Summer Campaign")
            .SetCampaignSource("google")
            .SetCampaignMedium("cpc")
            .SetCampaignKeyword("games")
            .SetCampaignContent("Free power ups")
            .SetCampaignID("Summer1")); 

I assume the URL is created with the tool provided by Google (https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-url-builder, referenced from: https://support.google.com/analytics/answer/3389142?hl=en). I'm guessing this works for iOS too.

However, and here's the trouble, we don't know how to retrieve this information from within the app. How do I get, for instance, the campaign name that was provided by the URL used to install the app?

Thanks a lot!

Hi @CarlosPerson
did u figure out any solution to your problem?

One more thing i wanted to ask. We have been trying to setup Campaign tracking but only for new downloads, i.e only those which come from INSTALL_REFERRER

On seeing the official doc of google analytics
https://developers.google.com/analytics/devguides/collection/android/v3/campaigns#google-play-campaigns
We come to a conclusion that to only track install we wont need any calls from unity C# side. am i correct in this? or do i need to add anything to the unity side??

I have only added to the manifest entry of CampaignTrackingReceiver & CampaignTrackingService
with install_referrer intent are these enough?

What if we want to use 3rd party trackers as well? How can we read campaign parameters of the current install? This is especially interesting for iOS versions since INSTALL_REFERRER on Android perfectly solves the problem. I started to learn iOS install campaign tracking by GA from this
iOS Install Tracking
guide from Google. But the guide itself does not describe if it is possible to catch campaign parameters inside the application at all.