SDITools / adobeanalyticsr

R Client for Adobe Analytics API v2.0
Other
18 stars 9 forks source link

aw_get_metrics(...segmentable = FALSE) returns all metrics (segmentable and not) #42

Closed gilliganondata closed 3 years ago

gilliganondata commented 3 years ago

I don't know if this is an API issue (in which case we can just document it) or whether it's an issue with the function.

I had to go digging and then experimenting to even confirm what "segmentable" was. Including this link as the one reference I found: https://experienceleague.adobe.com/docs/analytics/analyze/analysis-workspace/workspace-faq/aw-limitations.html?lang=en#known-limitations-in-analysis-workspace

Also for reference, through experimentation, these are the metrics that I expected segmentable = FALSE to return:

benrwoodard commented 3 years ago

According to the documentation in SWAGGER this is expected behavior.

On Thu, Nov 26, 2020 at 12:59 PM Tim Wilson notifications@github.com wrote:

I don't know if this is an API issue (in which case we can just document it) or whether it's an issue with the function.

  • segmentable = TRUE returns just the metrics that can be used in segments.
  • segmentable = FALSE, though, returns all metrics. In theory, it should just return the handful that are not available in segments (which I don't know why anyone would ever want that): bounces, unique visitors, etc.

I had to go digging and then experimenting to even confirm what "segmentable" was. Including this link as the one reference I found: https://experienceleague.adobe.com/docs/analytics/analyze/analysis-workspace/workspace-faq/aw-limitations.html?lang=en#known-limitations-in-analysis-workspace

Also for reference, through experimentation, these are the metrics that I expected segmentable = FALSE to return:

  • averagepagedepth
  • averagetimespentonpage
  • averagetimespentonsite
  • averagevisitdepth
  • bouncerate
  • bounces
  • entries
  • exits
  • firsttouchchannel.5
  • firsttouchchannel.6
  • firsttouchchannel.7
  • firsttouchchannel.8
  • itemtimespent
  • mobileviews
  • occurrences
  • orderspervisit
  • pagesnotfound
  • pageviewspervisit
  • singlevaluevisits
  • timespentvisit
  • timespentvisitor
  • visitors
  • visitorsdaily
  • visitorshourly
  • visitorsmonthly
  • visitorsquarterly
  • visitorsweekly
  • visitorsyearly

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/benrwoodard/adobeanalyticsr/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQCA545T5GSDMMC6H5RTQ3SR2JPLANCNFSM4UEAV5UA .

gilliganondata commented 3 years ago

Where is that documentation? I'm looking at https://adobedocs.github.io/analytics-2.0-apis/#/metrics/getMetrics. I'm not seeing that documented as such per se. But, I haven't actually tested it in the Swagger interface. It seems like that's just the way they set it up: NULL = FALSE = "return all metrics."

gilliganondata commented 3 years ago

I'm seeing this in other arguments as well, and I'm starting to understand it. Really, it's just a case of setting TRUE to return a subset. So, in this case, the question it's really asking is:

Do you just want to return the segmentable values?

TRUE means "yes, that's all I want." FALSE (and NA and NULL) means, "no; return everything"

We can make that clear in the documentation (I've started doing so).