Hi All,
As an API first tool I am surprised that we are not able to pass the value of two dimensions in one API call from Analytics. Am I missing something obvious? I am using the reporting API 2.0
One of our use case is:
An example: The "ECID" in evar1 and "bid" in evar2 and I want to pass the value of both in one call to Campaign Classic for real time activation, using clickstream data or the standard campaign connector would be too slow in this case.
evar1 = abcd
evar2 = 1234
api call = abcd, 1234
After speaking with Customer care, who reiterated the breakdown one dimension by another and referring to the standard documentations I am non the wiser.
The only alternative I can think of (which doesn't cover all the use cases) is:
1. send a call to create a segment to include "evar2 = 1234"
2. send a call to get the values of evar1 including all in (filtered by) the segment just created: evar1 WHERE evar2 = 1234
3. send a call to delete the segment
This raises further questions:
How much time is needed before sending the call to collect the data would the segment need to be created to ensure all the data was included?
Another option might be; concatenate evar1 and evar2 into evar3 and pass the value of evar3 in an API call?
Although not very flexible this would work with some use cases we knew what two values we wanted to pass and they didn't change.
Thanks in advance for any advice or experience with the same issue.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You can pull two dimensions in a single API request using break-down only. If using segments addresses your query, I would suggest using inline segment as below:
"globalFilters": [
{
"type": "segment",
"segmentDefinition": {
"container": {
"func": "container",
"context": "hits",
"pred": {
"func": "streq",
"str": "1234",
"val": {
"func": "attr",
"name": "variables/evar1"
}
}
}
This way you do not need to create and delete segments.
Views
Replies
Total Likes
You can pull two dimensions in a single API request using break-down only. If using segments addresses your query, I would suggest using inline segment as below:
"globalFilters": [
{
"type": "segment",
"segmentDefinition": {
"container": {
"func": "container",
"context": "hits",
"pred": {
"func": "streq",
"str": "1234",
"val": {
"func": "attr",
"name": "variables/evar1"
}
}
}
This way you do not need to create and delete segments.
Views
Replies
Total Likes
Views
Likes
Replies