问题
I am trying to have add custom dimensions in google analytics
For this, I have added several custom dimensions under
admin -> custom definitions -> custom dimensions
I am using google analytics measurement protocol to send values for custom dimensions. In Audience -> User Explorer there is no value for some custom dimensions, but when I go to Customization -> Custom Reports values that are missing in User Explorer are there
I have waited 3 days as I thought that google synchronizes the data in 24-72 hours. But no result!
In case custom dimension is empty in my request, I send N/A(Not Available) as a default value.
try (CloseableHttpClient httpclient = HttpClients.custom()
.setDefaultRequestConfig(RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD).build())
.build()) {
URIBuilder builder = new URIBuilder(singleUrl);
builder.setParameter("v", "1");
builder.setParameter("t", "event");
builder.setParameter("tid", trackingId);
builder.setParameter("uid", progression.getUsername());
builder.setParameter("ec", "crm");
builder.setParameter("ea", "synchronize");
builder.setParameter("ua", "carguide");
builder.setParameter("cd1", DataUtil.getString(progression.getUsername(), "N/A"));
builder.setParameter("cd2", DataUtil.getString(DateUtil.defaultDateFormat(progression.getSignedUpTs()), "N/A"));
builder.setParameter("cd3", DataUtil.getString(progression.getSignupProduct(), "N/A"));
builder.setParameter("cd4", DataUtil.getString(progression.getSubscription(), "N/A"));
builder.setParameter("cd5", DataUtil.getString(DateUtil.defaultDateFormat(progression.getSubscriptionStartTs()), "N/A"));
builder.setParameter("cd6", DataUtil.getString(DateUtil.defaultDateFormat(progression.getSubscriptionDueTs()), "N/A"));
builder.setParameter("cd7", DataUtil.getString(DateUtil.defaultDateFormat(progression.getLastVehicleAddedTs()), "N/A"));
builder.setParameter("cd8", DataUtil.getString(progression.getTotalVehiclesAdded(), "N/A"));
builder.setParameter("cd9", DataUtil.getString(progression.getTotalVehiclesDeleted(), "N/A"));
builder.setParameter("cd10", DataUtil.getString(DateUtil.defaultDateFormat(progression.getLastReportPurchaseTs()), "N/A"));
builder.setParameter("cd11", DataUtil.getString(progression.getTotalReportsPurchased(), "N/A"));
builder.setParameter("cd12", DataUtil.getString(progression.getTotalAmountSpent(), "N/A"));
HttpUriRequest request = new HttpPost(builder.build());
HttpResponse response = httpclient.execute(request);
log.info("==============GA Customer Sync Api Returned {}==============", response.getStatusLine().getStatusCode());
}
The code above makes the following request(parameter values are different here)
https://www.google-analytics.com/collect?v=1&t=event&tid=UA-XXXXXX-1&uid=some-user&ec=crm&ea=synchronize&ua=carguide&cd1=17a48532-9054-4764-a5fb-4dc5c14984cc&cd2=18%2F07%2F2020+16%3A51%3A29&cd3=subs_signup&cd4=access_30_days&cd5=18%2F07%2F2020+16%3A51%3A27&cd6=17%2F08%2F2020+23%3A59%3A59&cd7=N%2FA&cd8=0&cd9=0&cd10=N%2FA&cd11=0&cd12=9.99
回答1:
Not directly possible
Well, this is not possible, User Explorer does not offer feature you are asking for.
Read the full manual about User Explorer: https://support.google.com/analytics/answer/6339208?hl=en You will clearly see, what is supported and what is not.
Default supported metrics are:
Sessions
Avg. Session Duration
Bounce Rate
Revenue
Transactions
Goal Conversion Rate
Segments
Closest to what you wan't is creating custom segment where you can involve your Custom Dimension.
Big Query export
If you are 360 Customer, you can find your data in Big Query. Pairing key for your task is here in detail of particular user. Then use SQL to obtain your desired insight or create Data Studio dashboard.
来源:https://stackoverflow.com/questions/62997964/google-analytics-custom-dimension-values-are-not-displayed-in-audience-user-e