Romanu74 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Incorrect custom campaign values reported in console #906

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
---------------------------------------------------------------------------
NOTE: This tool is not designed to request help. It is only for
reporting issues and requesting features for the Google Analytics
libraries.

If you are a developer and you need help, visit:
https://developers.google.com/analytics/help/

If you are not a developer and you need help, visit:
https://support.google.com/analytics
---------------------------------------------------------------------------
Name of affected component: Mobile Tracking

Name of related library and version, if applicable (e.g. Android, iOS,
Snippets, etc.):  Google Analytics SDK v4 for Android, 
play-services-analytics:8.4.0

Issue summary:
Provide a brief summary of the issue you're experiencing.

When custom GA clientId is set then custom campaign values (source, media...) 
are reported correctly only for the first time. Custom campaign values reported 
with each subsequent hit are the same as reported in first hit even if custom 
campaign has changed. 

Steps to reproduce issue:
1. Set custom clientId:
AdvertisingIdClient.Info info = 
AdvertisingIdClient.getAdvertisingIdInfo(mContext); 
mTracker.setClientId(info.getId());

2. Report custom campaign:
HitBuilders.ScreenViewBuilder hitBuilder = new HitBuilders.ScreenViewBuilder();
hitBuilder.setCampaignParamsFromUrl(campaignDataSpring).setNewSession();
tracker.send(hitBuilder.build());

3. Report new custom campaign:
HitBuilders.ScreenViewBuilder hitBuilder = new HitBuilders.ScreenViewBuilder();
hitBuilder.setCampaignParamsFromUrl(campaignDataSummer).setNewSession();
tracker.send(hitBuilder.build());

Expected output:
What do you expect to see after performing the above steps?
I should see in console reported values from campaignDataSpring and 
campaignDataSummer.

Actual results:
What do you actually see after performing the above steps?

Values connected with campaignDataSpring are reported twice. CampaignDataSummer 
values are not displayed in GA console at all.

Notes:
Provide any additional information which might be useful here. Feel free to
attach screenshots or sample code which demonstrates the issue being
described.

Original issue reported on code.google.com by k.k...@nomtek.com on 9 Mar 2016 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by t...@google.com on 9 Mar 2016 at 3:38