Passing the value of two dimensions in an API call from Analytics

Avatar

Avatar
Level 1
TomEdmondson
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
TomEdmondson
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
TomEdmondson
Level 1

15-02-2021

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. 

 

https://www.adobe.io/apis/experiencecloud/analytics/docs.html#!AdobeDocs/analytics-2.0-apis/master/r...

 

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. 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 25
Employee
Khurshid_Alam
Employee

Likes

56 likes

Total Posts

189 posts

Correct reply

41 solutions
Top badges earned
Affirm 25
Boost 50
Affirm 10
Boost 25
Affirm 5
View profile

Avatar
Affirm 25
Employee
Khurshid_Alam
Employee

Likes

56 likes

Total Posts

189 posts

Correct reply

41 solutions
Top badges earned
Affirm 25
Boost 50
Affirm 10
Boost 25
Affirm 5
View profile
Khurshid_Alam
Employee

15-02-2021

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.