List the campaigns

 

All the campaigns

Using our REST API, you can easily list all the campaigns of a site. Here’s the format of the URL:
https://apirest.atinternet-solutions.com/rest/config/v1/campaign/campaigns?keys={siteid:547837}

Once asked, you should fill in your Analytics Suite credentials to login and get access to the campaigns of the site.
Here’s the answer format (JSON array):

Here are the labels descriptions:

  • Id: unique identifier of the campaign;
  • SiteId: unique identifier of the site (it matches the one provided in the siteid parameter of the URL);
  • Label: campaign label, provided when creating the campaign;
  • StartDate: creation date of the campaign;
  • EndDate: end date of the campaign, it returns null when the campaign is still active;
  • SourceId: campaign type, you may refer to this list to retrieve the Source Label.
 

Campaigns per traffic source

You may need to list only certain types of campaigns (e.g. only the email campaigns). To do so, use this method to list all the campaign types and get the traffic source IDs you need.

Then, you can all the following URL to filter the campaign per traffic source:

https://apirest.atinternet-solutions.com/rest/config/v1/campaign/campaigns?keys={siteid:547837}&filter={sourceid:{$in:{31,32,33}}}

 

User Access

All users with standard access are able to use this service. Users with custom access aren’t allowed.

Was this post helpful?
Yes
No
Last update: 27/02/2018