API > classification campaigns : Invalid elements | Community
Skip to main content
yohannn_nizon
June 1, 2017
Solved

API > classification campaigns : Invalid elements

  • June 1, 2017
  • 1 reply
  • 829 views

Hello,

i am using your api to get report informations with campaign and code tracking.

I try this:

{

    "reportDescription":{

        "reportSuiteID":"MYRSID",

        "dateFrom":"2017-05-20",

        "dateTo":"2017-05-26",

        "metrics":[

            {"id":"revenue"},{"id":"orders"},{"id":"visits"},{"id":"bouncerate"}

        ],

        "sortBy":"revenue",

        "elements": [

{

"id": "trackingCode",

"classification": "Campaigns",

"top": 20,

"startingWith": 1

},

{

"id": "trackingCode",

"top": 20

}

]

     

    }

}

This code works well if i delete bracket with classification = campaigns.

But when i run this, i get the error : invalid element.

I need to get metrics with campaign name , not only trackingcode.

Do you have a solution ?

I try it by API Explorer v1.3 > Report > QueueRanked. THen Report > Get.

In API 1.4, i got Invalid classification \"Campaigns\" for element \"trackingcode\"",

Thanks.

Yohann

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Hyder_Ziaee

Hi Yohann,

Check if you have a classification for the tracking code setup as Campaigns. Check spelling as well. Is it plural?

I tried and got the result correctly.

{

    "reportDescription": {

          "reportSuiteID": "RSIDXXX",

          "dateFrom": "2017-05-25",

          "dateTo": "2017-05-31",

          "sortBy": "revenue",

          "metrics": [

              {"id": "revenue"},{"id": "orders"},{"id": "visits"},{"id": "bouncerate"}

          ],

          "elements": [

              {

                    "id": "trackingcode",

                    "classification": "Campaign",

                    "top": 20,

                    "startingWith": 1

              }

          ]

    }

}

-Hyder

1 reply

Hyder_Ziaee
Adobe Employee
Hyder_ZiaeeAdobe EmployeeAccepted solution
Adobe Employee
June 1, 2017

Hi Yohann,

Check if you have a classification for the tracking code setup as Campaigns. Check spelling as well. Is it plural?

I tried and got the result correctly.

{

    "reportDescription": {

          "reportSuiteID": "RSIDXXX",

          "dateFrom": "2017-05-25",

          "dateTo": "2017-05-31",

          "sortBy": "revenue",

          "metrics": [

              {"id": "revenue"},{"id": "orders"},{"id": "visits"},{"id": "bouncerate"}

          ],

          "elements": [

              {

                    "id": "trackingcode",

                    "classification": "Campaign",

                    "top": 20,

                    "startingWith": 1

              }

          ]

    }

}

-Hyder