Add custom tags to Google Analytics

I use Google Analytics to attribute the installation for my application, and I have a URL like this:

https://play.google.com/store/apps/details?id=com.Slack&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26anid%3Dadmob

I am wondering if I can add my own request parameters in the same url to have something like

https://play.google.com/store/apps/details?id=com.Slack&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26anid%3Dadmob%26mytag%3Dtest

Will this potentially create problems when the play store passes the intention to my recipient, and the intention will also have its own tag that I added to the URL?

+4
source share
1 answer

You can check if the application accepts non-utm parameters using the adb command to broadcast the INSTALL_REFERRER intent, as described in testing game campaigns .

$ cd <path_to_adb_tool>
$ echo 'am broadcast \
    -a com.android.vending.INSTALL_REFERRER \
    -n "your.package.name/path.to.receiver" \
    --es "referrer" \
      "utm_source=test_source&utm_medium=test_medium&utm_term=test_term&utm_content=test_content&utm_campaign=test_name"; \
    exit' | ./adb shell

referrer , CampaignTrackingReceiver.

, url setCampaignParamsFromUrl

// Get tracker.
Tracker t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker(
    TrackerName.APP_TRACKER);

// Set screen name.
t.setScreenName(screenName);

// In this example, campaign information is set using
// a url string with Google Analytics campaign parameters.
// Note: This is for illustrative purposes. In most cases campaign
//       information would come from an incoming Intent.
String campaignData = "http://examplepetstore.com/index.html?" +
    "utm_source=email&utm_medium=email_marketing&utm_campaign=summer" +
    "&utm_content=email_variation_1";

// Campaign data sent with this hit.
t.send(new HitBuilders.ScreenViewBuilder()
    .setCampaignParamsFromUrl(campaignData)
    .build()
);

, Google Analytics, . - - Google Analytics :

// Get tracker.
Tracker t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker(
    TrackerName.APP_TRACKER);
t.setScreenName("Home Screen");

// Send the custom dimension value with a screen view.
// Note that the value only needs to be sent once.
t.send(new HitBuilders.ScreenViewBuilder()
    .setCustomDimension(1, "premiumUser")
    .build()
);

, :

. .

+4

Source: https://habr.com/ru/post/1668631/


All Articles